[OpenSIPS-Users] modify branch

Bogdan-Andrei Iancu bogdan at voice-system.ro
Tue Nov 11 10:39:16 CET 2008


Hi Alex,

After the append_branch(), the current branch (RURI) is moved from 
message ruri in an internal branch table. To access back the added 
branch, use $br 
(http://www.opensips.org/pmwiki.php?n=Resources.DocsCoreVar#toc11).

Regards,
Bogdan

Alex R.S.M wrote:
> Hi,
>
> I am trying to make some changes in the header of the branch.  The 
> first "if condition" made the change. But, the second "if condition" 
> does not.
> It seems the uri value is not being changed by append_branch function.
>
>  if (is_method("INVITE"))
> {
>      ....
>       seturi("sip:1111111111 at x.x.x.x:5060;transport=UDP");
>       if ( uri=~"sip:.+ at x.x.x.x*" )
>       {
>            // make some changes
>       }
>
>       append_branch("sip:2222222222 at y.y.y.y:5060");
>       if ( uri=~"sip:.+ at y.y.y.y.*" )
>       {
>          // make some changes to the branch
>       }
>       ....
>
> What's the best way to make changes on diff branches?
>
> Thanks,
> Alex
> ------------------------------------------------------------------------
> Get 5 GB of storage with Windows Live Hotmail. Sign up today. 
> <http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_5gb_112008> 
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   




More information about the Users mailing list