[OpenSIPS-Users] Dispatcher failure route

Grant Bagdasarian grantbagdasarian at gmail.com
Sat Feb 22 22:06:18 EST 2020


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> 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
> 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/a8fb5a6c/attachment.html>


More information about the Users mailing list