Bogdan,<div><br></div><div>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.</div>
<div><br></div><div><br></div><div>Kent,</div><div><br></div><div>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:</div>
<div><br></div><div>$var(lrnct) = $ct;</div><div>if !($(var(lrnct){param.value,rn}) == '') {</div><div> $var(call_lrn1) = $(var(lrnct){param.value,rn});</div><div> #.... more processing to clean up any leading 1's or +1s</div>
<div>}</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>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.</div><div><br></div><div><br></div><div>- Jeff</div><div>
<br>
<br><br><div class="gmail_quote">On Tue, Nov 22, 2011 at 9:27 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div bgcolor="#ffffff" text="#000000">
Hi Kpirlo,<br>
<br>
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
(<a href="http://www.opensips.org/html/docs/modules/1.7.x/uac_redirect.html#id250367" target="_blank">http://www.opensips.org/html/docs/modules/1.7.x/uac_redirect.html#id250367</a>)
in order to extract the redirect contacts from the reply and push
them as new destinations.<br>
<br>
Regards,<br>
Bogdan<div><div class="h5"><br>
<br>
On 11/20/2011 08:04 PM, Kpirlo wrote:
</div></div><blockquote type="cite"><div><div class="h5">We are currently using the Dynamic routing module for
our least cost routing.
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Thank you in advance for any help. </div>
<div><br>
</div>
<div>Kent</div>
</div></div><pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
<pre cols="72">--
Bogdan-Andrei Iancu
OpenSIPS solutions and "know-how"</pre>
</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>