How to pass an opensips variable to perl

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to pass an opensips variable to perl

Geoffroy Rabouin
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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Geoffroy Rabouin
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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Brett Nemeroff
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 <[hidden email]> 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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Geoffroy Rabouin
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 <[hidden email]>
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 <[hidden email]> 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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





--
Geoffroy Rabouin
HighColoc
13710 La Barque
téléphone : 06-27-19-13-07

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Brett Nemeroff
Ok, since brute force is my style.. try:
perl_exec("Urgence", "$avp(s:password)")

On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin <[hidden email]> wrote:
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 <[hidden email]>

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 <[hidden email]> 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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





--
Geoffroy Rabouin
HighColoc
13710 La Barque
téléphone : 06-27-19-13-07


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Geoffroy Rabouin
I haven't got the value, but :
$avp(s:password)

it seems that it must not use the quotes ...

2008/11/18 Brett Nemeroff <[hidden email]>
Ok, since brute force is my style.. try:
perl_exec("Urgence", "$avp(s:password)")

On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin <[hidden email]> wrote:
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 <[hidden email]>

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 <[hidden email]> 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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





--
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Brett Nemeroff
Of course, the other way to do this is actually getting the AVP bits to work properly, which you'll probably need anyway.

I remember, I had to move some files around to make this work right..
-Brett


On Tue, Nov 18, 2008 at 11:35 AM, Geoffroy Rabouin <[hidden email]> wrote:
I haven't got the value, but :
$avp(s:password)

it seems that it must not use the quotes ...


2008/11/18 Brett Nemeroff <[hidden email]>
Ok, since brute force is my style.. try:
perl_exec("Urgence", "$avp(s:password)")

On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin <[hidden email]> wrote:
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 <[hidden email]>

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 <[hidden email]> 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 <[hidden email]>
Date: 2008/11/18
Subject: How to pass an opensips variable to perl
To: [hidden email]


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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





--
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Alex Balashov
These arguments haven't ever worked for me.  I just set pseudovariables
(e.g. $var(name)) and then get them out in Perl.

Brett Nemeroff wrote:

> Of course, the other way to do this is actually getting the AVP bits to
> work properly, which you'll probably need anyway.
>
> I remember, I had to move some files around to make this work right..
> -Brett
>
>
> On Tue, Nov 18, 2008 at 11:35 AM, Geoffroy Rabouin
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     I haven't got the value, but :
>     $avp(s:password)
>
>     it seems that it must not use the quotes ...
>
>
>     2008/11/18 Brett Nemeroff <[hidden email]
>     <mailto:[hidden email]>>
>
>         Ok, since brute force is my style.. try:
>         perl_exec("Urgence", "$avp(s:password)")
>
>         On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin
>         <[hidden email] <mailto:[hidden email]>>
>         wrote:
>
>             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 <[hidden email]
>             <mailto:[hidden email]>>
>
>                 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
>                 <[hidden email]
>                 <mailto:[hidden email]>> 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* <[hidden email]
>                     <mailto:[hidden email]>>
>                     Date: 2008/11/18
>                     Subject: How to pass an opensips variable to perl
>                     To: [hidden email]
>                     <mailto:[hidden email]>
>
>
>                     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
>                     [hidden email]
>                     <mailto:[hidden email]>
>                     http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
>
>             --
>             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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Geoffroy Rabouin
# opensips.cfg
$var(passation) = $ct;

# UrgenceScript.pl
my $pass = "\$var(passation)";
my $v = $m->pseudoVar($pass);
open POUET, ">/tmp/pouet";
print POUET $v . "\n";
close POUET;

I don't have the same value in the 2 variables ...
any idea ?


2008/11/18 Alex Balashov <[hidden email]>
These arguments haven't ever worked for me.  I just set pseudovariables (e.g. $var(name)) and then get them out in Perl.

Brett Nemeroff wrote:

Of course, the other way to do this is actually getting the AVP bits to work properly, which you'll probably need anyway.

I remember, I had to move some files around to make this work right..
-Brett


On Tue, Nov 18, 2008 at 11:35 AM, Geoffroy Rabouin <[hidden email] <mailto:[hidden email]>> wrote:

   I haven't got the value, but :
   $avp(s:password)

   it seems that it must not use the quotes ...


   2008/11/18 Brett Nemeroff <[hidden email]
   <mailto:[hidden email]>>


       Ok, since brute force is my style.. try:
       perl_exec("Urgence", "$avp(s:password)")

       On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin
       <[hidden email] <mailto:[hidden email]>>

       wrote:

           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 <[hidden email]
           <mailto:[hidden email]>>


               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
               <[hidden email]
               <mailto:[hidden email]>> 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* <[hidden email]
                   <mailto:[hidden email]>>
                   Date: 2008/11/18
                   Subject: How to pass an opensips variable to perl
                   To: [hidden email]
                   <mailto:[hidden email]>


                   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
                   [hidden email]
                   <mailto:[hidden email]>

                   http://lists.opensips.org/cgi-bin/mailman/listinfo/users





           --            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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



--
Geoffroy Rabouin
HighColoc
13710 La Barque
téléphone : 06-27-19-13-07

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: How to pass an opensips variable to perl

Geoffroy Rabouin
Hi,
I've just used the pseudovariables and a dirty/quick trick to solve my problem.
Here is the interested part of my perl script, nothing in the openser.cfg :
#!/usr/bin/perl
use OpenSIPS qw ( log );
use OpenSIPS::Message;
use OpenSIPS::Constants;
        my $Emetteur = "\$fu";
        my $Destination = "\$tu";
        my $Doussa = $m->pseudoVar($Emetteur);
        my $Ouktuva = $m->pseudoVar($Destination);

Thanks a lot to give me the way :]

2008/11/18 Geoffroy Rabouin <[hidden email]>
# opensips.cfg
$var(passation) = $ct;

# UrgenceScript.pl
my $pass = "\$var(passation)";
my $v = $m->pseudoVar($pass);
open POUET, ">/tmp/pouet";
print POUET $v . "\n";
close POUET;

I don't have the same value in the 2 variables ...
any idea ?


2008/11/18 Alex Balashov <[hidden email]>

These arguments haven't ever worked for me.  I just set pseudovariables (e.g. $var(name)) and then get them out in Perl.

Brett Nemeroff wrote:

Of course, the other way to do this is actually getting the AVP bits to work properly, which you'll probably need anyway.

I remember, I had to move some files around to make this work right..
-Brett


On Tue, Nov 18, 2008 at 11:35 AM, Geoffroy Rabouin <[hidden email] <mailto:[hidden email]>> wrote:

   I haven't got the value, but :
   $avp(s:password)

   it seems that it must not use the quotes ...


   2008/11/18 Brett Nemeroff <[hidden email]
   <mailto:[hidden email]>>


       Ok, since brute force is my style.. try:
       perl_exec("Urgence", "$avp(s:password)")

       On Tue, Nov 18, 2008 at 11:26 AM, Geoffroy Rabouin
       <[hidden email] <mailto:[hidden email]>>

       wrote:

           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 <[hidden email]
           <mailto:[hidden email]>>


               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
               <[hidden email]
               <mailto:[hidden email]>> 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* <[hidden email]
                   <mailto:[hidden email]>>
                   Date: 2008/11/18
                   Subject: How to pass an opensips variable to perl
                   To: [hidden email]
                   <mailto:[hidden email]>


                   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
                   [hidden email]
                   <mailto:[hidden email]>

                   http://lists.opensips.org/cgi-bin/mailman/listinfo/users





           --            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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



--
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users