[OpenSIPS-Users] 302 not being handled by failure route

Nauman Sulaiman nauman762-home at yahoo.co.uk
Sat Aug 21 19:10:09 CEST 2010


Please ignore this post , the bug is obvious i had the t_relay before the
t_branch_failure in the code  

--- On Sat, 21/8/10, Nauman Sulaiman <nauman762-home at yahoo.co.uk> wrote:

> From: Nauman Sulaiman <nauman762-home at yahoo.co.uk>
> Subject: [OpenSIPS-Users] 302 not being handled by failure route
> To: users at lists.opensips.org
> Date: Saturday, 21 August, 2010, 14:42
> Hi, we have a setup where we are
> using Opensips to redirect an invite from 3rd party client
> registered at address 172.228.136.190:5060 to our Asterisk
> server at 172.228.136.190:5062
> 
> We use the little bit of code below. The problem we have is
> if our Asterisk server sends a 302 redirect(after original
> INVITE redirection) it is no longer being handled by failure
> route! So it actually ends up being relayed along rather
> than handled locally by uac_redirects.
> 
> If we did not use a 3rd party client and Asterisk was the
> target of the original invite (so we did not have the code
> below as no need to redirect)
> then when Asterisk sends a 302 everything works properly ie
> in failure route we call uac_redirects etc
> 
> So the question is why is the 302 stuff not being called if
> the original invite was redirected. 
> 
> 
> 
>  if (is_method("INVITE")) {
>          
>                
> xlog("method invite in route 1 \n");
>                
> #lookup("location");
>                
> if(uri=~"sip:.+ at 172.228.136.190:5060" )
>                 {
>                
>   xlog( "Forwarding to Asterisk \n");
>                
>    rewritehostport("172.228.136.190:5062");
>                
>     xlog("rewritten RURI  [$ru] \n");
>                
>    t_relay();
>                
>    exit;
>                 }
>         
>         
>                
> t_on_branch("2");
>                
> t_on_reply("2");   
>                
> t_on_failure("1");
>         }
> 
> 
> Thanks
> 
> 
>       
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 


      



More information about the Users mailing list