<!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 text="#000000" bgcolor="#ffffff">
<tt>Hello Andrew,<br>
<br>
Before sending back the 3xx reply, use the append_to_reply()
function to add additional headers:<br>
<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id249127">http://www.opensips.org/html/docs/modules/1.9.x/sipmsgops.html#id249127</a><br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<br>
On 07/03/2013 03:04 AM, Andrew Melton wrote:
<blockquote
cite="mid:CAB_4pdNUQhKxJHi6phBA21h3NVeMxXtW+Q_BZakgn121KzmWvg@mail.gmail.com"
type="cite">
<div dir="ltr">We are currently using ENUM query to determine the
LRN for a ported number. This works fine, but now I am looking
for a way to return some value in the NAPTR response which can
be added as a custom header to a 302 response.
<div>
<br>
</div>
<div>For example this response:</div>
<div><br>
</div>
<div>
<div><a moz-do-not-send="true"
href="http://0.6.0.5.9.2.2.9.4.9.1.e164.org">0.6.0.5.9.2.2.9.4.9.1.e164.org</a>.
103 IN NAPTR 100 50 "u" "E2U+pstn:sip"
"!^(.*)$!tel:\\1\;npdi\;rn=12139350001\;spid=979E!" .</div>
</div>
<div><br>
</div>
<div>results in a 302:</div>
<div><br>
</div>
<div>U 2013/07/02 20:40:03.902255 <a moz-do-not-send="true"
href="http://10.251.1.123:5060">10.251.1.123:5060</a> ->
<a moz-do-not-send="true" href="http://192.168.1.1:5060">192.168.1.1:5060</a>
SIP/2.0 302 Redirect<br>
</div>
<div>
<div>Via: SIP/2.0/UDP
10.251.1.123:5060;branch=z9hG4bK1580013244rdb178</div>
<div>To: <<a moz-do-not-send="true"
href="mailto:sip%3A%2B19492295555@192.168.1.1">sip:+19492295555@192.168.1.1</a>>;tag=e62e844df37eed41859feb28dd9c191b.e058</div>
<div>From: <<a moz-do-not-send="true"
href="mailto:sip%3A2135551212@10.251.1.123">sip:2135551212@10.251.1.123</a>;otg=000622>;tag=580013244rdb178</div>
<div>Call-ID: <a moz-do-not-send="true"
href="mailto:lnp-264160668-1-2940542680@10.251.1.123">lnp-264160668-1-2940542680@10.251.1.123</a></div>
<div>CSeq: 1 INVITE</div>
<div>Contact:
<tel:+19492295555;npdi;rn=12139350001;spid=979E>;q=0.99</div>
<div>Content-Length: 0<br>
</div>
</div>
<div><br>
</div>
<div>I would like to add an additional header to the 302,
containing some other information, such as 'wireless':</div>
<div><br>
</div>
<div>
<div>U 2013/07/02 20:40:03.902255 <a moz-do-not-send="true"
href="http://10.251.1.123:5060">10.251.1.123:5060</a>
-> <a moz-do-not-send="true"
href="http://192.168.1.1:5060">192.168.1.1:5060</a>
SIP/2.0 302 Redirect<br>
</div>
<div>
<div>Via: SIP/2.0/UDP
10.251.1.123:5060;branch=z9hG4bK1580013244rdb178</div>
<div>To: <<a moz-do-not-send="true"
href="mailto:sip%3A%2B19492295555@192.168.1.1">sip:+19492295555@192.168.1.1</a>>;tag=e62e844df37eed41859feb28dd9c191b.e058</div>
<div>From: <<a moz-do-not-send="true"
href="mailto:sip%3A2135551212@10.251.1.123">sip:2135551212@10.251.1.123</a>;otg=000622>;tag=580013244rdb178</div>
<div>Call-ID: <a moz-do-not-send="true"
href="mailto:lnp-264160668-1-2940542680@10.251.1.123">lnp-264160668-1-2940542680@10.251.1.123</a></div>
<div>CSeq: 1 INVITE</div>
<div>Contact:
<tel:+19492295555;npdi;rn=12139350001;spid=979E>;q=0.99</div>
<div>Content-Length: 0</div>
</div>
</div>
<div>X-Phone-Type: Wireless</div>
<div><br>
</div>
<div>Does either the sipmsgops.so or enum.so modules have a way
to use a portion of the NAPTR response to create (append_hf) a
custom header (i.e. X-Phone-Type)?</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>