<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Dear Bogdan ,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I Fix it by setting do_routing() instead of route(7) with t_relay <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Bogdan-Andrei Iancu [mailto:bogdan@opensips.org] <br><b>Sent:</b> Wednesday, May 15, 2013 8:36 PM<br><b>To:</b> OpenSIPS users mailling list<br><b>Cc:</b> M.Khaled W Chehab; users-bounces@lists.opensips.org<br><b>Subject:</b> Re: [OpenSIPS-Users] LRN numbers<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><tt><span style='font-size:10.0pt'>Hello,</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><br><tt>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.</tt><br><br><tt>Regards,</tt><br><br></span><o:p></o:p></p><pre>Bogdan-Andrei Iancu<o:p></o:p></pre><pre>OpenSIPS Founder and Developer<o:p></o:p></pre><pre><a href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a><o:p></o:p></pre><p class=MsoNormal><br>On 05/13/2013 04:28 PM, M.Khaled W Chehab wrote: <o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hi again,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>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</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>CRITICAL:tm:w_t_reply: unsupported route_type (8)</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>ERROR:signaling:sig_send_reply_mod: failed to send reply with tm module</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>if ($rU=~"^.") {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(7);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(1);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>route[1] {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (subst_uri('/(<a href="sip:.*">sip:.*</a>);nat=yes/\1/')) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> setbflag(6);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (isflagset(5)) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> # for INVITEs enable some additional helper routes</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (is_method("INVITE")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_on_branch("2");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_on_reply("2");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_on_failure("1");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> avp_db_query("UPDATE `opensips`.`invites` set `trunkip` ='$rd' where `CALLID` = '$ci' ");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> } else if (is_method("BYE")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> setflag(1); # do accounting ...</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> setflag(3); #transaction falis</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> setflag(4); #CDR Table</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("----------------------------------------Route 1 Bye---------------");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> } else if (is_method("ACK")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> # call answered an ACKed, start billing here</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> } else if (is_method("CANCEL")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> # call cancelled by caller, do clean up here' ");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (!t_relay()) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si------#11###Reply: $T_reply_code\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> send_reply("500","Internal Error");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> };</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>route[7]{</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>if (!do_routing("$avp(Cusid)","FW")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> send_reply("404","No PSTN Route found");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>route[6] {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>if ( use_next_gw() ) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> $var(prefix) = $(avp(gw_attrs){csv.value,1});</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> $rU = $var(prefix) + $avp(dst);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----Calling number to Next Provier $rU\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> setflag(26); #Missed calls</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_on_failure("1");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_relay();</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>branch_route[2] {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----new branch at $ru\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(7);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>}</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>failure_route[1] {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (!t_check_status("302")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (!next_routing()){</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "LRN - Unable to DIP");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_reply("500","Unable to DIP");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "LRN - Unable to DIP - Trying Next");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_on_failure("1");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> t_relay();</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit; </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (!$(<reply>ct.fields(uri){param.value,rn})){</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "LRN - No redirect information found");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(1);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }else if ($(<reply>ct.fields(uri){param.value,rn}) == $tU){</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "LRN - Returned same number, no need to redirect");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(1);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }else{ </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("LRN-----$rU-------Else lRN $avp(lrnct)---------");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> $rU=$avp(lrnct);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("LRN-----$rU-------Else lRN $avp(lrnct)---------");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(1);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (t_was_cancelled()) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$si-----Call Canceled--SIP Reason:$T_reply_code\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "##########==========End of invite for Customer ID:$avp(Cusid)/IP:$si--Over $rd====on_route_failure_1======##########3 \n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> avp_db_query("delete FROM `invites` WHERE `CALLID` ='$ci'");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> exit;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (t_check_status("481") ) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> acc_db_request("200 Dialog Timeout", "acc");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("-----Reply: $T_reply_code#----------481-422-487--#####$rm from $si (callid=$ci)######################################");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> # If fr_timer expires t_check_status("408") is true, although $rs is <null></span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (t_check_status("(408)|(5[0-9][0-9])")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> #xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$rd-----Delete Invite #####$rd Reply: $T_reply_code#######14\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog( "L_NOTICE", "[$Tf] FR: $ci -- TIMEOUT for Gateway $rd (marking as bad)\n" );</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if( t_check_status("[4-6][0-9][0-9]")){</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "--Debug Customer ID:$avp(Cusid)/IP:$rd-----$si Reply: $T_reply_code#######13\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> xlog("L_INFO", "##########==========End of invite ID:$avp(Cusid)/IP:$rd###############\n");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> #xlog( "L_NOTICE", "[$Tf] FR: $ci ------$rd----------Delete 2--------------\n" );</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> avp_db_query("delete FROM `invites` WHERE `CALLID` ='$ci'");</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> if (!t_check_status("487")) {</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> #$avp(failure_count) = $avp(failure_count) + 1; 480|486|603</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> route(6);</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> }</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>}</span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><pre><o:p> </o:p></pre><pre><o:p> </o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>Users mailing list<o:p></o:p></pre><pre><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><o:p></o:p></pre><pre><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></pre></div></body></html>