<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 15 (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:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@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 lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Dears,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’m trying drouting module in kamailio , it’s working good when first gateway in the list is up , yet when first gateway is unrecheable , it’s not rerouted to second destination, meaning that fail over is not working.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kindly find attached wireshark trace I’m getting .<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Below is db entries I’m using :<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>dr_gateways:<o:p></o:p></p><p class=MsoNormal><img width=680 height=72 id="_x0000_i1033" src="cid:image011.jpg@01D097AD.76336340"><o:p></o:p></p><p class=MsoNormal>Dr_gw_lists<o:p></o:p></p><p class=MsoNormal><img width=479 height=68 id="_x0000_i1032" src="cid:image008.png@01D097AD.3535F790"><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Dr_groups:<o:p></o:p></p><p class=MsoNormal><img width=1130 height=66 id="_x0000_i1031" src="cid:image009.png@01D097AD.3535F790"><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Dr_rules:<o:p></o:p></p><p class=MsoNormal><img width=820 height=87 id="Picture_x0020_9" src="cid:image010.png@01D097AD.3535F790"><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Below is routing block I’m using :<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>request_route{<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>if (is_method("INVITE"))<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                                if (!do_routing("0")) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                                send_reply("503", "Test No Rules matching the URI");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                                exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                                route(10);<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                                exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'><o:p> </o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>}<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>route[10] {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    if (!do_routing("0")) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        xlog("do_routing: No rules matching the URI\n");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        send_reply("503","No rules matching the URI");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>                <o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    if (is_method("INVITE")) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        t_on_failure("4");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    route(1);<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>}<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>failure_route[4] {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    xlog("DEBUG: DROUTING failure route active\n");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    if (t_check_status("[34][0-9][0-9]")) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    if (use_next_gw()) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        t_relay();<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    } else {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    t_reply ("503", "Service not available");<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>    }<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>}<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>route[1] {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        # send it out now; use stateful forwarding as it works<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        # reliably even for UDP2TCP<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        if (!t_relay()) {<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>         sl_reply_error();<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        };<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>        exit;<o:p></o:p></span></p><p class=MsoNormal><span style='background:silver;mso-highlight:silver'>}</span><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Appreciating your prompt reply and assistance.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=713 style='width:534.8pt;margin-left:9.9pt;border-collapse:collapse'><tr style='height:29.65pt'><td width=61 rowspan=2 valign=top style='width:45.45pt;border:none;border-right:solid #D9D9D9 1.0pt;padding:0in 5.4pt 0in 5.4pt;height:29.65pt'><p class=MsoNormal style='line-height:115%'><span style='font-size:1.0pt;line-height:115%;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:9.0pt;line-height:115%;color:#1F497D'><img width=46 height=46 id="Picture_x0020_8" src="cid:image001.png@01D097AC.43F0FBA0" alt="Description: Description: cid:image001.png@01CDB75E.FF3A44B0"><o:p></o:p></span></p></td><td width=609 colspan=3 valign=top style='width:457.1pt;padding:0in 5.4pt 0in 5.4pt;height:29.65pt'><p class=MsoNormal style='line-height:115%'><b><span style='font-size:2.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#2F3F66'><o:p> </o:p></span></b></p><p class=MsoNormal style='line-height:115%'><b><span style='font-size:9.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>Ali Taher<o:p></o:p></span></b></p><p class=MsoNormal style='line-height:115%'><i><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>Technical Support Engineer<o:p></o:p></span></i></p><p class=MsoNormal style='line-height:115%'><i><span style='font-size:4.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'><o:p> </o:p></span></i></p></td><td width=34 style='width:25.8pt;padding:0in 0in 0in 0in;height:29.65pt'><p class=MsoNormal><span style='color:#1F497D'> <o:p></o:p></span></p></td></tr><tr style='height:29.6pt'><td width=66 colspan=2 valign=top style='width:49.45pt;padding:0in 5.4pt 0in 5.4pt;height:29.6pt'><p class=MsoNormal style='line-height:115%'><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>T&F          </span></b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'><o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>M<o:p></o:p></span></b></p><p class=MsoNormal style='line-height:115%'><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>W<o:p></o:p></span></b></p><p class=MsoNormal style='line-height:115%'><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>A</span></b><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#365F91'><o:p></o:p></span></b></p></td><td width=587 colspan=2 valign=top style='width:439.9pt;padding:0in 5.4pt 0in 5.4pt;height:29.6pt'><p class=MsoNormal style='line-height:115%'><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'>+961-5-457437 </span><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>Ext</span></b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'> 215<o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'>+961-70-010600<o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='color:#1F497D'><a href="http://www.vanrise.com/"><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'>http://www.vanrise.com</span></a></span><u><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'> <o:p></o:p></span></u></p><p class=MsoNormal style='line-height:115%'><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'><a href="https://maps.google.com/maps/ms?msa=0&msid=208243362929850217065.0004cbc8d612c5f9b4237&ie=UTF8&t=h&vpsrc=0&z=19&iwloc=0004cbc8e4652b4edf71cC:\Users\Marie\Documents\My%20Received%20Files"><span style='color:blue'>Vanrise Building</span></a>, Facing Galerie Semaan<o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'>Hazmiyeh Highway – Beirut, Lebanon<o:p></o:p></span></p></td></tr><tr style='height:.3in'><td style='border:none;border-right:solid #D9D9D9 1.0pt;padding:0in 0in 0in 0in;height:.3in'><p class=MsoNormal style='line-height:115%'><span style='font-size:9.0pt;line-height:115%;color:#1F497D'><o:p> </o:p></span></p></td><td width=652 colspan=4 style='width:489.35pt;padding:0in 5.4pt 0in 5.4pt;height:.3in'><p class=MsoNormal style='line-height:115%'><i><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#17365D'><img border=0 width=95 height=13 id="Picture_x0020_7" src="cid:image002.png@01D097AC.43F0FBA0" alt="Description: Description: cid:image002.png@01CDB75E.FF3A44B0"></span></i><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'><o:p></o:p></span></p></td></tr><tr style='height:22.45pt'><td width=119 colspan=2 valign=top style='width:89.1pt;padding:0in 0in 0in 0in;height:22.45pt'><p class=MsoNormal align=right style='text-align:right;line-height:115%'><i><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#215868'>Join us at<o:p></o:p></span></i></p></td><td width=594 colspan=3 valign=top style='width:445.7pt;padding:0in 5.4pt 0in 5.4pt;height:22.45pt'><p class=MsoNormal style='line-height:115%'><span style='color:#1F497D'> </span><a href="http://www.facebook.com/pages/Vanrise-Solutions-Offshore/128309743915533"><span style='color:#1F497D;text-decoration:none'><img border=0 width=25 height=25 id="Picture_x0020_6" src="cid:image003.png@01D097AC.43F0FBA0" alt="Description: Description: cid:image006.png@01CDB760.3643AA40"></span></a><span style='color:#1F497D'> </span><a href="http://www.linkedin.com/company/vanrise-solutions"><span style='color:#1F497D;text-decoration:none'><img border=0 width=25 height=25 id="Picture_x0020_5" src="cid:image004.png@01D097AC.43F0FBA0" alt="Description: Description: cid:image007.png@01CDB760.3643AA40"></span></a><span style='color:#1F497D'> </span><a href="http://twitter.com/VanriseSolution"><span style='color:#1F497D;text-decoration:none'><img border=0 width=25 height=25 id="Picture_x0020_4" src="cid:image005.png@01D097AC.43F0FBA0" alt="Description: Description: cid:image008.png@01CDB760.3643AA40"></span></a><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='line-height:115%'><b><span style='font-size:8.0pt;line-height:115%;font-family:"Verdana",sans-serif;color:#5E5E5E'><o:p> </o:p></span></b></p></td></tr><tr><td width=61 style='width:45.75pt;padding:0in 0in 0in 0in'></td><td width=58 style='width:43.5pt;padding:0in 0in 0in 0in'></td><td width=8 style='width:6.0pt;padding:0in 0in 0in 0in'></td><td width=544 style='width:408.0pt;padding:0in 0in 0in 0in'></td><td width=43 style='width:32.25pt;padding:0in 0in 0in 0in'></td></tr></table><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>