Dear Bogdan ,
I Fix it by setting do_routing() instead of route(7) with t_relay Thanks From: Bogdan-Andrei Iancu [mailto:[email protected]] Sent: Wednesday, May 15, 2013 8:36 PM To: OpenSIPS users mailling list Cc: M.Khaled W Chehab; [email protected] Subject: Re: [OpenSIPS-Users] LRN numbers Hello, You get that error as signaling functions are not allowed in branch route - you invoke there route[7] which tried to send back a reply - the reply sending function is not allowed in branch route. Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer http://www.opensips-solutions.com On 05/13/2013 04:28 PM, M.Khaled W Chehab wrote: Hi again, I fix it using the below code but still there is a mistake since I can find the below error, please can you check if I am coding in correct way CRITICAL:tm:w_t_reply: unsupported route_type (8) ERROR:signaling:sig_send_reply_mod: failed to send reply with tm module if ($rU=~"^.") { route(7); route(1); exit; route[1] { if (subst_uri('/(sip:.*);nat=yes/\1/')) { setbflag(6); } if (isflagset(5)) { search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes'); } # for INVITEs enable some additional helper routes if (is_method("INVITE")) { t_on_branch("2"); t_on_reply("2"); t_on_failure("1"); avp_db_query("UPDATE `opensips`.`invites` set `trunkip` ='$rd' where `CALLID` = '$ci' "); } else if (is_method("BYE")) { setflag(1); # do accounting ... setflag(3); #transaction falis setflag(4); #CDR Table xlog("----------------------------------------Route 1 Bye---------------"); } else if (is_method("ACK")) { # call answered an ACKed, start billing here } else if (is_method("CANCEL")) { # call cancelled by caller, do clean up here' "); } if (!t_relay()) { xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si------#11###Reply: $T_reply_code\n"); send_reply("500","Internal Error"); }; exit; } route[7]{ if (!do_routing("$avp(Cusid)","FW")) { send_reply("404","No PSTN Route found"); exit; } } route[6] { if ( use_next_gw() ) { $var(prefix) = $(avp(gw_attrs){csv.value,1}); $rU = $var(prefix) + $avp(dst); xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----Calling number to Next Provier $rU\n"); setflag(26); #Missed calls t_on_failure("1"); t_relay(); exit; } } branch_route[2] { xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----new branch at $ru\n"); route(7); } failure_route[1] { if (!t_check_status("302")) { if (!next_routing()){ xlog("L_INFO", "LRN - Unable to DIP"); t_reply("500","Unable to DIP"); exit; } xlog("L_INFO", "LRN - Unable to DIP - Trying Next"); t_on_failure("1"); t_relay(); exit; } if (!$(<reply>ct.fields(uri){param.value,rn})){ xlog("L_INFO", "LRN - No redirect information found"); route(1); }else if ($(<reply>ct.fields(uri){param.value,rn}) == $tU){ xlog("L_INFO", "LRN - Returned same number, no need to redirect"); route(1); }else{ xlog("LRN-----$rU-------Else lRN $avp(lrnct)---------"); $rU=$avp(lrnct); xlog("LRN-----$rU-------Else lRN $avp(lrnct)---------"); route(1); } if (t_was_cancelled()) { xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----Call Canceled--SIP Reason:$T_reply_code\n"); xlog("L_INFO", "##########==========End of invite for Customer ID:$avp(Cusid)/IP:$si--Over $rd====on_route_failure_1======##########3 \n"); avp_db_query("delete FROM `invites` WHERE `CALLID` ='$ci'"); exit; } if (t_check_status("481") ) { acc_db_request("200 Dialog Timeout", "acc"); xlog("-----Reply: $T_reply_code#----------481-422-487--#####$rm from $si (callid=$ci)######################################"); } # If fr_timer expires t_check_status("408") is true, although $rs is <null> if (t_check_status("(408)|(5[0-9][0-9])")) { #xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$rd-----Delete Invite #####$rd Reply: $T_reply_code#######14\n"); xlog( "L_NOTICE", "[$Tf] FR: $ci -- TIMEOUT for Gateway $rd (marking as bad)\n" ); } if( t_check_status("[4-6][0-9][0-9]")){ xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$rd-----$si Reply: $T_reply_code#######13\n"); xlog("L_INFO", "##########==========End of invite ID:$avp(Cusid)/IP:$rd###############\n"); #xlog( "L_NOTICE", "[$Tf] FR: $ci ------$rd----------Delete 2--------------\n" ); avp_db_query("delete FROM `invites` WHERE `CALLID` ='$ci'"); if (!t_check_status("487")) { #$avp(failure_count) = $avp(failure_count) + 1; 480|486|603 route(6); } } } _______________________________________________ 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
