[SR-Users] Fwd: perl_exec() using parameter?

Daniel-Constantin Mierla miconda at gmail.com
Tue Oct 19 09:46:17 CEST 2010


  Hello,

On 10/15/10 5:21 PM, "Nicolas Rüger" wrote:
> Hello,
>
> just realized that something like the following works now with kamailio  v3.1...
>
> 		perl_exec("mytest",$fu);
>
>
> Whoever changed it...THANK YOU :)
right, this is probably due to Andrei's new API for module functions 
that identify script variables given as parameters and expand them at 
runtime.

Report if you have troubles with them, the new API will take over in the 
next releases, meanwhile it needs to be tested.

Cheers,
Daniel

> Regards,
>
> Nicolas
>
>
>
>
>> 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???
>>
>> Thank you.
>>
>> Regards,
>>
>> Nicolas
>>
>>
>>
>>
>>> It was not in my plans, I said that development for passing kamailio cfg
>>> variables to second parameter of perl_exec() won't be big effort. I'll
>>> add it to my to-do list, but I cannot say when I will do it. You can use
>>> meanwhile Alex's solution with avps.
>>>
>>> Cheers,
>>> Daniel
>>>
>> -- 
>> GMX DSL Doppel-Flat ab 19,99€/mtl.! Jetzt auch mit
>> gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-users mailing list