<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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-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'>Hi,<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 set in dr_rules #lebanon as a carrier route to terminate the rule that match 777961 ,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Please find below the output for your script <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>loadmodule "drouting.so"<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "db_url", "virtual://set1") # CUSTOMIZE ME<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "use_domain", 1)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drd_table", "dr_gateways")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drr_table", "dr_rules")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drg_table", "dr_groups")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drc_table", "dr_carriers")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drg_user_col", "username")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drg_domain_col", "domain")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "drg_grpid_col", "groupid")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "force_dns", 1)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>#frequency of probing per paramete in seconds<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "probing_interval", 120)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "probing_method", "OPTIONS")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "probing_from", "sip:pinger@opensips")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "probing_reply_codes", "487")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>#501, 403,404,<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "use_domain", 1)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "gw_attrs_avp", '$avp(gw_attrs)')<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "gw_id_avp", '$avp(gw_id)')<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting", "rule_attrs_avp", '$avp(rule_attrs)')<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","ruri_avp", "$avp(dr_ruri)")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","rule_id_avp", "$avp(dr_rule)")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","rule_attrs_avp", "$avp(dr_rule_attrs)")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","rule_prefix_avp", "$avp(dr_rule_prefix)")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","carrier_id_avp", "$avp(dr_cr)")<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in;text-autospace:none'><span style='color:windowtext'>modparam("drouting","carrier_attrs_avp", "$avp(dr_cr_attrs)")</span><span style='font-size:9.0pt;color:windowtext'><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'><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'>GW IDs are : <null> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>GW ATTRs are : <null> <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>CR IDs are : Lebanon, Lebanon, Lebanon, Lebanon, <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>CR ATTRs are : , , , , <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>RULE: id=104, , attrs=0, , prefix=777961, <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'><o:p> </o:p></span></p><table class=MsoNormalTable border=0 cellpadding=0 style='background:whitesmoke'><thead><tr><td colspan=3 valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60&goto=tbl_structure.php&display_options_form=1&display_text=F&token=4c290d9fc747fadbbb216f2d571c00ef"><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";text-decoration:none'><img border=0 width=50 height=20 id="Picture_x0020_3" src="cid:image001.png@01CE566E.3F4C4F40" alt="Description: Full Texts"></span></b></a><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60id%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>id</span></a><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60carrierid%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>carrierid</span></a><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60gwlist%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>gwlist</span></a><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60flags%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>flags</span></a><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60attrs%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>attrs</span></a><o:p></o:p></span></b></p></td><td valign=top style='background:#D3DCE3;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=SELECT+%2A+FROM+%60dr_carriers%60+ORDER+BY+%60dr_carriers%60.%60description%60+ASC&token=4c290d9fc747fadbbb216f2d571c00ef" title=Sort><span style='text-decoration:none'>description</span></a><o:p></o:p></span></b></p></td></tr></thead><tr><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><a href="http://5.104.224.33/phpmyadmin/tbl_change.php?db=opensips&table=dr_carriers&where_clause=%60dr_carriers%60.%60id%60+%3D+14&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60dr_carriers%60&goto=sql.php&token=4c290d9fc747fadbbb216f2d571c00ef"><span style='font-size:10.0pt;font-family:"Arial","sans-serif";text-decoration:none'><img border=0 width=16 height=16 id="Picture_x0020_2" src="cid:image002.png@01CE566E.3F4C4F40" alt="Description: Edit"></span></a><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=center style='margin:1.2pt;text-align:center'><a href="http://5.104.224.33/phpmyadmin/sql.php?db=opensips&table=dr_carriers&sql_query=DELETE+FROM+%60opensips%60.%60dr_carriers%60+WHERE+%60dr_carriers%60.%60id%60+%3D+14&zero_rows=The+row+has+been+deleted&goto=sql.php%3Fdb%3Dopensips%26table%3Ddr_carriers%26sql_query%3DSELECT%2B%252A%2BFROM%2B%2560dr_carriers%2560%26zero_rows%3DThe%2Brow%2Bhas%2Bbeen%2Bdeleted%26goto%3Dtbl_structure.php%26token%3D4c290d9fc747fadbbb216f2d571c00ef&token=4c290d9fc747fadbbb216f2d571c00ef"><span style='font-size:10.0pt;font-family:"Arial","sans-serif";text-decoration:none'><img border=0 width=16 height=16 id="Picture_x0020_1" src="cid:image003.png@01CE566E.3F4C4F40" alt="Description: Delete"></span></a><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=right style='margin:1.2pt;text-align:right'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>14<o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal style='margin:1.2pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Lebanon<o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal style='margin:1.2pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Dahdah_JVS,Bics,IDT,Snell_93<o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal align=right style='margin:1.2pt;text-align:right'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>0<o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal style='margin:1.2pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p></td><td valign=top style='background:#FFCC99;padding:1.2pt 6.0pt 1.2pt 6.0pt'><p class=MsoNormal style='margin:1.2pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p></td></tr><tr height=0><td width=49 style='border:none'></td><td width=37 style='border:none'></td><td width=37 style='border:none'></td><td width=35 style='border:none'></td><td width=73 style='border:none'></td><td width=207 style='border:none'></td><td width=51 style='border:none'></td><td width=48 style='border:none'></td><td width=92 style='border:none'></td></tr></table><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>And the problem still exists, please advice<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Regards<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'><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> Tuesday, May 21, 2013 8:00 PM<br><b>To:</b> OpenSIPS users mailling list<br><b>Cc:</b> M.Khaled W Chehab<br><b>Subject:</b> Re: [OpenSIPS-Users] Do_Routing problem<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 can check what do_routing() set (as GWs to be used) by adding this in your script (just after do_routing):</tt><br><br><tt> xlog("Destinations are: $ru $(avp(dr_ruri)[*]) \n");</tt><br><tt> xlog("GW IDs are : $(avp(dr_gw)[*]) \n");</tt><br><tt> xlog("GW ATTRs are : $(avp(dr_gw_attrs)[*]) \n");</tt><br><tt> xlog("CR IDs are : $(avp(dr_cr)[*]) \n");</tt><br><tt> xlog("CR ATTRs are : $(avp(dr_cr_attrs)[*]) \n");</tt><br><tt> xlog("RULE: id=$(avp(dr_rule)[*]), attrs=$(avp(dr_rule_attrs)[*]), prefix=$(avp(dr_rule_prefix)[*]) \n");</tt><br><br><tt>Be sure you have these params set:</tt><br><br><tt>modparam("drouting","ruri_avp", "$avp(dr_ruri)")</tt><br><tt>modparam("drouting","gw_id_avp", "$avp(dr_gw)")</tt><br><tt>modparam("drouting","gw_attrs_avp", "$avp(dr_gw_attrs)")</tt><br><tt>modparam("drouting","rule_id_avp", "$avp(dr_rule)")</tt><br><tt>modparam("drouting","rule_attrs_avp", "$avp(dr_rule_attrs)")</tt><br><tt>modparam("drouting","rule_prefix_avp", "$avp(dr_rule_prefix)")</tt><br><tt>modparam("drouting","carrier_id_avp", "$avp(dr_cr)")</tt><br><tt>modparam("drouting","carrier_attrs_avp", "$avp(dr_cr_attrs)")</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/21/2013 06:17 PM, M.Khaled W Chehab wrote: <o:p></o:p></p><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>I am using opensips 1.8.3<o:p></o:p></p><p class=MsoNormal>I set three gateways in carrier route , the call always go to the 1st and jump to third gateway and ignores the second<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Moreover I can see in debug level 4 , <o:p></o:p></p><p class=MsoNormal>DBG:drouting:push_gw_for_usage: adding gw [gw1] in order 0 adding gw [gw2] in order 1 adding gw [gw3] in order 3<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>But using wireshark I can just see the invite to the first and the third <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Please advice<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>