[OpenSER-Users] t_on_branch -- using drop() question?

Zahid Mehmood zm23 at columbia.edu
Thu Jul 26 20:09:51 CEST 2007


Andreas,
	Thanks for your reply.  I understand that part. Is that a
best-practice to not relay a packet to yourself?  I was trying to
implement serial forking based on the example for voice-systems and I'm
running into some issues when doing a simple t_relay() and that is when
I started looking for a better way to do this.

  I'm still not clear about the use of t_on_branch.  In this case, when
is it really called? 

-- 
Zahid


-----Original Message-----
From: Andreas Granig [mailto:agranig at sipwise.com] 
Sent: Thursday, July 26, 2007 1:37 PM
To: Zahid Mehmood
Cc: users at openser.org
Subject: Re: [OpenSER-Users] t_on_branch -- using drop() question?

Hi,

The config is designed to never relay a request to itself, but instead 
do recursive route processing. So if you do a CFC to a local user, the 
config will take care to do a lookup before a relay, which will change 
the request uri to the IP of the CF target.

Andreas

Zahid Mehmood wrote:
> I was looking at the openser config generated using the online sipwise

> wizard.  They implement conditional call forwarding using:
> 
> if($avp(s:cfc) != NULL)
>         {
> 
>                 avp_pushto("$ru", "$avp(s:cfc)");
>                 setflag(29);
>                 append_branch();
> 
>                 t_on_branch("1");
>                 xlog("L_INFO", "CFC detected - M=$rm RURI=$ru F=$fu 
> T=$tu IP=$si ID=$ci\n");
>                 route(13);
>         }
> 
> 
> 
> branch_route[1]
> {
>         if(is_domain_local("$rd"))
>         {
> 
>                 xlog("L_INFO", "Dropping local branch - M=$rm RURI=$ru

> F=$fu T=$tu IP=$si ID=$ci\n");
>                 drop();
>         }
> 
> }
> 
> 
> Suppose an invite gets to this point and ruri is changed to another 
> local user.  does this drop() in branch_route prevents that invite to
be 
> relayed?  does it still go through route(13) ?
> 
> I'm still a newbie trying to better understand the working of openser 
> functions.  I'll greatly  appreciate if someone can briefly describe 
> when it makes sense to use "append_branch()"
> 
> Thanks in advance for your help.
> 




More information about the sr-users mailing list