<div><div dir="auto">Hello,</div></div><div dir="auto"><br></div><div dir="auto">As far as I can tell, the regex is wrong.</div><div dir="auto">It only matches 5 or 6, 0 or 9, 0 or 9.</div><div dir="auto">Try this regex: [56][0-9][0-9]</div><div dir="auto"><br></div><div dir="auto"><div><div><a href="https://regex101.com/r/rJpwGW/1">https://regex101.com/r/rJpwGW/1</a></div><br></div><div dir="auto">Regards,</div><div dir="auto"><br></div><div dir="auto">Grant</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 22 Feb 2020 at 17:08 Social Boh <<a href="mailto:social@bohboh.info">social@bohboh.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello list,<br>
<br>
I'm testing DISPATCHER module and how i can see, the INVITE never go to <br>
failure route if the first Gateway fail.<br>
<br>
My configuration:<br>
<br>
route[DISP] {<br>
         if(!ds_select_dst("1","9")) {<br>
                         send_reply("404", "No destination");<br>
                         exit;<br>
                 }<br>
         update_stat("load_sip:$dd", "+1");<br>
         t_on_failure("DISPATCHER_FAILURE");<br>
         route(relay);<br>
         exit;<br>
}<br>
<br>
failure_route[DISPATCHER_FAILURE] {<br>
        if (t_was_cancelled()) {<br>
                 exit;<br>
         }<br>
<br>
         if (t_check_status("[56][09][09]"))  {<br>
                 if(ds_next_dst()) {<br>
                         t_on_failure("DISPATCHER_FAILURE");<br>
                         t_relay();<br>
                         exit;<br>
                 }<br>
                 else {<br>
                         send_reply("404", "No destination");<br>
                         exit;<br>
                 }<br>
         }<br>
}<br>
<br>
I can see the function ds_select_dst select 2 GATEWAY, y con see the <br>
list of GATEWAY, but if I receive a 503 error from the first GATEWAY the <br>
request never pass for FAILURE ROUTE.<br>
<br>
changing if(!ds_select_dst("1","9")) {<br>
<br>
with<br>
<br>
if(!ds_select_dst("1","9","f")) {<br>
<br>
or using other alghoritm not solve.<br>
<br>
Any light, please?<br>
<br>
-- <br>
---<br>
I'm SoCIaL, MayBe<br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div></div>