[asterisk-users] Extracting custom headers from SIP REFER

CSB kjcsb at xnet.co.nz
Tue Nov 6 16:52:04 CST 2007


Asterisk 1.4.12

I wish to extract some custom headers from a SIP REFER message but am unable
to do so. However I can extract them from an INVITE. The code is:

exten => _.,n,Set(custom-id=${SIP_HEADER(custom-id)}) ;

exten => _.,n,Set(custom-valid=${SIP_HEADER(custom-valid)}) ; 

 

Examples of the INVITE (works) and REFER (doesn't) messages are below.

 

U 147.202.001.001:5060 -> 127.0.0.1:5065

INVITE sip:0116499123123 at 127.0.0.1:5065 SIP/2.0

Via: SIP/2.0/UDP 147.202.001.001;branch=z9hG4bK8b04.6e642c74.0

To: <sip:0116499123123 at 127.0.0.1:5065>

From: <sip:6495566778 at domain.co.nz>;tag=119438778730084

CSeq: 1 INVITE

Call-ID: 119438778730084

Content-Length: 142

User-Agent: OpenSer (1.1.1-notls (i386/linux))

Contact: <sip:6495566778 at 147.202.001.001:5060>

Custom-id: 1100012

Custom-valid: 24702670246

Content-Type: application/sdp

 

v=0

o=click-to-dial 0 0 IN IP4 0.0.0.0

s=session

c=IN IP4 0.0.0.0

t=0 0

m=audio 9 RTP/AVP 0

a=rtpmap:8 PCMA/8000

a=rtpmap:0 PCMU/8000

           

 

U 147.202.001.001:5060 -> 147.202.001.001:5065

REFER sip:0116499123123 at 147.202.001.001:5065 SIP/2.0

Via: SIP/2.0/UDP 147.202.001.001;branch=z9hG4bK5b04.66fc0aa2.0

To: <sip:0116499123123 at 127.0.0.1:5065>;tag=as383b22fe

From: <sip:6495566778 at domain.co.nz>;tag=119438778730084

CSeq: 2 REFER

Call-ID: 119438778730084

Content-Length: 0

User-Agent: OpenSer (1.1.1-notls (i386/linux))

Contact: <sip:6495566778 at 147.202.001.001:5060>

Custom-id: 1100012

Custom-valid: 24702670246

Referred-By: <sip:6495566778 at domain.co.nz>

Refer-To: sip:0116499744530 at 127.0.0.1:5065

 

Is this a limitation of Asterisk or am I missing something?

 

Regards

 

Cameron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20071107/32deec83/attachment.htm 


More information about the asterisk-users mailing list