mspool Wed, 09/29/2010 - 05:18
User Badges:

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

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?

Steven Holl Thu, 09/30/2010 - 08:50
User Badges:
  • Cisco Employee,

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.


This Discussion

Related Content