11-24-2009 06:54 PM - edited 03-19-2019 12:03 AM
Does anyone know how to use SIP Profiles on a CUBE to map the SIP Diversion Header into the SIP To: field?
09-29-2010 03:23 AM
09-29-2010 05:18 AM
It looks like, according to the below note from the "Additional Configuration Notes" section in that doc, that this is not possible on the CUBE:
"Regular expression variables can be used to extract and store parameters from an existing header, but the values stored in variables in one rule can be used ONLY in the replace-pattern of the same rule; it can NOT be used by any other rules, which means you cannot insert the values extracted by one rule into another rule. " (third bullet in http://www.cisco.com/en/US/products/sw/voicesw/ps5640/products_configuration_example09186a0080982499.shtml#notes)
Sounds like I can extract the number in the Diversion header in one rule but I cannot then use it to modify the To header in another rule.
Can anyone confirm this?
09-30-2010 08:50 AM
Correct. You'd need a custom TCL to get a variable to store from one line to the next.
I have an idea, though. I think you can get the regular expression for the diversion header to match the entire line. If you craft the match string so that you group the number, but the whole string is matched for a replacement, I think you can use the modify function of the diversion header to rewrite the diversion: prefix as a to: prefix. Then, simply use another statement to remove the original to: line.
It's crude, but it's worth a shot.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide