cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
5143
Views
15
Helpful
7
Replies
Highlighted
Participant

Diversion Header for all Outbound Calls

Hello,

 

We have a hospital with about 15 or so sites each with their own PRI and we are switching to a Centralized SIP solution. We are using Call Manager with a CUBE. We will be gradually switching users to use the new SIP, however we want to display the Main Hospital Number as the Caller ID when users call out. Since we have not ported the Main number to the SIP trunk yet the carrier is not letting us do that. They said if we send the Authorized number in the Diversion Header then we can send any number as the From number. And that works, if I forward a phone we can send any number as the Caller ID. But I want to send the main number out for every outbound call not just forwarded calls

 

I have tried to send the Diversion Header for every outbound call but that does not seem to be working. 

I have added this to the SIP PRofile on my CUBE

 request INVITE sip-header Diversion add "<sip:3015551212@ccmpeer.ia.lumos.net>"

 

But it does not seem to add a Diversion Header to my Invite. And outbound calls do not work

 

I have also adjusted  a combination of the following but nothing seems to be working. 

request INVITE sip-header Contact modify “<sip:(.*)@(.*)>” <sip:3015551212@1,1,1,1>"

request INVITE sip-header P-Asserted-Identity modify "<sip:(.*)@(.*)>" "<sip:3015551212@1.1.1.1>"

I see these changes on my Invite but the call still does not go through 

 

So my question is is it possible to set a Diversion Header on every outbound call? Or is should I go back to the carrier and figure out what they want?

 

Thanks for your help. 

7 REPLIES 7
Highlighted
Hall of Fame Master

The diversion add should work however you may be stripping more than you want. Can you please send debug ccsip messages without the SIP profile applied and one with it applied?

Highlighted

Hello Thanks for the Reply. 

 

Here is without the Profile Added. The number I want displayed is 3013451000

 


2245321: Nov 6 09:28:11.582: //7022965/B60815000007/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:17038758000@ccmpeer.ia.lumos.net:5060 SIP/2.0
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA715E6
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=423E18F8-1D5D
To: <sip:17038758000@ccmpeer.ia.lumos.net>
Date: Mon, 06 Nov 2017 14:28:11 GMT
Call-ID: 8D2CCC49-C23511E7-99D491C6-BE708709@216.12.1.1
Supported: 100rel,timer,resource-priority,replaces,sdp-anat

Min-SE: 1800
Cisco-Guid: 3053982976-0000065536-0000472748-0369171116
User-Agent: Cisco-SIPGateway/IOS-15.2.4.M6a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1509978491
Contact: <sip:3013451000@216.12.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: <sip:3013451000@216.12.1.1>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 285

v=0
o=CiscoSystemsSIP-GW-UserAgent 2661 6075 IN IP4 216.12.1.1
s=SIP Call
c=IN IP4 216.12.1.1
t=0 0

m=audio 30704 RTP/AVP 0 18 101
c=IN IP4 216.12.1.1
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16

2245322: Nov 6 09:28:11.594: //7022965/B60815000007/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA715E6
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=423E18F8-1D5D
To: <sip:17038758000@ccmpeer.ia.lumos.net>
Call-ID: 8D2CCC49-C23511E7-99D491C6-BE708709@216.12.1.1
CSeq: 101 INVITE
Timestamp: 1509978491


2245323: Nov 6 09:28:11.618: //7022965/B60815000007/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 604 Does not exist anywhere

Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA715E6
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=423E18F8-1D5D
To: <sip:17038758000@ccmpeer.ia.lumos.net>;tag=1656288022-1509978491596
Call-ID: 8D2CCC49-C23511E7-99D491C6-BE708709@216.12.1.1
CSeq: 101 INVITE
Timestamp: 1509978491
Content-Length: 0


2245324: Nov 6 09:28:11.618: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
ACK sip:17038758000@ccmpeer.ia.lumos.net:5060 SIP/2.0
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA715E6
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=423E18F8-1D5D
To: <sip:17038758000@ccmpeer.ia.lumos.net>;tag=1656288022-1509978491596
Date: Mon, 06 Nov 2017 14:28:11 GMT
Call-ID: 8D2CCC49-C23511E7-99D491C6-BE708709@216.12.1.1
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Content-Length: 0

 

 

 

Here is the debug with this profile added. 3014187931 is the allowed number on the trunk. Notice how it just added that line at the end of the invite message with any headers. 

Here is the current Profile

voice class sip-profiles 1
request INVITE sip-header Diversion modify "<sip:(.*)@(.*)>" "<sip:3014187931@ccmpeer.ia.lumos.net>"
request ANY sip-header Diversion modify "<sip:(.*)@(.*)>" "<sip:3014187931@ccmpeer.ia.lumos.net>"
request Invite sip-header Diversion add "<sip:3014187931@ccmpeer.ia.lumos.net>"

 

 

 

 


2245363: Nov 6 09:31:28.981: //7023027/2B73E5800007/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:17038758000@ccmpeer.ia.lumos.net:5060 SIP/2.0
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA8E7B
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=42411C10-23DA
To: <sip:17038758000@ccmpeer.ia.lumos.net>
Date: Mon, 06 Nov 2017 14:31:28 GMT
Call-ID: 2D6A802-C23611E7-9A1691C6-BE708709@216.12.1.1
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 0729015680-0000065536-0000472805-0369171116
User-Agent: Cisco-SIPGateway/IOS-15.2.4.M6a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1509978688

Contact: <sip:3013451000@216.12.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: <sip:3013451000@216.12.1.1>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 285
<sip:3014187931@ccmpeer.ia.lumos.net>

v=0
o=CiscoSystemsSIP-GW-UserAgent 6049 8220 IN IP4 216.12.1.1
s=SIP Call
c=IN IP4 216.12.1.1
t=0 0
m=audio 29996 RTP/AVP 0 18 101
c=IN IP4 216.12.1.1
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

2245364: Nov 6 09:31:28.989: //7023027/2B73E5800007/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA8E7B
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=42411C10-23DA
To: <sip:17038758000@ccmpeer.ia.lumos.net>
Call-ID: 2D6A802-C23611E7-9A1691C6-BE708709@216.12.1.1
CSeq: 101 INVITE
Timestamp: 1509978688


2245365: Nov 6 09:31:29.005: //7023027/2B73E5800007/SIP/Msg/ccsipDisplayMsg:
Received:
SIP/2.0 604 Does not exist anywhere
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA8E7B
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=42411C10-23DA
To: <sip:17038758000@ccmpeer.ia.lumos.net>;tag=829146030-1509978688996
Call-ID: 2D6A802-C23611E7-9A1691C6-BE708709@216.12.1.1
CSeq: 101 INVITE
Timestamp: 1509978688

Content-Length: 0


2245366: Nov 6 09:31:29.005: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
ACK sip:17038758000@ccmpeer.ia.lumos.net:5060 SIP/2.0
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BA8E7B
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=42411C10-23DA
To: <sip:17038758000@ccmpeer.ia.lumos.net>;tag=829146030-1509978688996
Date: Mon, 06 Nov 2017 14:31:28 GMT
Call-ID: 2D6A802-C23611E7-9A1691C6-BE708709@216.12.1.1
Max-Forwards: 70
CSeq: 101 ACK
Allow-Events: telephone-event
Content-Length: 0

Highlighted

You should do something like this:

 

request INVITE sip-header Diversion add "<sip:3014187931@ccmpeer.ia.lumos.net>;privacy=off;reason=deflection;screen=yes"

 

 

Highlighted

Thank you. That still did not work. Notice that SIP profile just seems to be adding that Diversion statement at the end of the INVITE packet without labeling it. 

 

Sent:
INVITE sip:17038758000@ccmpeer.ia.lumos.net:5060 SIP/2.0
Via: SIP/2.0/UDP 216.12.1.1:5060;branch=z9hG4bK13BAAB44
From: <sip:3013451000@ccmpeer.ia.lumos.net>;tag=425CAEAC-BA1
To: <sip:17038758000@ccmpeer.ia.lumos.net>
Date: Mon, 06 Nov 2017 15:01:35 GMT
Call-ID: 37E3947E-C23A11E7-9DFC91C6-BE708709@216.12.1.1
Supported: 100rel,timer,resource-priority,replaces,sdp-anat
Min-SE: 1800
Cisco-Guid: 1619146496-0000065536-0000473297-0369171116

User-Agent: Cisco-SIPGateway/IOS-15.2.4.M6a
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1509980495
Contact: <sip:3013451000@216.12.1.1:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: <sip:3013451000@216.12.1.1>
Session-Expires: 1800
Content-Type: application/sdp
Content-Disposition: session;handling=required
Content-Length: 285
<sip:3014187931@ccmpeer.ia.lumos.net>;privacy=off;reason=deflection;screen=yes

v=0
o=CiscoSystemsSIP-GW-UserAgent 9744 8241 IN IP4 216.12.1.1
s=SIP Call
c=IN IP4 216.12.1.1
t=0 0
m=audio 30330 RTP/AVP 0 18 101

Highlighted

A couple of ways worked for me in the past. You could try using a translation rule:

 

voice translation-rule 1

 rule 1 /.*/ /3014187931/

 

voice translation-profile OUTBOUND

 translate redirect-called 1

 

This inserted Diversion Header for me even if there was no Diversion Header from CUCM.

 

If using SIP profiles, try this:

request INVITE sip-header From modify "From:(.*)<sip:(.*)@(.*)" "From:\1<sip:\2@\3\x0ADiversion: <sip:3014187931@10.1.1.1:5060>"

 

That "x0A" inserts a newline so you'll have Diversion Header right after From line in outgoing INVITE.

 

You could also modify it so it inserts Diversion Header only if the call is coming from a specific calling number range:

request INVITE sip-header From modify "From:(.*)<sip:3013451(.*)@(.*)" "From:\1<sip:3013451\2@\3\x0ADiversion: <sip:3014187931@10.1.1.1:5060>"

 

Highlighted

 

thank you for the reply. 

 

We figured out how to make it work. We were missing the "Diversion" tag in the original Sip Profile 

 

request INVITE sip-header Diversion add "Diversion: <sip:3014187931@ccmpeer.ia.lumos.net>"

Highlighted

Indeed, I missed that in my answer as well, +5.