cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
13153
Views
10
Helpful
1
Comments
Sarthak Saksena
Cisco Employee
Cisco Employee

     Overview

Sip normalization is a method used to modify sip messages sent from the call manager out the sip trunk. Before call manager 8.5 if we had to modify the sip messages the same had to be done by using a CUBE and appliying sip profiles on dial peers.

It is normally required in a scenario when you are integrated with a third party sip server and they have specific requirements in terms of information coming from the cisco side.

Topology

         Cisco call manager (8.5 and above) ---> sip trunk -----> third party sip server

Normalization Scripts

  1. Sip normalization is a C script which enables us to change the various headers fields of a SIP messgae such as invite , from to, 181 etc.
  2. We create a recusrive function call, and enter the queries in a if else format.
  3. Following are the steps to apply a normalization scrip on calls:

  • On the call manager admin page go to device
  • Navigate to device settings and select sip mormalization script under it.
  • Click on add new. Name the scipt something according to your naming conventions.

Below is a example of a default script where in we need to change the from feild in the SIP invite message and add "user=phone" tag.

Default Invite

INVITE sip:6233284618@0.0.0.0:5060 SIP/2.0

Via: SIP/2.0/UDP 0.0.0.0:5060;branch=z9hG4bK2938b58562

From: <sip:5555@0.0.0.0>;tag=241~f88ceed7-4ccc-49aa-ad02-4534616cc344-29414802

To: <sip:6233284618@0.0.0.0>

Date: Wed, 07 Mar 2012 02:14:07 GMT

Call-ID: 36ac8700-f561c46f-1a-500a0ac@0.0.0.0

Supported: timer,resource-priority,replaces

Min-SE:  1800

User-Agent: Cisco-CUCM8.5

Allow: INVITE, OPTIONS, INFO, BYE, CANCEL, ACK, PRACK, UPDATE, REFER, SUBSCRIBE, NOTIFY

CSeq: 101 INVITE

Expires: 180

Allow-Events: presence

Supported: X-cisco-srtp-fallback

Supported: Geolocation

Cisco-Guid: 0917276416-0000065536-0000000037-0083927212

Session-Expires:  1800

P-Asserted-Identity: <sip:5555@0.0.0.0>

Remote-Party-ID: <sip:5555@0.0.0.0>;party=calling;screen=yes;privacy=off

Contact: <sip:5555@0.0.0.0:5060>

Max-Forwards: 70

Content-Length: 0

           

Modified Invite

INVITE sip:4690717@0.0.0.0;user=phone SIP/2.0

Via: SIP/2.0/UDP 0.0.0.0:5060;branch=z9hG4bK380671373

From: 7024343344 <sip:7024343344@0.0.0.0;user=phone>;tag=00404d0102030a0a0a36-4950fca5

To: <sip:4690717@0.0.0.0;user=phone>

Call-ID: 1996806959@0.0.0.0

CSeq: 2 INVITE

Contact: <sip:7024343344@0.0.0.0;user=phone>

Authorization: Digest username="476119065202", realm="BroadWorks", nonce="BroadWorksXgt37bop3Td0105nBW", uri="sip:4690717@0.0.0.0;user=phone", response="4a8491694347451bd28dd2b5c35bc1a8", algorithm=MD5, cnonce="702c5d07", qop=auth, nc=00000001

Max-Forwards: 70

User-Agent: HST-3000/6.0.0

Unsupported: 100rel

Supported: resource-priority

Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, NOTIFY, INFO

Content-Type: application/sdp

Content-Length:   133

As observed above we need to add a tag "user=phone" in the from message.

Normalization Script

M = {}

function M.outbound_INVITE(msg)

   msg:addHeaderUriParameter("From", "user", "phone")

end

return M

This script is a recursive C function call. We created a function M.outbound_INVITE(msg) which is for outbound calls and will affect the invite message.

It will modify the from field to the desired results.

  • After adding the script save the same.
  • Go to the SIP trunk configured for out bound calls.
  • Choose this script on the SIP trunk and then save it.

Important Links

Link for SIP normalization scripts:

http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/sip_tn/8_5_1/10-sip_transparency.html

Hope this helpful.

1 Comment
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: