cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
27096
Views
1
Helpful
30
Comments
punshriv
Cisco Employee
Cisco Employee

 

Introduction

Cisco Unified Border Element (CUBE) features a rich and powerful command set called "SIP Profiles" which allow an administrator the ability to modify, add, remove or copy elements of a SIP header or SDP Body from requests or responses. These rules can be configured for many scenarios; for example, to add a specific header required by a peer device, remove a problematic header to workaround an issue or modify a value not configurable by other command line interface (CLI) methods.

The sheer number of permutations and complexity of SIP Profile configuration means that administrators required a way to test and validate the regex and logic will not cause more harm than help.

That is where the SIP Profile Tester (SPT) tool features within Collaboration Solution Analyzer (CSA) comes into play. This SIP Profile Tester tool allows an administrator to simulate SIP Profile rule logic on real SIP messages. The outputs can then be examined by to determine if the rules logic is satisfactory or if continued iteration of the rule logic is required. All without ever touching production traffic.

The net benefit is that administrators can apply or modify rules with confidence that a change will not cause a P1 outage. Further, an administrator does not need to simulate in a lab and/or open a TAC case to have an expert review. This saves time for customers, partners and Cisco.

 

User Guide

Finding the SIP Profile Tester (SPT) Tool

  1. External Toolhttps://cway.cisco.com/csa-new/#/sipprofiletest

The tool can be found from the CSA homepage by selecting the "Validate SIP Profile Configs" option in the card. 

KyzerDaviskydavis_0-1722012354744.png

 

Using the SIP Profile Tester Tool (SPT)

The tool itself has 3 main text inputs:

  1. SIP Profile Rules: This required field will contain one or more SIP profile rule configurations which an admin wishes to test.
  2. SIP Message To Test Rules On: This required field is where an admin will enter a SIP message to test.
  3. Peer SIP Message To Copy From: This is an optional item only required when an admin wishes to test profiles that use the "peer-header" keyword. e.g. copylist configuration where headers are passed from one call-leg to the other call-leg. Note, if the word "peer" appears in the sip profile rules this input will change to required

KyzerDaviskydavis_1-1722012382040.png

 

SIP Profile Tester (SPT) Example

A very common scenario is to work on a Diversion header within a SIP INVITE. 
The rule below will modify a diversion header so that the user portion of the SIP URI is converted from 4 digits to 10 digits with the "\1" being the first group of parenthesis.

For regex logic, please refer to https://regex101.com/

The example regex in the modify statement can bee viewed here: https://regex101.com/r/0g8XPq/1

1. SIP Profile Rules:

rule 1 request ANY sip-header Diversion modify "sip:(.*)@" "sip:111222\1@"

2.SIP message to apply rules

INVITE sip:8675309@172.18.110.58:5060 SIP/2.0
Via: SIP/2.0/UDP 172.18.110.65:5060;branch=z9hG4bK-1972256-1-0
From: sipp <sip:1234@172.18.110.65:5060>;tag=1
To: sut <sip:kydavis@172.18.110.58:5060>
Call-ID: 1-1972256@172.18.110.65
CSeq: 1 INVITE
Contact: sip:sipp@172.18.110.65:5060
Max-Forwards: 70
Diversion: <sip:5100@10.10.10.10>

Example Output:

KyzerDaviskydavis_2-1722012458797.png

 

Examining the SPT Results

After selecting "apply" a the SPT tool will show multiple entries:

1. Original SIP Message: For the sake of "stare and compare" the original message is included on the left pane.

2. Modified SIP Message: The final result of the SPT simulation will be shown in the right pane.

3. Copy Registers: If using copy rules, a list of register: value entries is provided to help determine if the expected data is being copied to a variable.

4. Logs: The action, before, after and rule are listed in a table. This is to help an admin debug. This may also have information messages or exceptions encountered while parsing the input rules or messages.

5. Errors: If there are any errors found while parsing the SIP message or the SIP Profile Rules. Those will be shown as a final table at the end.

 

Highlighting of the Original/Modified SIP Message results:

- Modified SIP Headers or SDP Body will be highlighted blue in both message areas.

- Added SIP Headers or SDP Body will be highlighted green in the Modified SIP message result only.

- Removed SIP Headers or SDP body will be highlighted red in the original SIP message result only.

An example of the modify/add/remove highlighting can be seen below:

KyzerDaviskydavis_3-1722012531016.png

Note: If the SDP Body is modified, the content-length header will be modified to account for the new SDP Body length. While this does not highlight in the original/modified window an INFO log is provided describing this behavior.

 

Loading prebuilt rules and messages

SPT makes prebuilt rules available via a dropdown selector above the SIP Profile Rules input.

These cover basic features such as adding/removing/modifying headers, copying from the input message, copying from the peer message and even more advanced features such as CSEQ based method modifications or mline-index based modifications. Further, some of the more common profile types have been includes as scenarios.

Further, various sample SIP message request/response have been included as selectable options in the dropdown above the SIP Message To Test Rules On input. These feature interesting headers and SDP Body (audio/video/app/mime/t38) built around the prebuilt SIP profile Rules. 

These rules and messages can be a good starting point to learn SIP profiles or used to start building your next custom rule.

KyzerDaviskydavis_4-1722012560746.png
KyzerDaviskydavis_5-1722012564851.png

 

SIP Profile Documentation

There are a plethora of places to review SIP Profile logic and documentation. Some samples are provided below.

  1. Cisco IOS XE 17.6 Onwards
  2. Cisco IOS XE 17.5 and Older
  3. Use SIP Profiles on CUBE Enterprise Common Use Cases
  4. IOS-XE Call Routing - SIP Profiles
  5. https://www.youtube.com/watch?v=oFicL8yJUG4&ab_channel=Cisco

 

Development and Feedback

The original SPT tool has been deprecated as of 2023: https://www.cisco.com/c/en/us/support/web/retired-tools.html

Feedback can be submitted via the "Report Problem" button in the top right header of CSA.

KyzerDaviskydavis_6-1722012688189.png

Please include the following when submitting an issue involving IOS or Regex Logic:

  • Full SIP Message(s) being used
  • SIP Rule(s) being tested
  • Expected Results (If possible, with supporting debug logic from CUBE on the latest version of XE code.)
debug ccsip mess
debug ccsip info
debug ccsip feature sip-profile

 

Disclaimers

  • The SPT script simulates SIP Profile logic used by the most up-to-date version of IOS XE / CUBE and the rule logic is tested against only that version. Read: There is no ability to test rule logic for specific X version of XE code.
  • There may be features supported by SPT that are not supported by a specific release. It is up to the administrator to review the official documentation and understand if a SIP Profile feature / command set is available in the desired version.
  • All simulation and testing for underlying script logic is performed in a controlled lab environment using a cleared (default) configurationIf your network is live, ensure that you understand the potential impact of any command and the effect other commands may have on the SIP Profile feature.

 

Comments

That is indeed sad news and quite frankly unacceptable. This is not how you treat customers if you have any intention to keep them as customers.

JamesHawkins
Level 1
Level 1

Just found this thread after trying to use the tool and agree 100% with Roger's statement.

Cisco are removing tools like this and the Virtual Machine Placement Tool which make it harder and harder to design and deploy collab solutions. A few weeks ago I spend hours just trying to find out hardware specs for a BE7000H M6 server.

Now I have no way of testing SIP profiles apart from changing them in a live environment. Incredibly poor that these tools are being taken away from the partners that are still trying to champion Cisco collab.

Ahmed Khalefa
Level 1
Level 1

Worst decision ever made by the reputable company !

GeorgMa
Level 1
Level 1

It is a huge disappointment to hear that the SIP Profile Tester Tool cannot be used by customers anymore.

It was extremely useful to test custom sip headers without the need to make test calls all the time.

I would appreciate it, if the SIP Profile Tester Tool would be integrated into the IOS-XE image at least, in the same manner as the "test voice translation-rule" feature is available in the IOS-XE image.

As a result, Cisco doesn't need to maintain a separate webpage anymore, and customers still can make use of it on the command line out of the box.

Win-Win

Best regards,
Georg

 

b_ferguson
Level 1
Level 1

is there another tool others are using or just live testing in an environment?  I searched and searched and can't seem to find anything, figured I'd ask.  

Edward Lau
Level 1
Level 1

@GeorgMa, probably best to raise the suggestion with a Cisco account rep.

I don't believe these Community forums are actually monitored by Cisco and the OP is probably no longer around.

Kyzer Davis (kydavis)
Cisco Employee
Cisco Employee

Hello All,

The old SIP Profile Tester tool has been retired. See: https://www.cisco.com/c/en/us/support/web/retired-tools.html

The good news is that we have published a new, updated, version of the tool as part of Cisco Collaboration Solutions Analyzer (CSA).

The new tool can be found at the following link: https://cway.cisco.com/csa-new/#/sipprofiletest

Sample Screenshot:

new-sip-profile-tester.png

Thanks for sharing @Kyzer Davis (kydavis) This is amazing news.

GeorgMa
Level 1
Level 1

@ kyzer Davis thank you very much for your reply.

However, I don't receive any output from the SIP Profile Tester tool.

I entered my sip profiles rules on the left and in the right window "sip message to apply rules" I pasted my SIP message.

the below window "sip message to copy from" I kept empty, same as your example.

After I hit "apply" I see the webpage's progress icon, but after some seconds it disappears and there is neither an error message nor an output displayed at the bottom.

Even if I copy your example above to modify the SIP Diversion header, I also don't see any results.

Does it request any special format of the SIP messages or does it have any issues some special characters!?

Do you have any hints?

 

Update:
I am sorry, my bad.

clreared browser cache and accepted necessary webpage cookies.

now it works.

Edward Lau
Level 1
Level 1

@Kyzer Davis (kydavis) 

I'm trying to create a Diversion header based on the number in the From field but the tool keeps erroring with "bad escape \x at position"

I modified the profile from "Example: Create a Diversion header depending on the area code" of the CUBE guide:

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/ios-xe/config/ios-xe-book/m_voi-sip-param-mod.html#reference_4406517AFE004B29AC6C7D4816E5B0C3

When I drop in the exact same rule from the guide example, the tool still gives the error. Is something missing?

Attached images are the outputs from my modified rule and the guide's original rule.

diversion-insert.PNG

diversion-insert2.PNG

Kyzer Davis (kydavis)
Cisco Employee
Cisco Employee

@Edward Lau, good catch. Let me fix that.
Note, I also noticed a parsing error with inputs like "Header:valueWithNoSpace"

Working to fix that too.

Kyzer Davis (kydavis)
Cisco Employee
Cisco Employee

@Edward Lau,
We pushed a new version of the SIP Profile Tester (SPT) earlier today to CSA.

This release includes a ton of changes, error catching some relaxed input validation.

I also validated that specific line from the CUBE config guide against my 17.14 CAT8000v. 
You will wan to use a profile like below since the one in the doc is only a LF value when in reality to be parsed properly by upstream devices you will want to put a CRLF.
I have a better example of using "\x0D\x0A" over in my doc but I have cross-posted a sample below.

### Test Rule:

rule 45 request INVITE sip-header From modify "(.*sip:1234@.*)" "\1\x0d\x0aNewLineHeader: <sip:5678@example.com>"
rule 46 request INVITE sip-header To modify "(.*sip:8675309@.*)" "\1\x0D\x0ADiversion: <sip:7777@example.com>"

### Test Input:

INVITE sip:8675309@10.10.10.10:5060 SIP/2.0
From: <sip:1234@10.10.10.20:5060>;tag=1
To: <sip:8675309@10.10.10.10>

Also to note, you will want to use that in the OUTBOUND direction. If you try to apply this type of modification as an INBOUND profile modification CUBE is going to error about the formatting of the whole header. I don't have a warning for this yet but I will get to adding some helper warnings in a future release.

---

For anybody else: If you were seeing any oddities/errors.

Please retest. The release on June 18, 2024 covers many changes, fixes, and under the hood goodies.

Edward Lau
Level 1
Level 1

@Kyzer Davis (kydavis) 

I'm not getting any output in the "Modified SIP message" field after running the apply rules.

The "Original message" field displays the SIP message inputted but nothing for anything else, see screenshot.

I've tried different browsers, accepted all cookies, clearing the cache and using InPrivate/Incognito but all with same issue.

EdwardLau_0-1720462678608.png

 

Kyzer Davis (kydavis)
Cisco Employee
Cisco Employee

@Edward Lau, I am aware of the the "blank modified sip message" output error. I fixed it recently while implementing new features and re-working the GUI for the July Update.

Coincidentally the new SPT update should be live soon externally in CSA.

You will know it is live when you see the GUI look like the screenshots below. Please test your profile again when the new update is live. I will edit this message when I know the team has pushed the update but for now I have compiled the release notes below.

Edit 7/15/2024: Update is live!

---

July Update

Input Changes:

  • Better input descriptions, placeholder text and input help with links to CUBE documentation.
  • Peer header input is renamed to better describe its usage and is now collapsed by default but can be toggled with the "show peer header input" button. Input help and placeholder text was added to detail that it is only required for "peer-header" type rules. Note, will change to required if a peer-header rule is detected in the input rules area.

KyzerDaviskydavis_0-1720463816001.png

 

Results Changes:

  • Inputs are now hidden but can be re-opened to tweak rules and rerun the test by clicking the "show inputs" button.
  • Line numbers have been added to the SIP Message areas. A button will toggle these if you do not want them in a screenshot.
  • Change Highlighting
    • Modified SIP Headers or SDP Body will be highlighted blue in both message areas.
    • Added SIP Headers or SDP Body will be highlighted green in the Modified SIP message result only.
    • Removed SIP Headers or SDP body will be highlighted red in the original SIP message result only.
  • Copy register area will not show if copy rules are not in use. Otherwise no changes.
  • Logs have been overhauled to show action, before, after, and the rule that was applied
    • Logs will also show INFO messages such as when an SDP body is modified the content-length header will be re-calculated to account for the new length. This will not highlight blue but the logs table will detail this change since this is something CUBE will do.
  • Errors: Where possible I tried to ensure errors report something useful and do not block execution of further rules (like could sometimes be  seen with the modified output being empty.)

KyzerDaviskydavis_1-1720463846863.png

New: prebuilt rule scenarios and test messages:

I hand crafted 26 rule scenarios comprising of 164 various rule combinations that cover about anything one can do with a SIP profile. These prebuilt selections are available via a dropdown selector above the SIP Profile Rules input.

These cover basic features such as adding/removing/modifying headers, copying from the input message, copying from the peer message and even more advanced features such as CSEQ based method modifications or mline-index based modifications. Further, some of the more common SIP profile usages have been includes as scenarios. 

Finally, various sample SIP message request/response have been included as selectable options in the dropdown above the SIP Message To Test Rules On input. These messages feature interesting headers and SDP Body (audio/video/app/mime/t38) built around the prebuilt SIP profile Rules.

These prebuilt rules and messages can be a good starting point to learn SIP profiles or used to start building your next custom rule.

Dropdowns in the update:

KyzerDaviskydavis_3-1720463888483.png
KyzerDaviskydavis_5-1720463898092.png

 

New: Error Reporting

You should also be able to report errors through the "Report Problem" button now.

 

KyzerDaviskydavis_6-1720465042077.png

Final Notes:

In preparing this release I ended up testing and debugging 180+ SIP Profile scenarios against a real IOS XE 17.14 CUBE in the lab. I then compared those results to the output of SPT to ensure things are as 1:1 with real CUBE as possible. As such this release fixes a number of corner case issues I found with SPT logic between now and the June 18th release.

 

Kyzer Davis (kydavis)
Cisco Employee
Cisco Employee

FYI: I have revised the original post in this article to reflect the current CSA based SIP Profile Tester (SPT) Tool and include a short user guide. Most of the content mirrors what was posted in my 07-08-2024 comment with some revisions here and there.

Enjoy.

Getting Started

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: