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

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 25 11:43:51 CET 2010


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


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




More information about the Users mailing list