[OpenSIPS-Users] Dispatcher failure route
A. Sannucci
asannucci at voztovoice.net
Sat Feb 22 22:44:48 EST 2020
You right,
but with the new configuration, same result: debugging DISPATCHER:
Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
DBG:dispatcher:ds_select_dst: set [1], using alg [9], size [2], used
size [2], active size [2]
Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
DBG:dispatcher:ds_select_dst: chosen count: 1
Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
DBG:dispatcher:ds_select_dst: selected [9-1/-1] <sip:XXX.XXX.XXX.XXX:5060>
Feb 22 17:41:41 sip2 /sbin/opensips[15970]:
DBG:dispatcher:ds_select_dst: using entry [1/0]
Actual configuration:
route[DISP] {
if(!ds_select_dst("1","9","f M 5")) {
send_reply("404", "No destination");
exit;
}
update_stat("load_sip:$dd", "+1");
t_on_failure("DISPATCHER_FAILURE");
route(relay);
exit;
}
failure_route[DISPATCHER_FAILURE] {
if (t_was_cancelled()) {
exit;
}
if (t_check_status("[56][0-9][0-9]")) {
if(ds_next_dst()) {
t_on_failure("DISPATCHER_FAILURE");
t_relay();
exit;
}
else {
send_reply("404", "No destination");
exit;
}
}
}
CEO - VozToVoice - Talking around the World
Web: www.voztovoice.net
E-Mail: info at voztovoice.net
Canal Telegram: @voztovoice
Telefonos:
Linea Gratuita: 018005184359
Colombia Cel. +573163435746
Miami +13057288631
El 22/02/2020 a las 17:06, Grant Bagdasarian escribió:
> Hello,
>
> As far as I can tell, the regex is wrong.
> It only matches 5 or 6, 0 or 9, 0 or 9.
> Try this regex: [56][0-9][0-9]
>
> https://regex101.com/r/rJpwGW/1
>
> Regards,
>
> Grant
>
> On Sat, 22 Feb 2020 at 17:08 Social Boh <social at bohboh.info
> <mailto:social at bohboh.info>> wrote:
>
> Hello list,
>
> I'm testing DISPATCHER module and how i can see, the INVITE never
> go to
> failure route if the first Gateway fail.
>
> My configuration:
>
> route[DISP] {
> if(!ds_select_dst("1","9")) {
> send_reply("404", "No destination");
> exit;
> }
> update_stat("load_sip:$dd", "+1");
> t_on_failure("DISPATCHER_FAILURE");
> route(relay);
> exit;
> }
>
> failure_route[DISPATCHER_FAILURE] {
> if (t_was_cancelled()) {
> exit;
> }
>
> if (t_check_status("[56][09][09]")) {
> if(ds_next_dst()) {
> t_on_failure("DISPATCHER_FAILURE");
> t_relay();
> exit;
> }
> else {
> send_reply("404", "No destination");
> exit;
> }
> }
> }
>
> I can see the function ds_select_dst select 2 GATEWAY, y con see the
> list of GATEWAY, but if I receive a 503 error from the first
> GATEWAY the
> request never pass for FAILURE ROUTE.
>
> changing if(!ds_select_dst("1","9")) {
>
> with
>
> if(!ds_select_dst("1","9","f")) {
>
> or using other alghoritm not solve.
>
> Any light, please?
>
> --
> ---
> I'm SoCIaL, MayBe
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200222/3498bbf3/attachment-0001.html>
More information about the Users
mailing list