cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4203
Views
10
Helpful
2
Replies

Modify SIP Profile From Header to remove Calling Party Name

Robert Shaw
Level 3
Level 3

Hi Guys,

 

I hope someone can quickly help me.  I'm in the middle of a migration from a CME box to a CUCM.  The current CME connects to the ITSP with a SIP Trunk, which is all well and good.  When I try to move the SIP Trunk over to the CUCM, CUCM insists on sending a name or a word in the SIP From header, which after extensive troubleshooting I now realise that my ITSP doesn't like it.  Even if you restrict the Calling Party Name from being sent on the CUCM SIP Trunk the CUBE still sends "anonymous" in the From field.

 

I need a way of stripping just the name or word from the From field in the Invite message but leaving the number so that the caller id is presented as the extension that is actually calling rather than the main number.

 

Example of a From Header where a call doesn't work.

From: "User Name" 327201333<sip:1323888@sip.atman.pl>;tag=45E36190-AC6

Example of a From Header where a call works.

From: <sip:1323888@sip.atman.pl>;tag=45E36190-AC6

 

To get the second one working I added this into my Sip Profiles config

voice class sip-profiles 1
 request INVITE sip-header From modify "<sip:(.*)@(.*)>" "\1<sip:1323888@\2>"  (already in to change the username for the SIP Trunk)
 request INVITE sip-header From modify "From: (.*<)(.*>)" "From: \2" 


So now all I need to do is capture the number 327201333 as well as the rest of the <sip:1323888@sip.atman.pl>;tag=45E36190-AC6 so it looks like this.

From: 327201333<sip:1323888@sip.atman.pl>;tag=45E36190-AC6

 

Can anyone point me in the right direction with the syntax for modifying the SIP header?

Thanks in advance for any help.

2 Replies 2

Robert Shaw
Level 3
Level 3

All,

I managed to get Cisco TAC to take a look at this.  For anyone that may come across this issue in future this was the fix.


voice class sip-profile 10
 request INVITE sip-header From copy "<sip:(.*)@.*>" u01
 request INVITE sip-header From modify "From: \".*\" <" "From: \u01<"
!
 dial-peer voice 9000 voip
   voice-class sip profiles 10
!
dial-peer voice 9001 voip
  voice-class sip copy-list 10


From what I understand the copy line copies the contents of the inbound INVITE message (except for the Calling Name) from the CUCM and creates a variable u01.  This is done with the voice-class sip copy-list 10 on the inbound dial-peer.

Then on the Outbound Dial Peer we modify the contents of the from field by removing everything and pasting in the contents of the variable u01.

I hope someone else finds this useful.

Thanks

Rob

Hi Rob,

 

I think you forgot to give the voice class sip copy-list config.

 

 

Rémi

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: