Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2012-10-21 Thread Bogdan-Andrei Iancu

Hi,

Not sure I understand what you want to achieve here :(. Could you detail 
a bit...


Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 10/19/2012 02:05 PM, spady wrote:

Hi Bogdan, I am trying to do the same thing but what if in my script I have
different destination uri?

Ex. if ...
 route(2);

  if
route(3);
...

the pv " $du " could be only one, for instance, $du = $var(new_uri); and NOT
*$du1 = $var(new_uri); $du2 = $var(new_uri);*

Am I wrong?

Regards




--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/how-to-set-var-name-in-opensips-cfg-tp4796408p7582396.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2012-10-19 Thread spady
Hi Bogdan, I am trying to do the same thing but what if in my script I have
different destination uri?

Ex. if ...
route(2);

 if
   route(3);
...

the pv " $du " could be only one, for instance, $du = $var(new_uri); and NOT
*$du1 = $var(new_uri); $du2 = $var(new_uri);* 

Am I wrong?

Regards




--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/how-to-set-var-name-in-opensips-cfg-tp4796408p7582396.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2010-04-01 Thread CheeWii
Yeah,it is ok! Thank you:)

2010/3/25 Bogdan-Andrei Iancu 

> t_relay() does not accept variables as parameters. To get the same
> behaviour, use $du (destination uri):
>
>$du = $var(new_uri);
>t_relay();
>
> Regards,
> Bogdan
>
> CheeWii wrote:
> > Can I use :
> >
> > $var(new_uri)="udp:"+"192:168:0:3"+":5060";
> > t_relay("$var(new_uri)") or  t_relay($var(new_uri))
> >
> > Maybe there is something wrong in use t_relay()~~
> >
> > 2010/3/25 Bogdan-Andrei Iancu  > >
>  >
> > Hi,
> >
> > replace
> >if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
> >
> > with
> >if ( $si == $var(aster_ip) && $sp== $var(aster_port) ) {
> >
> > Regards,
> > Bogdan
> >
> > CheeWii wrote:
> > > Hi,
> > > I have read the Script variables introduction,and I make a test
> > in my
> > > opensips.cfg. But the opensips cannot start up.
> > >
> > > I have added:
> > > $var(aster_ip)="192.168.0.176";
> > > $var(aster_port)="5060";
> > > if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
> > > xlog("L_NOTICE","Incoming Request is from $src_ip \n");
> > > }
> > >
> > > The error log is showed as follows :
> > > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> > error
> > > in config file, line 216, column 34-35: syntax error
> > > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> > error
> > > in config file, line 216, column 34-35: number expected
> > > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> > error
> > > in config file, line 216, column 34-35: bad command!)
> > > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> > error
> > > in config file, line 216, column 35-36: bad command!)
> > > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> > error
> > > in config file, line 216, column 37-38: bad command!)
> > >
> > >
> > > What is wrong with it? thanks a lot!
> > >
> >
> 
> > >
> > > ___
> > > Users mailing list
> > > Users@lists.opensips.org 
> > > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> > >
> >
> >
> > --
> > Bogdan-Andrei Iancu
> > www.voice-system.ro 
> >
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
>  > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
> >
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

ye
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2010-03-25 Thread Bogdan-Andrei Iancu
t_relay() does not accept variables as parameters. To get the same 
behaviour, use $du (destination uri):

$du = $var(new_uri);
t_relay();

Regards,
Bogdan

CheeWii wrote:
> Can I use :
>  
> $var(new_uri)="udp:"+"192:168:0:3"+":5060";
> t_relay("$var(new_uri)") or  t_relay($var(new_uri))
>  
> Maybe there is something wrong in use t_relay()~~
>
> 2010/3/25 Bogdan-Andrei Iancu  >
>
> Hi,
>
> replace
>if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
>
> with
>if ( $si == $var(aster_ip) && $sp== $var(aster_port) ) {
>
> Regards,
> Bogdan
>
> CheeWii wrote:
> > Hi,
> > I have read the Script variables introduction,and I make a test
> in my
> > opensips.cfg. But the opensips cannot start up.
> >
> > I have added:
> > $var(aster_ip)="192.168.0.176";
> > $var(aster_port)="5060";
> > if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
> > xlog("L_NOTICE","Incoming Request is from $src_ip \n");
> > }
> >
> > The error log is showed as follows :
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> error
> > in config file, line 216, column 34-35: syntax error
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> error
> > in config file, line 216, column 34-35: number expected
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> error
> > in config file, line 216, column 34-35: bad command!)
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> error
> > in config file, line 216, column 35-36: bad command!)
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse
> error
> > in config file, line 216, column 37-38: bad command!)
> >
> >
> > What is wrong with it? thanks a lot!
> >
> 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org 
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro 
>
>
> ___
> Users mailing list
> Users@lists.opensips.org 
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2010-03-25 Thread CheeWii
Can I use :

$var(new_uri)="udp:"+"192:168:0:3"+":5060";
t_relay("$var(new_uri)") or  t_relay($var(new_uri))

Maybe there is something wrong in use t_relay()~~

2010/3/25 Bogdan-Andrei Iancu 

> Hi,
>
> replace
>if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
>
> with
>if ( $si == $var(aster_ip) && $sp== $var(aster_port) ) {
>
> Regards,
> Bogdan
>
> CheeWii wrote:
> > Hi,
> > I have read the Script variables introduction,and I make a test in my
> > opensips.cfg. But the opensips cannot start up.
> >
> > I have added:
> > $var(aster_ip)="192.168.0.176";
> > $var(aster_port)="5060";
> > if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
> > xlog("L_NOTICE","Incoming Request is from $src_ip \n");
> > }
> >
> > The error log is showed as follows :
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error
> > in config file, line 216, column 34-35: syntax error
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error
> > in config file, line 216, column 34-35: number expected
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error
> > in config file, line 216, column 34-35: bad command!)
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error
> > in config file, line 216, column 35-36: bad command!)
> > Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error
> > in config file, line 216, column 37-38: bad command!)
> >
> >
> > What is wrong with it? thanks a lot!
> > 
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> www.voice-system.ro
>
>
> ___
>  Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2010-03-25 Thread Bogdan-Andrei Iancu
Hi,

replace
if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {

with
if ( $si == $var(aster_ip) && $sp== $var(aster_port) ) {

Regards,
Bogdan

CheeWii wrote:
> Hi,
> I have read the Script variables introduction,and I make a test in my 
> opensips.cfg. But the opensips cannot start up.
>  
> I have added:
> $var(aster_ip)="192.168.0.176";
> $var(aster_port)="5060";
> if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
> xlog("L_NOTICE","Incoming Request is from $src_ip \n");
> }
>  
> The error log is showed as follows :
> Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error 
> in config file, line 216, column 34-35: syntax error
> Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error 
> in config file, line 216, column 34-35: number expected
> Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error 
> in config file, line 216, column 34-35: bad command!)
> Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error 
> in config file, line 216, column 35-36: bad command!)
> Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error 
> in config file, line 216, column 37-38: bad command!)
>  
>  
> What is wrong with it? thanks a lot!
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] how to set $var(name) in opensips.cfg?

2010-03-25 Thread CheeWii
Hi,
I have read the Script variables introduction,and I make a test in my
opensips.cfg. But the opensips cannot start up.

I have added:
$var(aster_ip)="192.168.0.176";
$var(aster_port)="5060";
if (src_ip == "$var(aster_ip)" && src_port== "$var(aster_port)") {
xlog("L_NOTICE","Incoming Request is from $src_ip \n");
}

The error log is showed as follows :
Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 216, column 34-35: syntax error
Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 216, column 34-35: number expected
Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 216, column 34-35: bad command!)
Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 216, column 35-36: bad command!)
Mar 25 16:01:26 trixbox1 opensips: CRITICAL:core:yyerror: parse error in
config file, line 216, column 37-38: bad command!)


What is wrong with it? thanks a lot!
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users