# opensips.cfg<br>$var(passation) = $ct;<br><br># UrgenceScript.pl<br>my $pass = "\$var(passation)";<br>my $v = $m->pseudoVar($pass);<br>open POUET, ">/tmp/pouet";<br>print POUET $v . "\n";<br>
close POUET;<br><br>I don't have the same value in the 2 variables ...<br>any idea ?<br><br><br><div class="gmail_quote">2008/11/18 Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">These arguments haven't ever worked for me. I just set pseudovariables (e.g. $var(name)) and then get them out in Perl.<br>
<br>
Brett Nemeroff wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">
Of course, the other way to do this is actually getting the AVP bits to work properly, which you'll probably need anyway.<br>
<br>
I remember, I had to move some files around to make this work right..<br>
-Brett<br>
<br>
<br></div><div class="Ih2E3d">
On Tue, Nov 18, 2008 at 11:35 AM, Geoffroy Rabouin <<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a> <mailto:<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a>>> wrote:<br>
<br>
I haven't got the value, but :<br>
$avp(s:password)<br>
<br>
it seems that it must not use the quotes ...<br>
<br>
<br>
2008/11/18 Brett Nemeroff <<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a><br></div>
<mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>>><div class="Ih2E3d"><br>
<br>
Ok, since brute force is my style.. try:<br>
perl_exec("Urgence", "$avp(s:password)")<br>
<br>
On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin<br></div>
<<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a> <mailto:<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a>>><div class="Ih2E3d">
<br>
wrote:<br>
<br>
I've tried :<br>
<br>
perl_exec("Urgence", $avp(s:password))<br>
perl_exec("Urgence", avp(s:password))<br>
<br>
They don't work, it seems that it must have the quotes ...<br>
and with the quotes it itsn't the value which is transmitted.<br>
<br>
2008/11/18 Brett Nemeroff <<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a><br></div>
<mailto:<a href="mailto:brett@nemeroff.com" target="_blank">brett@nemeroff.com</a>>><div class="Ih2E3d"><br>
<br>
It's been a while since I used the perl stuff, but have<br>
you tried:<br>
perl_exec("Urgence", $avp(s:password))<br>
<br>
?<br>
<br>
On Tue, Nov 18, 2008 at 11:03 AM, Geoffroy Rabouin<br>
<<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a><br></div><div class="Ih2E3d">
<mailto:<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a>>> wrote:<br>
<br>
Let me be more explicative<br>
first test :<br>
# openser.cfg<br>
perl_exec("Urgence");<br>
<br>
# UrgenceScript.pl<br>
my $hdr = OpenSIPS::AVP::get("password");<br>
<br>
the $hdr variable is NULL<br>
<br>
second test :<br>
<br>
# opensips.cfg<br>
perl_exec("Urgence", "avp(s:password)");<br>
# UrgenceScript.pl<br>
my $hdr = shift;<br>
the hdr variable is ==> avp(s:password) and not the<br>
value of the avp.<br>
and if I perl_exec("Urgence", avp(s:password));<br>
whitout quotes, opensips simply crash.<br>
<br>
thanks<br>
<br>
<br>
---------- Forwarded message ----------<br>
From: *Geoffroy Rabouin* <<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a><br></div><div class="Ih2E3d">
<mailto:<a href="mailto:geoffroy.rabouin@gmail.com" target="_blank">geoffroy.rabouin@gmail.com</a>>><br>
Date: 2008/11/18<br>
Subject: How to pass an opensips variable to perl<br>
To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a><br></div><div><div></div><div class="Wj3C7c">
<mailto:<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
<br>
<br>
Hi,<br>
I want to pass a variable from opener to a perl program<br>
anyone has complete these ?<br>
<br>
I try with :<br>
# opensips.cfg<br>
perl_exec("Urgence", "avp(s:password)");<br>
<br>
# UrgenceScript.pl<br>
my $hdr = OpenSIPS::AVP::get("password");<br>
<br>
But the $hdr variable still be null<br>
I've only use OpenSIPS qw ( log ); and use<br>
OpenSIPS::Message; for the USE section.<br>
OpenSIPS::AVP cause opensips to crash for lack of<br>
AVP.pm (which seems doesn't exist).<br>
<br>
thanks<br>
<br>
<br>
-- Geoffroy Rabouin<br>
HighColoc<br>
13710 La Barque<br>
téléphone : 06-27-19-13-07<br>
<br>
<br>
<br>
-- Geoffroy Rabouin<br>
HighColoc<br>
13710 La Barque<br>
téléphone : 06-27-19-13-07<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br></div></div>
<mailto:<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
<br>
<br>
<br>
-- Geoffroy Rabouin<br>
HighColoc<br>
13710 La Barque<br>
téléphone : 06-27-19-13-07<br>
<br>
<br>
<br>
<br>
<br>
-- Geoffroy Rabouin<br>
HighColoc<br>
13710 La Barque<br>
téléphone : 06-27-19-13-07<br>
<br>
<br>
<br></div>
------------------------------------------------------------------------<div class="Ih2E3d"><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote><font color="#888888">
<br>
<br>
-- <br>
Alex Balashov<br>
Evariste Systems<br>
Web : <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
Tel : (+1) (678) 954-0670<br>
Direct : (+1) (678) 954-0671<br>
Mobile : (+1) (706) 338-8599<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Geoffroy Rabouin<br>HighColoc<br>13710 La Barque<br>téléphone : 06-27-19-13-07<br>