Introduction
This document describes how to use the Session Initiation Protocol (SIP) Profile Test Tool that is available for use on Cisco.com. SIP Profiles are used in order to manipulate header information in the SIP messages. They can also be used to make changes in the Session Description Protocol (SDP), which is used to negotiate media.
Prerequisites
Requirements
The information in this document is based on Cisco Integrated Service Router (ISR) Generation 1 (2800/3800) or Generation 2 (2900/3900) series.
Components Used
Cisco recommends that you have knowledge of these topics:
- Navigation through Cisco IOS®
- SIP message format and transactions
Common SIP Message Normalization Scenarios
This section provides several SIP message normalization scenarios that have been seen frequently. Each scenario includes the configuration required on Cisco IOS for you reference and a screenshot from the SIP Profile Test Tool that is mentioned in the Introduction.
These scenarios can be used as references for other manipulation required on the SIP messages.
Copy Value from "Diversion" Header to the "From" Header
voice class sip-profiles 1
request INVITE sip-header Diversion copy "<sip:(.*)@.*" u01
request INVITE sip-header From copy ".*<sip:(.*)@.*" u02
request INVITE sip-header From modify "(.*)<sip:.*@(.*)" "\1<sip:\u01@\2"
request INVITE sip-header From modify "<sip:@" "<sip:\u02@"
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-00.png)
Copy Number from "To" header in an Incoming Invite to the "REQ-URI" Parameter (Prior to Cisco IOS Vesion 15.4)
Copy the number in the To header in an inbound Invite message and modify the outgoing INVITE:
voice class sip-copylist 1
sip-header TO
voice class sip-profiles 2
request INVITE peer-header sip TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-01.png)
Copy Number from "To" Header in an Incoming Invite to the "REQ-URI" Parameter (with Inbound SIP Profiles)
voice class sip-profiles 1
request INVITE sip-header TO copy "sip:(.*)@" u01
request INVITE sip-header SIP-Req-URI modify ".*@(.*)" "INVITE sip:\u01@\1"
voice service voip
sip
sip-profiles inbound
sip-profiles 1 inbound
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-02.png)
One-way / No-way Audio Interoperability Issues with Provider
voice class sip-profiles 200
request ANY sdp-header Audio-Attribute modify "a=inactive" "a=sendrecv"
request ANY sdp-header Audio-Connection-Info modify "0.0.0.0" "CUBE’s IP"
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-03.png)
Remove the "UPDATE" Method Support to Avoid Interoperability Issues
voice class sip-profiles 200
request ANY sip-header Allow-Header modify ",UPDATE" ""
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-04.png)
IP Address to Domain Name Conversion
voice class sip-profiles 1
request ANY sip-header SIP-Req-URI modify "10.67.138.241:5060" "sipp.cisco.com"
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-05.png)
Add a Prefix in the "Diversion" Header
voice class sip-profiles 1
request ANY sip-header Diversion modify "sip:(.*)@" "sip:704264\1@"
![](https://www.cisco.com/c/dam/en/us/support/docs/unified-communications/unified-border-element/118825-technote-sip-00-06.png)
Possible Issues
Here are some possible issues you might encounter.
- After Cisco IOS Version 15.4, the SIP profile feature is introduced to modify inbound SIP messages as well.
- Cisco IOS Versions 15.3 and earlier only support SIP profiles in the outbound direction.