[OpenSIPS-Users] LRN dips with Dynamic Routing
Jeff Pyle
jpyle at fidelityvoice.com
Wed Nov 23 14:25:45 CET 2011
Bogdan,
I don't think the uac_redirect module in this case is helpful. The Contact
data that comes back from an LRN DIP's 302 isn't a real SIP URI, but rather
just some routing data that happens to be using a 302's Contact field as a
transport mechanism.
Kent,
Sorry for the late reply... I do not. I use string transformations to
yank out the portions I need. Something like this in the onreply_route
from a 302 dip:
$var(lrnct) = $ct;
if !($(var(lrnct){param.value,rn}) == '') {
$var(call_lrn1) = $(var(lrnct){param.value,rn});
#.... more processing to clean up any leading 1's or +1s
}
I do not use the drouting module because my config is too old. I use a
combination of the lcr module to load gateways for a particular carrier, or
if a carrier has only one IP/hostname, I pull it directly from a DB into an
AVP and route to it.
I take the LRN data from the DIP along with some other items
(jurisdiction/ani/etc) and feel it to a Perl script to do the actual LCR
carrier selection. I keep all my carriers' rates in separate DB tables and
use mysql stored functions to normalize the rate lookup into a standard
format used by a while loop in the Perl script. The rate function name
that gets called is another usr_preference per carrier.
I certainly don't pretend this is the most efficient way, but it does all
our needs better than anything else I have been able to come up with.
- Jeff
On Tue, Nov 22, 2011 at 9:27 AM, Bogdan-Andrei Iancu <bogdan at opensips.org>wrote:
> **
> Hi Kpirlo,
>
> When sending the call to the dip provider, use a failure route in order to
> catch the 3xx reply you get back. In the failure route, use the
> uac_redirect module with the get_redirects() function (
> http://www.opensips.org/html/docs/modules/1.7.x/uac_redirect.html#id250367)
> in order to extract the redirect contacts from the reply and push them as
> new destinations.
>
> Regards,
> Bogdan
>
>
> On 11/20/2011 08:04 PM, Kpirlo wrote:
>
> We are currently using the Dynamic routing module for our least cost
> routing.
>
> Now we are looking at implementing an LRN dipping service, where we will
> send the call to a dip provider first and receive a 302 redirect back which
> will have the LRN returned in the contact header as "rn=" if the number has
> been ported or will include ";npdi" in the contact header if it has not
> been ported.
>
> Im asking for any advice anyone has on how to implement this and how it
> could work with dymanic routing to choose the route based on rn if
> available, but actually send the call using the original "to" number.
>
> Thank you in advance for any help.
>
> Kent
>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS solutions and "know-how"
>
>
> _______________________________________________
> 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/20111123/796bc1c8/attachment.htm>
More information about the Users
mailing list