[OpenSIPS-Users] build custom SIP header from ENUM query

Andrew Melton amelton at gmail.com
Wed Jul 3 02:04:25 CEST 2013


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.


For example this response:

0.6.0.5.9.2.2.9.4.9.1.e164.org. 103 IN NAPTR   100 50 "u" "E2U+pstn:sip"
"!^(.*)$!tel:\\1\;npdi\;rn=12139350001\;spid=979E!" .

results in a 302:

U 2013/07/02 20:40:03.902255 10.251.1.123:5060 -> 192.168.1.1:5060 SIP/2.0
302 Redirect
Via: SIP/2.0/UDP 10.251.1.123:5060;branch=z9hG4bK1580013244rdb178
To: <sip:+19492295555 at 192.168.1.1>;tag=e62e844df37eed41859feb28dd9c191b.e058
From: <sip:2135551212 at 10.251.1.123;otg=000622>;tag=580013244rdb178
Call-ID: lnp-264160668-1-2940542680 at 10.251.1.123
CSeq: 1 INVITE
Contact: <tel:+19492295555;npdi;rn=12139350001;spid=979E>;q=0.99
Content-Length: 0

I would like to add an additional header to the 302, containing some other
information, such as 'wireless':

U 2013/07/02 20:40:03.902255 10.251.1.123:5060 -> 192.168.1.1:5060 SIP/2.0
302 Redirect
Via: SIP/2.0/UDP 10.251.1.123:5060;branch=z9hG4bK1580013244rdb178
To: <sip:+19492295555 at 192.168.1.1>;tag=e62e844df37eed41859feb28dd9c191b.e058
From: <sip:2135551212 at 10.251.1.123;otg=000622>;tag=580013244rdb178
Call-ID: lnp-264160668-1-2940542680 at 10.251.1.123
CSeq: 1 INVITE
Contact: <tel:+19492295555;npdi;rn=12139350001;spid=979E>;q=0.99
Content-Length: 0
X-Phone-Type:  Wireless

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)?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130702/34e458cb/attachment-0001.htm>


More information about the Users mailing list