cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
timlytle
New Contributor

HMR contact header match question

TA916e R13-2-2

I am trying to manipulate CONTACT header on a Voice trunk with an HMR rule,   I am able to do so successfully when the the original contact is formated with a calling number, however my issue is that when there is no calling number my match is invalid because there is no @,  I can rewrite the whole header but the I have to specify the IP address and I don't want to do that so that I have the options to dynamically assign and IP address,   I am having trouble writing a match statement that would work, and I not sure how to define a variable for the IP address

original contact:

Contact: <sip:1.1.1.1:5060;transport=UDP>

Contact: <sip:8885551234@1.1.1.1:5060;transport=UDP>

desired result:

Contact: <sip:12345678@1.1.1.1:5060;transport=UDP>

config

  message-rule CONTACT_HEADER message-type any 10

    modify header contact position first match /sip:.*@/ new-value /sip:12345678@/

maybe something like thi

  message-rule CONTACT_HEADER message-type any 10

    modify header contact position first match /sip:.*:/ new-value /sip:12345678@<ip address>:/

0 Kudos