cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6375
Views
0
Helpful
7
Replies

Modify SIP-Header P-Asserted-Identity

Hi all

I have a problem to modify the P-Asserted-Identity with my Cisco CUBE.

I want to change the value from <sip:+41yyyyyyyyy@xxx.xxx.xxx.xxx> to <tel:+41yyyyyyyyy@xxx.xxx.xxx.xxx>

I have the following SIP Profile:

voice class sip-profiles 100
 request ANY sip-header P-Asserted-Identity modify "<sip:(.*)@.*>" "<tel:\1>"

and this is my Dial-Peer:

dial-peer voice 2100 voip
 description *** dial-peer Provider ***
 translation-profile incoming FROM-PSTN
 destination-pattern +T
 session protocol sipv2
 session target ipv4:xxx.xxx.xxx.xxx
 session transport tcp
 incoming called-number +41yyyyy....
 voice-class codec 1 
 voice-class sip srtp-auth sha1-32
 voice-class sip profiles 100
 dtmf-relay rtp-nte
 no vad

Can anybody explain me why the Cube doesn't modify my P-ID?

Thank you very much for your help.

Cheers,

Pascal

 

 

Jul 21 15:00:23.819: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:+41aaaaaaaaa@zzz.zzz.zzz.zzz:5060 SIP/2.0
Via: SIP/2.0/TCP xxx.xxx.xxx.xxx:5060;branch=z9hG4bKf35d6658b3e7
From: "Pascal Blumenthal" <sip:+41yyyyyyyyy@xxx.xxx.xxx.xxx>;tag=182794~59407172-9872-5f91-8b80-5d18f687c0d0-66050726
To: <sip:+41795985590@10.250.1.96>
Date: Tue, 21 Jul 2015 15:00:23 GMT
Call-ID: 3503a300-5ae15e87-ef54-3301fa0a@10.250.1.51
Supported: 100rel,timer,resource-priority,replaces
Min-SE:  1800
User-Agent: Cisco-CUCM10.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,X-cisco-original-called
Cisco-Guid: 0889430784-0000065536-0000000210-0855767562
Session-Expires:  1800
P-Asserted-Identity: "Firstname Surname" <sip:+41yyyyyyyyy@xxx.xxx.xxx.xxx>
Remote-Party-ID: "Firstname Surname" <sip:+41yyyyyyyyy@xxx.xxx.xxx.xxx>;party=calling;screen=yes;privacy=off
Contact: <sip:+41yyyyyyyyy@xxx.xxx.xxx.xxx:5060;transport=tcp>
Max-Forwards: 69
Content-Type: application/sdp
Content-Length: 200

1 Accepted Solution

Accepted Solutions

I just tested this in my lab and got it working. Make sure that your are matching the correct outgoing dialpeer. Please post the entire config and the output of debug voice dialpeer all.

 

Config

voice class sip-profiles 1
 request ANY sip-header P-Asserted-Identity modify "P-Asserted-Identity:(.*)<sip:(.*)" "P-Asserted-Identity:\1<tel:\2"

!

dial-peer voice 717 voip
 destination-pattern xxxxxxxxxx
 session protocol sipv2
 session target ipv4:x.x.x.x
 voice-class sip asserted-id pai
 voice-class sip profiles 1

 

 

Debug

Jul 22 2015 06:52:32.505 UTC: //62893/388D3D800004/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:xxxxxxxxxx@x.x.x.x:5060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.x:5060;branch=z9hG4bK5743FC2
From: "Mohammed Al Baqari" <sip:xxxxxxx@x.x.x.x>;tag=FBF1FF60-21A8
To: <sip:xxxxxxx@x.x.x.x>
Date: Wed, 22 Jul 2015 06:52:32 GMT
Call-ID: FA7FF08-2F7511E5-B174EFBA-912C2449@10.170.170.2
Supported: timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 0948780416-0000065536-0000262786-0184855050
User-Agent: Cisco-SIPGateway/IOS-15.4.3.M2
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1437547952
Contact: <sip:xxxxxxx@x.x.x.x:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: "Mohammed Al Baqari" <tel:xxxxxxx@x.x.x.x>
Session-Expires:  1800
Content-Length: 0

View solution in original post

7 Replies 7

You configuration should look as follow:

 

voice class sip-profiles 100
 request ANY sip-header P-Asserted-Identity modify "P-Asserted-Identity:(.*<)sip:(.*)" "P-Asserted-Identity:\1tel:\2"

Hi Mohammed

Thank you for your answer but unfortenately, my CUBE doesn't change any value in the P-Asserted Identity Field.

Any other suggestions?

Best regards,

Pascal

 

I just tested this in my lab and got it working. Make sure that your are matching the correct outgoing dialpeer. Please post the entire config and the output of debug voice dialpeer all.

 

Config

voice class sip-profiles 1
 request ANY sip-header P-Asserted-Identity modify "P-Asserted-Identity:(.*)<sip:(.*)" "P-Asserted-Identity:\1<tel:\2"

!

dial-peer voice 717 voip
 destination-pattern xxxxxxxxxx
 session protocol sipv2
 session target ipv4:x.x.x.x
 voice-class sip asserted-id pai
 voice-class sip profiles 1

 

 

Debug

Jul 22 2015 06:52:32.505 UTC: //62893/388D3D800004/SIP/Msg/ccsipDisplayMsg:
Sent:
INVITE sip:xxxxxxxxxx@x.x.x.x:5060 SIP/2.0
Via: SIP/2.0/UDP x.x.x.x:5060;branch=z9hG4bK5743FC2
From: "Mohammed Al Baqari" <sip:xxxxxxx@x.x.x.x>;tag=FBF1FF60-21A8
To: <sip:xxxxxxx@x.x.x.x>
Date: Wed, 22 Jul 2015 06:52:32 GMT
Call-ID: FA7FF08-2F7511E5-B174EFBA-912C2449@10.170.170.2
Supported: timer,resource-priority,replaces,sdp-anat
Min-SE:  1800
Cisco-Guid: 0948780416-0000065536-0000262786-0184855050
User-Agent: Cisco-SIPGateway/IOS-15.4.3.M2
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY, INFO, REGISTER
CSeq: 101 INVITE
Timestamp: 1437547952
Contact: <sip:xxxxxxx@x.x.x.x:5060>
Expires: 180
Allow-Events: telephone-event
Max-Forwards: 68
P-Asserted-Identity: "Mohammed Al Baqari" <tel:xxxxxxx@x.x.x.x>
Session-Expires:  1800
Content-Length: 0

Hi Mohammed

You are right...it works. I was looking at the wrong dial-peer.

Thank you very much for your help.

Regards,

Pascal

Hi Mohammed,

I just have the same problem that I want to modify the "P-Asserted-Identity" as the provider expect a special value.

The "normal" unmodified P-Asserted-Identity looks like this

P-Asserted-Identity: "username" <sip:XXXX77@x.x.x.x>

I want to change this P-Asserted-Identity to this one

P-Asserted-Identity: "username"<sip:YYYYYYYY77@y.y.y.y:5060>

X = internal DN
x = internal IP of CUCM
Y = external DN
y = external IP

I tried to do this with this config

voice class sip-profiles 1
request ANY sip-header P-Asserted-Identity modify "P-Asserted-Identity:(.*)<sip:XXXX77@x.x.x.x>" "P-Asserted-Identity:\1<sip:YYYYYYYY77@y.y.y.y:5060>"

dial-peer voice 11 voip
 description SIP-Outgoing
 translation-profile incoming SipInbound
 translation-profile outgoing SipOutbound
 destination-pattern 0T
 modem passthrough nse codec g711alaw
 session protocol sipv2
 session target ipv4:y.y.y.y
 session transport udp
 voice-class sip early-offer forced
 voice-class sip profiles 1
 dtmf-relay sip-notify rtp-nte
 codec g711alaw
 fax-relay ecm disable
 fax-relay sg3-to-g3
 fax nsf 000000
 fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback pass-through g711alaw
 no vad
!


In the log I also see that dialpeer 11 should be used:


*Jun 16 15:16:31.242 MESZ: //-1/xxxxxxxxxxxx/DPM/MatchNextPeer:
   Result=Success(0); Outgoing Dial-peer=11 Is Matched

But the problem is that the P-Asserted-Identity is not modified and still the default value.

Would did I wrong?

BR
Michael

dshumake
Level 4
Level 4

hello all,

I am new to SIP profiles, so I am trying to only change the username in the P-asserted-identity field.  

thanks

 

As this post is marked as solved and is quite old it would be advisable for you to create your own post to ask your question. When doing so please provide as clear and detailed information as you can on what you’re looking to achieve so that it’s easier for us to provide you help.



Response Signature