cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1098
Views
1
Helpful
3
Replies

Refer to To Header on the SIP gateway.

Nikhil.ranjan
Level 1
Level 1

Hi There,

 

I am implementing Sip on the Voice gateway. I am facing a challenge while converting the DID number. My service provider is giving me the DID number in the TO header field on the gateway. But I am using the INVITE field to get the number which is the Pilot number. I want to refer to the TO field on the message so I can get the DID. 

 

Can anyone kindly help on the same. 

 

 

This is the invite message that we are receiving from the service provider.

Received:
INVITE sip:Pilot Number@IP:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP IP:5060;branch=z9hG4bKd1m1y3zyb3l2ne0dlmqy3m3m4;Role=3;Hpt=8ef2_36
Call-ID: asbc30671c4175ed-0131-0225@IP
From: "Called Number"<sip:Called Number@IP>;tag=aa2c806-u0Qv1c4175ec83
To: "DID Number"<sip:DID Number@IP>
CSeq: 575 INVITE
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Contact: <sip:Called Number@IP:5060;Hpt=8ef2_16;CxtId=4;TRC=ffffffff-ffffffff>
Max-Forwards: 8

 

 

This is the invite message that is being sent to the Call Manager. 

 

Sent:
INVITE sip:Pilot Number@IP:5060 SIP/2.0
Via: SIP/2.0/UDP IP:5060;branch=z9hG4bK10CB1DB4
From: "Called Number" <sip:Called Number@IP>;tag=1ED3987F-45A
To: <sip:Pilot Number@IP>
Date: Mon, 29 Jan 2018 19:34:41 GMT
Call-ID: 2F4E9531-43411E8-A6C8F82F-BCD36C17@10.31.235.45
Supported: timer,resource-priority,replaces

 

 

1 Accepted Solution

Accepted Solutions

Hi,

You can match inbound dialpeer and have sip-profile to copy TO header to
Req-URI header as below.

voice class sip-profiles 1
request INVITE sip-header TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

voice service voip
sip
sip-profiles inbound
sip-profiles 1 inbound


View solution in original post

3 Replies 3

Hi,

You can match inbound dialpeer and have sip-profile to copy TO header to
Req-URI header as below.

voice class sip-profiles 1
request INVITE sip-header TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"

voice service voip
sip
sip-profiles inbound
sip-profiles 1 inbound


Also I need to add add P-Preferred-Identity header with <Pilot Number@SBC IP> in the INVITE message for the outgoing calls. 

 

How this can be done 

 

Do you get any privacy headers on the incoming leg ?