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 <[email protected]> wrote: > From: Nauman Sulaiman <[email protected]> > Subject: [OpenSIPS-Users] 302 not being handled by failure route > To: [email protected] > 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:[email protected]: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 > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
