[SR-Users] reading php script result with exec_avp

Daniel-Constantin Mierla miconda at gmail.com
Wed Jun 5 14:48:03 CEST 2019


Hello,

are you sure that the script is executed? You give a relative path and
kamailio changes working directory to / if you don't give -w parameter?
Try with absolute path.

Cheers,
Daniel

On 05.06.19 14:10, Gertjan Wolzak wrote:
> Hello Kamailions,
>
> I have the following challenge.
>
> I want to create a time dependent callerid, based on the time of a
> outgoing call a callerid will be set.
>
> I have a php script, that provides me an id number which relates to an
> cli.
>
> When I run that php script from the console, the id is shown in the
> console.
>
> When I run the script within the kamailio configuration,
> exec_avp("../script.php", "$avp(s:cliId)"); ,no output commande is
> saved in the avp variable.
>
> I think I am not presenting the result of the php script correctly. I
> have tried with an echo $variable; and with and fwrite(STDOUT,
> $variable); but no luck.
>
> I'm not a PHP coder so I am not surprised of the missing luck, but
> maybe somebody has a golden tip for me?
>
> Rgds,
>
> Gertjan
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda




More information about the sr-users mailing list