Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

header manipulation problem

I have a SIP trunk provider that requires me

1) to always use my account name in the "From" header, so I have to use header header rewriting to achieve this

2) to set the "P-Preferred-Identity" header to change the caller id (as From cannot be used due to point 1)

Now the header rewriting for 1) works fine, but 2) is bit more complicated, as I need to fetch the source number (ideally before it has been modified) and then use it in a new header line. (aka "copy contents from one header to another header in an outgoing SIP message")

From the "Conditional Header Manipulation of SIP Headers" document I would have assumed that the following works:

voice class sip-profiles 101

request INVITE peer-header sip From copy ".*<sip:(.*)@" u01

request INVITE sip-header P-Preferred-Identity add "P-Preferred-Identity: <sip:555123\>"

But unfortunately it doesn't, "\u01" is being sent literally instead of the content:

P-Preferred-Identity: <sip:555123\>

Any ideas? I'm running CUBE on a 2901ISR with IOS version 15.3(2)T

Edit: Not sure what the difference between sip-header and peer-header is in this context, but using

request INVITE sip-header From copy ".*<sip:(.*)@" u01 (instead of the peer-header line)

doesn't work either.


header manipulation problem

If the profile you configured is passing the "vairable" instead of  the actual content, there is something wrong, please look at the following docs for a better understanding of how the feature works:


Jorge Armijo

Please remember to rate helpful responses and identify helpful or correct answers.

-- Jorge Armijo Please remember to rate helpful responses and identify helpful or correct answers.
New Member

header manipulation problem

I've opened a TAC case and the problem was simple.

Modifying an existing heade works a single SIP leg in general but copying headers, working with variables requires multiple SIP legs, one to fill the variable and another to add/modify the header with its content.

As I only had a single SIP leg this cannot work.

Nevertheless, I've managed (again with TAC help) to get the desried functionality by adding



      asserted-id ppi

and just modifying the header as needed.

CreatePlease to create content