[SR-Users] Fwd: perl_exec() using parameter?
Daniel-Constantin Mierla
miconda at gmail.com
Tue Oct 19 09:44:39 CEST 2010
Hello,
On 10/15/10 3:43 PM, "Nicolas Rüger" wrote:
> Hello,
>
> thanks for adding it to the list. The feature would help me a lot.
>
> In the meanwhile...
>
> I tried to use AVPs instead, but didn't work. I guess I use them in a wrong way...!?
>
>
> $avp(i:3) = $fu;
> perl_exec("mytest","$avp(i:3)");
>
>
> Using these lines "$avp(i:3)" is passed as a static string again of course.
>
> So how can I pass something like "the value of $fu" from routing logic to my perl script then???
you have to use the functions from perl library to get the value of any
avp you want:
http://kamailio.org/docs/modules/stable/modules_k/perl.html#ID-f092a1ce520e2e575c41702289adf85e
So you don't pass the avps as argument, all avps are accessible via API.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the sr-users
mailing list