<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Jeff,<br>
<br>
Well, according to RFC3261, a Contact hdr must carry a valid SIP URI
- now, in dip lookups, the answer is added as params to the SIP URI
or to the CT SIP hdr...depending...<br>
<br>
If you uac_redirect does not server your purpose (like answer in in
CT hdr params), you can access the hdr directly like getting params
: <font size="3"><font color="#909090">$(<reply>ct.fields(params))</font></font><br>
<br>
Regards,<br>
Bogdan<br>
<br>
On 11/23/2011 03:25 PM, Jeff Pyle wrote:
<blockquote
cite="mid:CACYJG3LnCFcAOqSQ8AwQ6LdUA8b+P+YnST3hQorLVVJMahmEnw@mail.gmail.com"
type="cite">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
moz-do-not-send="true" href="mailto:bogdan@opensips.org">bogdan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<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 moz-do-not-send="true"
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>
<br>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
OpenSIPS solutions and "know-how"</pre>
</body>
</html>