Getting data from a diversion header


#1

Does anyone know if there is a way to get to the data in a diversion header of a SIP Invite?

<----INVITE sip:Anonymous@10.112.35.13;Transport=udp SIP/2.0!
From:"5728"sip:5728@10.112.35.14:5060;user=phone;vnd.pimg.port=2;tag=00B33246313536410030486E!
To:sip:Anonymous@10.112.35.13!
Content-Type:application/sdp!
Diversion: tel:6405 ;reason=unconditional!
Call-ID:01B22BE09A81400000000219@vm.PIMG01.domain.com!
CSeq:1 INVITE!
Allow-Events:refer,message-summary!
Expires:120!
Via:SIP/2.0/UDP 10.112.35.14:5060!
Contact:sip:5728@10.112.35.14:5060!
User-Agent:PBX-IP Media Gateway !
Max-Forwards:70!
Supported:100rel,timer,replaces!
Content-Length:293!
!
v=0!
o=phone 31469 0 IN IP4 10.112.35.14!
s=-!
c=IN IP4 10.112.35.14!
t=0 0!
m=audio 49542 RTP/AVP 0 8 101!
a=rtpmap:0 PCMU/8000/1!
a=rtpmap:8 PCMA/8000/1!
a=rtpmap:101 telephone-event/8000!
a=fmtp:101 0-15!
m=image 0 udptl t38!
a=T38FaxRateManagement:transferredTCF!
a=T38FaxUdpEC:t38UDPFEC!

My intent here would be to route the call directly to voice mail to have the caller (number in the To header) leave a message in the mailbox for the person in the Diversion header.


#2

I believe ${SIP_HEADER(Diversion)} works for your purpose.