[Kamailio-Users] Access to $var() from perl
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 17 09:11:18 CEST 2009
On 06/16/2009 12:31 PM, Alex Hermann wrote:
> On Tuesday 16 June 2009, Henning Westerholt wrote:
>
>> On Dienstag, 16. Juni 2009, Alex Hermann wrote:
>>
>>> (how) can I access $var() variables via the perl module?
>>>
>>> OpenSER::AVP::get() does not work for $var().
>>>
>> is there perhaps a generic pseudo-variable access method exported from the
>> perl module? $var is just a PV in the end.
>>
>
> Thanks for the hint, that works.
>
> $m->pseudoVar('$var(...)')
>
note that in some cases, this method is not safe. This because some PVs
allocate structures in memory for the name. $var is safe, as a first
look, but $sht isn't it. For AVP you have a special perl class and
should be the way to access unsafe PVs - copy it to avp before calling
the perl script.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com/
More information about the sr-users
mailing list