cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5986
Views
15
Helpful
19
Replies

SIP profile for Incoming Dial-peer

jeesemon.91
Level 1
Level 1

Hi Guys,

i want to copy the "To" field from incoming sip message from service provider and send to cucm in "To" field. as of now the red highlighted number is send in "To"field to CUCM. but i want to send the blue highlighted number in "To"Field to CUCM, can anyone help on this?

 

Received:
INVITE sip:62283000@10.0.92.178:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.92.14:5060;branch=z9hG4bK10f2482b327b5ee7698btaN0
To: "283009"<sip:283009@10.0.92.14>
From: "04467487500"<sip:4467487500@10.0.92.14>;tag=aa2cf06-Dvtb10ff92a2a7
Call-ID: 41ba10ff92a3-0167-0191@10.162.207.6
CSeq: 4541 INVITE
Max-Forwards: 8
Contact: <sip:4467487500@10.0.92.14>
Supported: 100rel
User-Agent: ZTE Softswitch/1.0.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Content-Type: application/sdp
Content-Length: 176

 

 

19 Replies 19

R0g22
Cisco Employee
Cisco Employee
Use a copylist on the incoming dial-peer. Use the copied attributes to modify header with a sip profile on the outgoing dial-peer -

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/copy_sip_headers.pdf

pqueued
Level 1
Level 1

This should do what you're looking for.

 

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"

 

You can test this and other sip profiles here: https://cway.cisco.com/tools/SipProfileTest/

Hi guys, thanks for the quick revert, still no luck,

my requirement is below blue highlighted number should be in "TO" when it send to CUCM. 

INVITE sip:62283000@10.0.92.178:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.92.14:5060;branch=z9hG4bK10f2482b327b5ee7698btaN0
To: "283009"<sip:283009@10.0.92.14>
From: "04467487500"<sip:4467487500@10.0.92.14>;tag=aa2cf06-Dvtb10ff92a2a7
Call-ID: 41ba10ff92a3-0167-0191@10.162.207.6
CSeq: 4541 INVITE
Max-Forwards: 8
Contact: <sip:4467487500@10.0.92.14>
Supported: 100rel
User-Agent: ZTE Softswitch/1.0.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Content-Type: application/sdp
Content-Length: 176

v=0
o=ZTE 380 7154 IN IP4 10.0.92.14
s=phone-call
c=IN IP4 10.0.92.14
t=0 0
m=audio 37318 RTP/AVP 8 0 18 97
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=ptime:20

 

Actual Message send to CUCM, the number chnaged as 62283000, instead of this number i want the blue highlited number in above message recieved from the service provider 

 

Sent:
INVITE sip:62283000@10.1.60.121:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.60.126:5060;branch=z9hG4bK7D3AC51
From: "04467487500" <sip:4467487500@10.0.92.14>;tag=6DA60234-26EB
To: <sip:62283000@10.1.60.121>
Date: Mon, 26 Feb 2018 16:10:15 GMT
Call-ID: 5D4C19D9-1A4611E8-A46DA27E-59154B99@10.1.60.126
Supported: timer,resource-priority,replaces
Min-SE: 1800
Cisco-Guid: 1565188337-0440799720-2758255230-1494567833
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1519661415
Contact: <sip:4467487500@10.1.60.126:5060>
Expires: 180
Allow-Events: telephone-event

 

Did you go through the link shared ? What config is being used ? Share it here please.

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

 

voice class sip-copylist 1
sip-header TO

 

applied this to incoming dial peer

In your profile you are adding u01 variable to Request URI and not "To"header -

 

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

 

 

Could you please let me know what exact change i need to be done

Can you share what SIP invite is coming as input to CUBE and how do you want it to go to CUCM.

Hi Saurabh,

PFB details,

Invite coming to the CUBE

INVITE sip:62283000@10.0.92.178:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.92.14:5060;branch=z9hG4bK10f2482b327b5ee7698btaN0
To: "283009"<sip:283009@10.0.92.14>
From: "04467487500"<sip:4467487500@10.0.92.14>;tag=aa2cf06-Dvtb10ff92a2a7
Call-ID: 41ba10ff92a3-0167-0191@10.162.207.6
CSeq: 4541 INVITE
Max-Forwards: 8
Contact: <sip:4467487500@10.0.92.14>
Supported: 100rel
User-Agent: ZTE Softswitch/1.0.0
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,REFER,NOTIFY,SUBSCRIBE,PRACK,UPDATE
Content-Type: application/sdp
Content-Length: 176

v=0
o=ZTE 380 7154 IN IP4 10.0.92.14
s=phone-call
c=IN IP4 10.0.92.14
t=0 0
m=audio 37318 RTP/AVP 8 0 18 97
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=ptime:20

Feb 26 16:10:15.014: //70255/5D4AE0F1A467/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.0.92.14:5060;branch=z9hG4bK10f2482b327b5ee7698btaN0
From: "04467487500"<sip:4467487500@10.0.92.14>;tag=aa2cf06-Dvtb10ff92a2a7
To: "283009"<sip:283009@10.0.92.14>
Date: Mon, 26 Feb 2018 16:10:15 GMT
Call-ID: 41ba10ff92a3-0167-0191@10.162.207.6
CSeq: 4541 INVITE
Allow-Events: telephone-event
Server: Cisco-SIPGateway/IOS-12.x
Content-Length: 0

 

Invite send to CUCM

Sent:
INVITE sip:62283000@10.1.60.121:5060 SIP/2.0
Via: SIP/2.0/UDP 10.1.60.126:5060;branch=z9hG4bK7D3AC51
From: "04467487500" <sip:4467487500@10.0.92.14>;tag=6DA60234-26EB
To: <sip:62283000@10.1.60.121>
Date: Mon, 26 Feb 2018 16:10:15 GMT
Call-ID: 5D4C19D9-1A4611E8-A46DA27E-59154B99@10.1.60.126
Supported: timer,resource-priority,replaces
Min-SE: 1800
Cisco-Guid: 1565188337-0440799720-2758255230-1494567833
User-Agent: Cisco-SIPGateway/IOS-12.x
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1519661415
Contact: <sip:4467487500@10.1.60.126:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 7
P-Asserted-Identity: "04467487500" <sip:4467487500@10.1.60.126>
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 177

v=0
o=ZTE 380 7154 IN IP4 10.0.92.14
s=phone-call
c=IN IP4 10.1.60.126
t=0 0
m=audio 18400 RTP/AVP 8 0 18 97
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=ptime:20

 

 

You can see the "To" field is changing as 62283000 while sent to CUCM,  instead i want to keep this as 283009.

It would have been helpful if you would have read through the document that was shared. You are trying to modify the To header

voice class sip-profiles 2
request INVITE peer-header sip TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1" >>>> replace "SIP-Req-URI" with "To", obviously without the inverts.

 

If it does not work, take the following debugs with the config in place -

 

debug voip ccapi inout
debug ccsip mess
debug ccsip info
debug ccsip feature sip-profile

 

 

R0g22
Cisco Employee
Cisco Employee
Did you try the configuration here ? Did you take the logs requested ?

Can you also share running configs of your CUBE.

PFA for running conf

Hi
For more details you can refer to :
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/copy_sip_headers.pdf

But here are the sample configs which i tested in lab

voice class sip-profiles 1
request INVITE peer-header sip TO copy ".*:(.*)@" u01
request INVITE sip-header To modify "<sip:.*@(.*)>" "\u01<sip:\u01@\1>"
voice class sip-copylist 100
sip-header To

and for dial-peer

dial-peer voice 1 voip #inbound dial-peer
session protocol sipv2
incoming called-number .
voice-class sip profiles 1
voice-class sip copy-list 100
dial-peer voice 2 voip #outbound dialpeer
destination-pattern 2....
session protocol sipv2
session target ipv4:10.105.193.200
voice-class sip profiles 1
privilege configure level 15 dial-peer

Will check your running config and update you. Till then you can try above solution