on 06-29-2016 06:15 AM - edited on 07-26-2024 09:58 AM by Kyzer Davis (kydavis)
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.
The tool can be found from the CSA homepage by selecting the "Validate SIP Profile Configs" option in the card.
The tool itself has 3 main text inputs:
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:
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:
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.
There are a plethora of places to review SIP Profile logic and documentation. Some samples are provided below.
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.
Please include the following when submitting an issue involving IOS or Regex Logic:
debug ccsip mess
debug ccsip info
debug ccsip feature sip-profile
From where i download this tool ??
Thanks in advance .
It's a web based tool. https://cway.cisco.com/tools/SipProfileTest/
Does this tool support SDP manipulation ?. Doesn't seem to work for me
Wrote to the Dev team and they informed that i have a extra 'space' at the end of each line. Which the tool does not like.
I copied the original SIP message from an actual Wireshark capture by selecting the packet , right clicking and selecting “show packet as byte” with the format as ‘ASCII’. That causes the message to have a ‘space’ at the end of each line.
When I use the format ‘UTF-8’ no spaces are present and the tools works beautifully.
Hope this will be useful for somebody.
Gotta Love Cisco! Which other SBC vendor has something like this?! Will save a lot of people inside and outside of TAC a lot of time.
Well done Cisco!
Hello, Tech community!
I have this interesting issue with SIP Profile and yes I’m new to SIP Profiles I'm trying to learn more about it, any help would be greatly appreciated!!!
The task at hand:
Attempting to prefix known 3 digit site code to 4 digit extension in Remote-Party-ID so that Called-id would display 7 digits site code XXX extension XXXX.
Used Sip Profile tester to verify profile the output shows as desired.
voice class sip-profiles 10
response 180 sip-header Remote-Party-ID modify "sip:(....)@" "sip:699\1@"
response 200 sip-header Remote-Party-ID modify "sip:(....)@" "sip:699\1@"
But when entering into actual IOS 15.7(3)M3 router.
The IOS adjusting it as "sip:6991@" in replacing section statement in the profile.
then Called ID becomes 6991.
The questions it is a defect on 15.7.3 IOS code?
If it is I could not find it in release notes regarding defect.
Also is there another alternative Regex syntax simpler than this that I can try out?
Regards
EJ
Hi,
The mail ciscocom-apps-sipprofiletest@external.cisco.com is not working. Is there any other way to get support for a partner. Thanks.
@punshriv, Not sure which website redesign but ever since then the tool’s analysis results display as one big text block.
It’s as if the carriage return (new line) in the input message field were stripped.
This makes the results hard to read and cumbersome to understand.
Hi all, the topic is old i know, but I tried the tool several times, but always get the error :
"Cisco has failed to process your data, Cisco engineers have been notified"
I also copy and paste the example from punshriv and get the same error.
Anybody who can help on this?
BR, Thomas
I have also seen the same issue since the past few weeks. Seems like no one is paying attention to the notifications sent by this tool.
Same issue with it not working on any browser I've tried. I even tried to get in contact with someone at Cisco but they kept asking for a support contract like I was trying to open a case for my equipment/software and not for a tool on their site. Responded a couple of times but they just had the generic responses and it didn't go anywhere. Maybe if someone tries to approach it through an account rep they might be able to reach out internally to someone who could actually fix this. Would be nice to have the tool instead of having to test on actual equipment and run debugs each time to see if it's doing what I want.
@punshriv Can you please take a look at this?
As mentioned by others above, I am also getting the same error whenever I try to use this tool:
"Cisco has failed to process your data, Cisco engineers have been notified"
Thanks,
Libin Benedict
useless one, it is not working!!!!!!
Any news on this working again??
Just remember I never responded to this thread but I did jump through some Cisco hoops months ago to find out some not so great info. I reached out to my account rep and after going through multiple groups they hit some group in India who basically said they weren't going to fix the tool.
I was told there's a newer internal SIP profile tool that only Cisco employee's have access to and completely worthless to me and most other people who are doing testing. I was told I could send my config over to my SE and they could pass it along. I declined because when testing I go through tons of modifications back to back and emailing back and forth would be worthless. Doesn't look like this will ever be fixed which is unfortunate.
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: