cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
202
Views
0
Helpful
0
Replies
Highlighted
Participant

CFA External Issue, SIP Normalization

CUCM 11.5 with CUBE.

 

User B: Call Forward All to 1-800-273-8255

User A: (1000) calls User B:(2000)

Redirecting Diversion Header Delivery - Outbound ( Checked)

 

Calling Number is: User-A(DID MASK).

Everything is fine until then.

 

External PSTN User: (1-800-273-8255) calls User B:(2000)

Call fails, from header sent to ITSP is my mobile number.

I understand this is normal scenario and I would like to avoid the CUCM changes.

 

FROM CUCM:

 

Received:
INVITE sip:18002738255@GATEWAY-IP:5060 SIP/2.0
Via: SIP/2.0/TCP CUCM-IP:5060;branch=z9hG4bK3a04667120917
From: <sip:2025550191(MY_MOBILE)@CUCM-IP>;tag=2359521~e4075e8e-2Db3-4f16-b7d0-8e1642c64577-3340579279
To: <sip:18002738255(CFA:#)@GATEWAY-IP>
Date: Wed, 14 Nov 2018 10:01:51 GMT
Call-ID: 4d4a5700-beb1f28f-330d8-b15a050a@CUCM-IP
Supported: timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM11.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=MIXED
Session-ID: 222222222222222;remote=00000000000000000000000000000000
Cisco-Guid: 129647175dd68-00000f65536-0000022955-2975466762
Session-Expires: 1800
Diversion: <sip:2000@CUCM-IP>;reason=unconditional;privacy=off;screen=yes
P-Asserted-Identity: <sip:2025550191@CUCM-IP>
Remote-Party-ID: <sip:2025550191@CUCM-IP>;party=calling;screen=yes;privacy=off
Contact: <sip:2025550191@CUCM-IP:5060;transport=tcp>
Max-Forwards: 67
Content-Length: 0

 

 

ITSP doesn't support Diversion header so I have to remove it on the outgoing dial-peer to ITSP.

 

Options(at least I think)

  •  If SIP INVITE from CUCM contains Diversion header then:
    •  Its doesn't match any extension that are only 4 Digits in the from field From: <sip:XXXX>
    • Copy the diversion header and replace the From header:
      • Diversion: <sip:2000@CUCM-IP> replace the From:<sip:2025550191(MY_MOBILE)@CUCM-IP> with From: <sip:701200@Gateway-IP>
      • Remove Diversion Header

 

If this can be done in the cucm with lua script, I'm ready to try it.

 

Thanks.

 

 

 

Edit:

 

I half way there, I can now Copy the diversion header and place into the From header with a mask.

 

 

voice class sip-profiles 1
request INVITE sip-header Diversion copy "<sip:(.*)@.*" u01
request INVITE sip-header From copy ".*<sip:(.*)@.*" u02
request INVITE sip-header From modify "<sip:@" "<sip:\u02@"
request INVITE sip-header From modify "(.*)<sip:.*@(.*)" "\1<sip:686\u01@\2"
request ANY sip-header Diversion remove

 

 

Output:

Received:
INVITE sip:18002738255@GATEWAY-IP:5060 SIP/2.0
Via: SIP/2.0/TCP CUCM-IP:5060;branch=z9hG4bK3a04667120917
From: <sip:6862000@CUCM-IP>;tag=2359521~e4075e8e-2Db3-4f16-b7d0-8e1642c64577-3340579279
To: <sip:18002738255(CFA:#)@GATEWAY-IP>
Date: Wed, 14 Nov 2018 10:01:51 GMT
Call-ID: 4d4a5700-beb1f28f-330d8-b15a050a@CUCM-IP
Supported: timer,resource-priority,replaces
Min-SE: 1800
User-Agent: Cisco-CUCM11.5
Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY
CSeq: 101 INVITE
Expires: 180
Allow-Events: presence
Supported: X-cisco-srtp-fallback
Supported: Geolocation
Call-Info: <urn:x-cisco-remotecc:callinfo>;x-cisco-video-traffic-class=MIXED
Session-ID: 222222222222222;remote=00000000000000000000000000000000
Cisco-Guid: 129647175dd68-00000f65536-0000022955-2975466762
Session-Expires: 1800
P-Asserted-Identity: <sip:2025550191@CUCM-IP>
Remote-Party-ID: <sip:2025550191@CUCM-IP>;party=calling;screen=yes;privacy=off
Contact: <sip:2025550191@CUCM-IP:5060;transport=tcp>
Max-Forwards: 67
Content-Length: 0

 

 

 

I only need it to match Invite Messages with the From header is not 4 Digits or match and replace if its more than 4 Digits.

 

Everyone's tags (4)
CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards