• Home

    • Welcome to the next step of Collaboration within the Cisco technical community in Belgium and Luxembourg
  • Categories

  • Archives

  • Cisco Belgium Tweets

  • Advertisements

Normalization scripting for SIP Trunking first step

SIP trunks can connect to a variety of endpoints, including PBXs, gateways, and service providers. Each of these endpoints implements the SIP protocol a bit differently, causing a unique set of interoperability issues. To normalize messages per trunk, Cisco Unified Communications Manager allows you to add or update scripts to the system and then associate them with one or more SIP trunks.

The normalization scripts that you create allow you to preserve, remove, or change the contents of any SIP headers or content bodies, known or unknown. After you configure a normalization script in Cisco Unified Communications Manager, you associate the script with a SIP trunk by configuring the Normalization Script fields in the Trunk Configuration window

The language used is Lua it is an open source, lightweight scripting language.

For info on Lua see http://www.lua.org/

As a practical example we change in the SIP invite for a outgoing call on a sip trunk, the IP destination addresses in the SIP URI to a domain name.


INVITE sip:+3227784342@ SIP/2.0

The normalization script:

M = {}

function M.outbound_INVITE(msg)

local method, ruri, ver = msg:getRequestLine()

local uri = string.gsub (ruri, “”, “domain1.a.be”)



return M

Changes into:

INVITE sip:+3227784200@domain1.a.be:5060 SIP/2.0

For some more info see:



%d bloggers like this: