Showing results for 
Search instead for 
Did you mean: 

Cisco Community Designated VIP Class of 2020


Modify SIP Profile From Header to remove Calling Party Name

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<>;tag=45E36190-AC6

Example of a From Header where a call works.

From: <>;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 <>;tag=45E36190-AC6 so it looks like this.

From: 327201333<>;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.


All,I managed to get Cisco


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.




Re: All,I managed to get Cisco

Hi Rob,


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




CreatePlease to create content
Content for Community-Ad
FusionCharts will render here