cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
1693
Views
0
Helpful
2
Replies
Highlighted
Beginner

CUBE SIP profile for Diversion header

I've got a problem with Diversion headers.  our DN's are configured as +E.164.  When forwarding calls we send out the Diversion header with the number of the phone.  This should work but the number that gets populated is +1XXXXXXXXXX. And the carrier is not accepting that.  It will accept it without the +1.  So I am trying to use SIP profiles to remove the +1 from the Diversion header but it is not working.

 

Here is the invite:

 

5047483: Oct 18 11:48:32.649 MDT: //4713576/06089D800000/SIP/Msg/ccsipDisplayMsg:

Sent: 

INVITE sip:8018197960@165.117.119.158 SIP/2.0

Via: SIP/2.0/UDP 10.225.255.249:5060;branch=z9hG4bK4521622390

From: "WIRELESS CALLER" <sip:4802001918@10.225.255.249>;tag=E2FD44C4-E3E

To: <sip:8018197960@165.117.119.158>

Date: Thu, 18 Oct 2018 17:48:32 GMT

Call-ID: DD39E44A-D23411E8-A37FA40F-83E7177C@10.225.255.249

Supported: 100rel,timer,resource-priority,replaces,sdp-anat

Min-SE:  1800

Cisco-Guid: 0101227904-0000065536-0000031816-0184869130

User-Agent: Cisco-SIPGateway/IOS-15.4.3.M5

Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER

CSeq: 101 INVITE

Timestamp: 1539884912

Contact: <sip:4802001918@10.225.255.249:5060>

Expires: 180

Allow-Events: telephone-event

Max-Forwards: 66

P-Preferred-Identity: "WIRELESS CALLER" <sip:4802001918@10.225.255.249>

Diversion: "Kaye Parrish"<sip:+18015634115@10.225.255.249>;privacy=off;reason=unconditional;screen=yes

Session-Expires:  1800

Content-Type: application/sdp

Content-Disposition: session;handling=required

Content-Length: 349

 

v=0

o=CiscoSystemsSIP-GW-UserAgent 7233 8884 IN IP4 10.225.255.249

s=SIP Call

c=IN IP4 10.225.255.249

t=0 0

m=audio 16574 RTP/AVP 0 18 100 101

c=IN IP4 10.225.255.249

a=rtpmap:0 PCMU/8000

a=rtpmap:18 G729/8000

a=fmtp:18 annexb=no

a=rtpmap:100 X-NSE/8000

a=fmtp:100 192-194

a=rtpmap:101 telephone-event/8000

a=fmtp:101 0-16

a=ptime:20

 

Note that the Diversion header is there and it is:

Diversion: "Kaye Parrish"<sip:+18015634115@10.225.255.249>;privacy=off;reason=unconditional;screen=yes

 

Here is my SIP profile

voice class sip-profiles 1001

 request INVITE sip-header Diversion modify "<sip:+1801563(.*)@" "<sip:801563\1@"

 

and my Dial-peer

dial-peer voice 1001 voip

 description Outbound calls to SIP-801-563-Midvale-UT-01

 translation-profile outgoing ToSIPPSTN

 destination-pattern 801563*T

 session protocol sipv2

 session server-group 20

 voice-class codec 1  

 voice-class sip profiles 1001

 voice-class sip options-keepalive profile 20

 dtmf-relay rtp-nte

 no vad

 

For some reason it does not appear to match the profile that I have setup so it is not changing the Diversion header and removing the +1.

2 REPLIES 2
Highlighted
Beginner

I prefer to use a translation rule instead:

voice translation-rule 1
rule 1 /^\+1/ //

voice translation-profile ToPSTN
translate redirect-called 1
Highlighted
Cisco Employee

You're missing the escape for the '+' sign in the Diversion header number.
This profile should work.
voice class sip-profiles 1001
request INVITE sip-header Diversion modify "(.*)<sip:\+1801563(.*)" "\1<sip:801563\2"

FYI, you can also use this tool to test your sip profiles. https://cway.cisco.com/tools/SipProfileTest/