[OpenSIPS-Users] outbound routing distinguish

Pat M miagi_son at proton.me
Wed Feb 1 15:41:56 UTC 2023


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230201/227f5e6d/attachment.html>


More information about the Users mailing list