08-27-2013 06:03 AM - edited 03-18-2019 01:42 AM
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\u01@sipconnect.sipgate.de>"
But unfortunately it doesn't, "\u01" is being sent literally instead of the content:
P-Preferred-Identity: <sip:555123\u01@sipconnect.sipgate.de>
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.
08-31-2013 11:59 AM
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:
http://www.cisco.com/en/US/docs/ios/voice/cube/configuration/guide/vb-gw-sipsip.html
http://www.cisco.com/en/US/docs/ios-xml/ios/voice/cube_sip/configuration/12-4t/voi-condl-header.pdf
HTH
--
Jorge Armijo
Please remember to rate helpful responses and identify helpful or correct answers.
09-05-2013 07:43 AM
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
voice
sip
asserted-id ppi
and just modifying the header as needed.
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: