[OpenSIPS-Users] Call Forward

duane.larson at gmail.com duane.larson at gmail.com
Tue Mar 1 20:49:54 CET 2011


I don't believe 483 really means UNAVAILABLE. It means "TOO MANY HOPS".  
Somewhere in your script logic you are missing something and it is looping.  
You need to ngrep and see what is truly going on and also place some XLOGs  
in your script to figure this out. Your IF statement in your Failure Route  
for 483 will never be true because the
if (!mf_process_maxfwd_header("5")) {

xlog("L_INFO","LOOP [$fd/$fu/$rd/$ru/$si/]\n");

sl_send_reply("483","Unavailable");

exit;

}
is going to catch it and end the loop.


On Mar 1, 2011 11:28am, Juri Nysschen <juri at greydotelecom.com> wrote:
> Hi All, I am trying to call forward when the destination agent is not  
> registered/available on the proxy. The relevant routes are below. On a  
> 486 BUSY it works perfectly ! At the top of my route block I have: if  
> (!mf_process_maxfwd_header("5")) { xlog("L_INFO","LOOP  
> [$fd/$fu/$rd/$ru/$si/]\n"); sl_send_reply("483","Unavailable"); exit; }  
> so if the UA is not registered to the proxy and it cannot find it, 483 is  
> returned on the INVITE. on 483 if I use the same code as on 486:  
> revert_uri(); prefix("171"); rewritehostport("XXXX:5060"); t_relay(); It  
> seems to endlessly loop, eventually giving header errors. In both cases  
> the INVITE is called using:  
> do_routing("1");lookup("location");route(1);exit; What am I missing?  
> Surely it should act the same in both cases. route[1] {  
> xlog("L_INFO","Route1 [$fd/$fu/$rd/$ru/$si/]\n"); if  
> (is_method("INVITE")) { t_on_branch("1"); t_on_failure("1");  
> xlog("L_INFO","Route1 INVITE [$fd/$fu/$rd/$ru/$si/]\n");  
> if(has_body("application/sdp")){ xlog("L_INFO","Route1 INVITE has SDP  
> [$fd/$fu/$rd/$ru/$si/]\n"); if (rtpproxy_offer()){ xlog("L_INFO","Route1  
> INVITE Proxy Offered [$fd/$fu/$rd/$ru/$si/]\n"); t_on_reply("1"); } else  
> { t_on_reply("3"); }; } else { xlog("L_INFO","Route1 INVITE No SDP  
> [$fd/$fu/$rd/$ru/$si/]\n"); t_on_reply("2"); } } if (is_method("ACK") &&  
> has_body("application/sdp")){ xlog("L_INFO","Route1 INVITE ACK with SDP  
> Answer Proxy [$fd/$fu/$rd/$ru/$si/]\n"); rtpproxy_answer(); } if  
> (is_method("BYE")){ xlog("L_INFO","Route1 BYE [$fd/$fu/$rd/$ru/$si/]\n");  
> } if (!t_relay()) { sl_reply_error(); }; } branch_route[1] {  
> xlog("L_INFO","Branch Route1 [$fd/$fu/$rd/$ru/$si/]\n"); setflag(3); #  
> start db accounting} failure_route[1] { xlog("L_INFO","Failure Route1  
> [$fd/$fu/$rd/$ru/$si/]\n"); if (t_was_cancelled()) {  
> xlog("L_INFO","Failed on Cancel [$fd/$fu/$rd/$ru/$si/]\n"); exit; } if  
> (t_check_status("6[0-9]")) { xlog("L_INFO","Global Failure on Congestion  
> [$fd/$fu/$rd/$ru/$si/]\n"); exit; } if (t_check_status("486")){ # Divert  
> on BUSY xlog("L_INFO","Call Forward on BUSY [$fd/$fu/$rd/$ru/$si/]\n");  
> revert_uri(); prefix("171"); rewritehostport("XXXX:5060"); t_relay();  
> exit; }; if (t_check_status("483")){ # Divert on UNAVAILABLE  
> xlog("L_INFO","Call Forward on UNAVAILABLE not available  
> [$fd/$fu/$rd/$ru/$si/]\n"); exit; }; } RegardsJuri Nysschen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110301/90e1c90f/attachment.htm>


More information about the Users mailing list