cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
26509
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
Amit Singh2000
Level 1
Level 1

From where i download this tool ??

Thanks in advance .

Jared Levin
Level 1
Level 1

It's a web based tool. https://cway.cisco.com/tools/SipProfileTest/

chatura
Level 1
Level 1

Does this tool support SDP manipulation ?. Doesn't seem to work for me

chatura
Level 1
Level 1

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.

cnscisco
Level 1
Level 1

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!

EdwardRJZTS
Level 1
Level 1

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

mariagom@cisco.com
Cisco Employee
Cisco Employee

Hi,

 

The mail ciscocom-apps-sipprofiletest@external.cisco.com is not working. Is there any other way to get support for a partner. Thanks.

Edward Lau
Level 1
Level 1

@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.

Thomas-B
Level 1
Level 1

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.

hadenfeldt
Level 1
Level 1

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.

LibinBenedict
Level 1
Level 1

@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!!!!!!

RossStevenson
Level 1
Level 1

Any news on this working again??

hadenfeldt
Level 1
Level 1

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.

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: