Re: [SR-Users] pseudo variables in strings

2016-04-05 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I added pv_evalx() function in pv module which evaluates twice a string > containing variables. No time to test it, so any feedback is > appreciated. It will be also good to stress test it and check if there > is a memory leak for pkg, as the result for first eva

Re: [SR-Users] pseudo variables in strings

2016-04-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I added pv_evalx() function in pv module which evaluates twice a string > containing variables. No time to test it, so any feedback is > appreciated. It will be also good to stress test it and check if there > is a memory leak for pkg, as the result for first eva

Re: [SR-Users] pseudo variables in strings

2016-04-04 Thread Daniel-Constantin Mierla
I added pv_evalx() function in pv module which evaluates twice a string containing variables. No time to test it, so any feedback is appreciated. It will be also good to stress test it and check if there is a memory leak for pkg, as the result for first evaluation needs to be parsed again for other

Re: [SR-Users] pseudo variables in strings

2016-04-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Dialplan can evaluate variables, is it a special case you need to return > variables and then evaluate after dp_translate() again? I made a test rule: match_exp subst_exp repl_exp ^\#11\#$ (empty)$fu and dp_translate(id) on sip:#11#@test.tutpro.com pr

Re: [SR-Users] pseudo variables in strings

2016-04-03 Thread Daniel-Constantin Mierla
On 02/04/16 10:09, Juha Heinanen wrote: > Alex Balashov writes: > >> Yes, either by separating the PV elements, e.g. >> >> $var(x) = $fU + "abc"; > Alex, > > I cannot do that, because the string that contains pvs is result of > a dp_translate call. Dialplan can evaluate variables, is it a specia

Re: [SR-Users] pseudo variables in strings

2016-04-03 Thread Juha Heinanen
Was the conclusion that it is not currently possible to evaluate a string value of a pseudo variable that contains pseudo variables? If so, I'll add feature request, since that kind of capability would greatly increase dynamic nature of Kamailio configuration. -- Juha ___

Re: [SR-Users] pseudo variables in strings

2016-04-02 Thread Juha Heinanen
Alex Balashov writes: > Yes, either by separating the PV elements, e.g. > > $var(x) = $fU + "abc"; Alex, I cannot do that, because the string that contains pvs is result of a dp_translate call. > ... or with the newer $_s() PV created for this purpose: > > $var(x) = $_s($fUabc); No luck with

Re: [SR-Users] pseudo variables in strings

2016-04-01 Thread Alex Balashov
‎Juha, Yes, either by separating the PV elements, e.g. $var(x) = $fU + "abc"; ... or with the newer $_s() PV created for this purpose: $var(x) = $_s($fUabc); -- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States Tel: +1-800-250