Showing results for 
Search instead for 
Did you mean: 
Walkthrough Wednesdays

BLOG (No Title)

Muthurani Lavanya Paneerselvam

CUBE can customize the SIP messaging on either side to what the devices in that segment of the network expect to see by normalizing the SIP messaging on the network border, or between two non-interoperable devices within the network.

Service providers may have policies for which SIP messaging fields should be present (or what constitutes valid values for the header fields) before a SIP call enters their network. Similarly, enterprises and small businesses may have policies for the information that can enter or exit their networks for policy or security reasons from a service provider SIP trunk.

In order to customize SIP messaging in both directions, you can place CUBE with a SIP normalization configuration at the boundary of these networks.

Use SIP Profile as a Translation feature to Normalize SIP Traffic coming in to SP Network or Enterprise Network at the border entry points.

I have created this blog based on my learning experience when configuring SIP Profile on Cisco Unified Border Element (CUBE) deployed at Service Provider network.

SIP Profiles: When/How Applied ?

This diagram explains the SIP Profile application.


Sample Dial-peer configuration for the call flow :

Inbound Dial-peer

dial-peer voice 1 voip

  description Incoming

  answer-address .T

  incoming called-number .T

  dtmf-relay rtp-nte

  codec g711ulaw

  session protocol sipv2

Outbound Dial-peer

dial-peer voice 4 voip

  description Outgoing

  destination-pattern 99.T

  session target ipv4:

  dtmf-relay rtp-nte

  codec g711ulaw

  session protocol sipv2

Tech Note:

1. SIP Profiles feature is a powerful tool that can adjust SIP messages as needed

2. Exercise CAUTION when applying SIP Profiles - ensure that it does not “create” interop issues, rather than solving them.

3. SIP Profiles apply only to outgoing SIP messages

4. Changes to the messages are applied just before they are sent out

SIP Profile Configuration - Example

How to Add "user=phone" to INVITEs and REINVITEs ?

SIP Profile Configuration Example

voice service voip

  media flow-around

  allow-connections sip to sip


    bind control source-interface GigabitEthernet0/1

    bind media source-interface GigabitEthernet0/1

    sip-profiles 100


voice class sip-profiles 100

  request INVITE sip-header SIP-Req-URI modify "; SIP/2.0" ";user=phone SIP/2.0"

  request REINVITE sip-header SIP-Req-URI modify "; SIP/2.0" ";user=phone SIP/2.0"

INVITE sip:68713@;user=phone SIP/2.0

Via: SIP/2.0/UDP;branch=z9hG4bK67225B8

Remote-Party-ID: <sip:9135217271@>;party=calling;screen=no;privacy=off

From: <sip:9135217271@>;tag=29ADDAB0-142B

To: <sip:68713@>

Date: Tue, 12 Feb 2008 18:15:40 GMT

Call-ID: 5A5601B3-D8CD11DC-8EE89D16-4DF2AD9D@

Supported: 100rel,timer,resource-priority,replaces

Min-SE:  1800

Cisco-Guid: 1515305987-3637318108-2397216022-1307749789

User-Agent: Cisco-SIPGateway/IOS-12.x

SIP Profile Use Cases: Add

1. Message: INVITEs and REINVITEs

Action: Add “user=phone”

voice class sip-profiles 100

  request INVITE sip-header SIP-Req-URI modify "; SIP/2.0" ";user=phone SIP/2.0"

  request REINVITE sip-header SIP-Req-URI modify "; SIP/2.0" ";user=phone SIP/2.0"

2. Message: 200 response

Action: Add User-Agent header

voice class sip-profiles 100

  response 200 sip-header User-Agent add "User-Agent: SIP-GW-UA"

3. Message: 480 Temporarily Not Available

Action: Add Retry-After sip-header

voice class sip-profiles 100

  response 480 sip-header Retry-After add “Retry-After: 60”

SIP Profile Use Case: Remove

1. Message: 100 and 180 responses

Action: Remove Server header

voice class sip-profiles 100

  response 100 sip-header Server remove

  response 180 sip-header Server remove

SIP Profile Use Case: Modify

1. Message: INVITE

Action: Modify From: header to “gateway@gw-ip-address” format,  e.g. change 2222000020@ to gateway@

voice class sip-profiles 100

  request INVITE sip-header From modify "(<.*:)(.*@)" "\1gateway@"

2. Message: INVITE

Action: replace "CiscoSystems-SIP-GW-UserAgent" with "-" in o= line of SDP.

voice class sip-profiles 100

  request INVITE sdp-header Session-Owner modify "CiscoSystems-SIP-GW-UserAgent“ "-"

SIP Profile Configuration : How it helps?

SIP profiles is a mechanism to address the following problems:

  1. Interop between incompatible devices
  2. Normalization or customization of SIP at the edge/border of a network

SIP incompatibilities arise due to:

  1. Device rejecting an unknown header, its value or parameter, instead of ignoring it
  2. Device sending incorrect data in SIP messages
  3. Device not implementing, or implementing incorrectly, protocol procedures
  4. Device expecting a particular header value/parameter that may be optional or implemented in multiple ways

I hope this is helpful. Thanks.

Ben Morgan

excellent post, very well detailed..

Question for you, Im configuring a SIP trunk to an ITSP at the moment, I have the IOS Gateway successfully registered to the ITSP. However outbound calls are not going through. Getting an UNAUTHORIZED SIP Message from the provider.

I know some providers expect certain SIP Headers and particular information with the SIP Headers. Is there a way to debug or view the expected information a Provider is requires? Therefore I can normalise the SIP Headers as needed.



Hello Ben

Thanks. Yes you can do the debug and see the data contained within the sip-header arriving at the gateway from/to the Service provider. Then later you can normalise the SIP header as expected by the Service provider.

Enable command "header-passing". Purpose of the command “header-passing”, configured under the “voice service voip” SIP section, is to pass data contained within SIP headers arriving at the GW. Prior to the implementation of this feature, voice applications running on the gateway did not have access to headers sent in SIP requests.

Router(config)#voice service voip



Then do the troubleshooting,

Show subscription sip – show current SIP subscriptions

Debug voip ccapi protoheaders—Displays messages sent between the originating and terminating gateways. If no headers are being received by the terminating gateway, verify that the header-passing command is enabled on the originating gateway.

Debug ccsip message – Provides visibility for SIP messages arriving at and departing from the CUBE.  Displays contents of SIP headers found in signal messages.

Refer this link for sample output and more info...

Based on the debug result you can normalise the sip header and if required enable the "header-passing". I hope this information is useful. Thanks.

Rising star

Here is a good link on binding the correct IP address to the SIP message by using the bind command at the dial-peer level. This is more ideal that setting it at the global level, which might not always achieve what you need. i.e. bind the external interface for SIP messages to / from SIP provider and the internal interface IP address for SIP messages going to / from CUCM / CVP etc.



Barkai Yaari

Very helpful post, thank you so much :)


Content for Community-Ad

Spotlight Awards 2021