[OpenSIPS-Users] Regarding opensips-1.11 variable use .

Sasmita Panda spanda at 3clogic.com
Wed Sep 14 15:34:55 CEST 2016

Hi All ,

 I am using opensips-1.11 .

My config file looks like bellow .

*    if (method=="INVITE") {*

*                    if(is_present_hf("X-Info"))*
*                       {*
*                        $var(c)=$hdr(X-Info);*
*                        $var(d)=$(var(c){s.select,2,;});*
*                        $var(e)=$(var(c){s.select,3,;});*
*                        $var(f)=$(var(c){s.select,4,;});*
*                       }*

*        #Set the flag for counting the dialogs. We user flag=4 for
counting dialogs*
*    setflag(2);*
*    setflag(4);*
*                    xlog( "L_NOTICE", "CallCenter_Info & $ci,$var(c) \n"
*                    xlog( "L_NOTICE", "3CLogicCDR & $ci,$fU,$oU,$rd \n" );*
*                    xlog("L_NOTICE", " Source IP ($si) :  method ($rm)
r-uri ($ru) : callID $ci \n");*
* }*

           What I am trying to do is , I am extracting "X-Info" from INVITE
message and printing it in logs in place of "$var(c)" . When an INVITE
message doesn't have "X-Info" header it prints "<null>" in place of
"$var(c)" in logs .

         * This is working fine in opensips-1.6 . For each and every call
the $var(c) is getting updated . *

          *I am facing some problem in opensips-1.11 . For example : When I
am doing a call which has "X-Info"  it prints the value corresponding to
that . In the next call , lets the INVITE message don't have "X-Info" , for
this rather than printing "<null>" in place of "$var(c)"  **its printing
the previous value .*

*      I am not getting why this is happening . Please help me . I think
the variable is getting saved somewhere and getting printed again and again
.  *

      How can I solve this problem . Its very critical for me . It will
affect my CDR . Please help me .

*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160914/a37a0171/attachment.htm>

More information about the Users mailing list