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

Reply via email to