[OpenSIPS-Users] ENUM routing
Eddie Chan
e.chan at ivstel.com
Fri Jan 10 00:07:57 CET 2014
Thanks very much, Razvan. It works!
-----Original Message-----
From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of R?zvan Crainea
Sent: Thursday, January 09, 2014 6:42 PM
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] ENUM routing
Hi, Eddie!
By default OpenSIPS uses parallel forking for all the branches, created by
the enum_query() function in your case. If you want to use serial forking,
you should call the serialize_branches() function[1] after creating the
branches.
[1] http://www.opensips.org/Documentation/Script-CoreFunctions-1-10#toc44
Best regards,
Razvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 01/08/2014 11:49 PM, Eddie Chan wrote:
> Hi all,
>
> We are trying to integrate OpenSIP (1.10) with our ENUM server. We
> are having issue with ENUM routing in OpenSIP.
>
> Currently, opensips will try all the gateways from the ENUM response
> simultaneously regardless of the priority of the routes.
>
> Once it receives the first response from a gateway, then it will
> cancel the other INVITEs.
>
> We would like to route based on the gateway list ordered by priority
> sequentially. If the first route fails, then try the next one and so on.
>
> This way assure the call will try the most favorable (cheapest)
> gateway first.
>
> The following is the relevant code that handles ENUM. Am I missing
> something. Is there a way to change the routing behavior to route the
> call sequentially based on ENUM priority?
>
> $var(ret) = enum_query("$avp(domain)");
>
> if ($var(ret)==1) {
>
> route(relay);
>
> exit;
>
> }
>
> route[relay] {
>
> 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;
>
> }
>
> Thanks in advance.
>
> Eddie
>
>
>
> _______________________________________________
> Users mailing list
> 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
More information about the Users
mailing list