[OpenSIPS-Users] outbound routing distinguish

Răzvan Crainea razvan at opensips.org
Thu Feb 2 11:27:44 UTC 2023


Hi, Pat!

What do you mean by "internal calls fail"? If you don't want to route 
calls between extensions, I would expect the DISPATCH_OUT to be called 
in the main route, rather on branch route.

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 2/1/23 17:41, Pat M via Users wrote:
> Konichiwa
> 
> I have some extensions registered to opensips and i want to route calls 
> to dispatcher but not calls between extensions
> 
> but when i enable dispatcher internal calls fail
> so if i uncomment #route(DISPATCH_OUT); it will try send any call to 
> dispatcher
> here is my code, what am i missing?
> 
> Please help
> 
> if (!lookup("location","m")) {
>                  t_reply(404, "Not Found");
>                  exit;
>          }
> }
> 
> 
> 
>          # when routing via usrloc, log the missed calls also
>          do_accounting("log","missed");
>          route(relay);
> }
> route[relay] {
>          # for INVITEs enable some additional helper routes
>          if (is_method("INVITE")) {
> 
> 
> 
>                  t_on_branch("per_branch_ops");
>                  t_on_reply("handle_nat");
>                  t_on_failure("missed_call");
>          }
> 
> 
>          if (!t_relay()) {
>                  send_reply(500,"Internal Error");
>          }
>          exit;
> }
> 
> 
> 
> 
> branch_route[per_branch_ops] {
>          xlog("new branch at $ru\n");
> #route(DISPATCH_OUT);
> }
> 
> route[DISPATCH_OUT] {
>          if (!ds_select_dst(1, 0)) {
>          xlog("ERROR: no active destinations found!\n");
>          send_reply(503, "Service Unavailable");
>          exit;
> }
> 
>          t_relay();
>          exit;
> }
> 
> 
> 
> 
> Sent with Proton Mail <https://proton.me/> secure email.
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list