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

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

Mapping SIP Diversion Header into SIP To: field

Does anyone know how to use SIP Profiles on a CUBE to map the SIP Diversion Header into the SIP To: field?

Everyone's tags (3)
3 REPLIES
Cisco Employee

Re: Mapping SIP Diversion Header into SIP To: field

New Member

Re: Mapping SIP Diversion Header into SIP To: field

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?

Cisco Employee

Re: Mapping SIP Diversion Header into SIP To: field

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.

1972
Views
0
Helpful
3
Replies
CreatePlease login to create content