02-27-2018 07:03 AM - edited 03-17-2019 12:18 PM
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
02-27-2018 09:02 AM
02-27-2018 11:24 AM - edited 02-27-2018 11:25 AM
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/
02-27-2018 09:14 PM
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
02-28-2018 12:44 AM
02-28-2018 02:12 AM
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
02-28-2018 04:35 AM
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"
03-01-2018 12:36 AM
Could you please let me know what exact change i need to be done
03-01-2018 05:20 AM
03-01-2018 07:36 AM
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.
03-01-2018 07:56 AM
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
03-02-2018 12:48 PM
03-01-2018 08:44 AM
Can you also share running configs of your CUBE.
03-01-2018 09:56 AM
03-01-2018 10:01 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide