[OpenSIPS-Users] How to pass an opensips variable to perl

Geoffroy Rabouin geoffroy.rabouin at gmail.com
Tue Nov 18 18:26:10 CET 2008


I've tried :
perl_exec("Urgence", $avp(s:password))
perl_exec("Urgence", avp(s:password))

They don't work, it seems that it must have the quotes ...
and with the quotes it itsn't the value which is transmitted.

2008/11/18 Brett Nemeroff <brett at nemeroff.com>

> It's been a while since I used the perl stuff, but have you tried:perl_exec("Urgence",
> $avp(s:password))
>
> ?
>
> On Tue, Nov 18, 2008 at 11:03 AM, Geoffroy Rabouin <
> geoffroy.rabouin at gmail.com> wrote:
>
>> Let me be more explicative
>> first test :
>> # openser.cfg
>> perl_exec("Urgence");
>> # UrgenceScript.pl
>> my $hdr = OpenSIPS::AVP::get("password");
>>
>> the $hdr variable is NULL
>>
>> second test :
>> # opensips.cfg
>> perl_exec("Urgence", "avp(s:password)");
>> # UrgenceScript.pl
>> my $hdr = shift;
>> the hdr variable is ==> avp(s:password) and not the value of the avp.
>> and if I perl_exec("Urgence", avp(s:password)); whitout quotes, opensips
>> simply crash.
>>
>> thanks
>>
>>
>> ---------- Forwarded message ----------
>> From: Geoffroy Rabouin <geoffroy.rabouin at gmail.com>
>> Date: 2008/11/18
>> Subject: How to pass an opensips variable to perl
>> To: users at lists.opensips.org
>>
>>
>> Hi,
>> I want to pass a variable from opener to a perl program
>> anyone has complete these ?
>>
>> I try with :
>> # opensips.cfg
>> perl_exec("Urgence", "avp(s:password)");
>>
>> # UrgenceScript.pl
>> my $hdr = OpenSIPS::AVP::get("password");
>>
>> But the $hdr variable still be null
>> I've only use OpenSIPS qw ( log ); and use OpenSIPS::Message; for the USE
>> section.
>> OpenSIPS::AVP cause opensips to crash for lack of AVP.pm (which seems
>> doesn't exist).
>>
>> thanks
>>
>>
>> --
>> Geoffroy Rabouin
>> HighColoc
>> 13710 La Barque
>> téléphone : 06-27-19-13-07
>>
>>
>>
>> --
>> Geoffroy Rabouin
>> HighColoc
>> 13710 La Barque
>> téléphone : 06-27-19-13-07
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>


-- 
Geoffroy Rabouin
HighColoc
13710 La Barque
téléphone : 06-27-19-13-07
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20081118/90dc1b73/attachment-0001.htm 


More information about the Users mailing list