[cisco-voip] SIP Normalization Script

Roger Wiklund roger.wiklund at gmail.com
Thu Oct 27 06:08:46 EDT 2011


Check out the dev guide for SIP transperency and normalization:
http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/sip_tn/8_5_1/sip_t_n.pdf

page 27, modifyHeader

Here is my Diversion header normalization script, if you wanna use it
as base and modify to your needs, not that this uses the
applyNumberMask function because I modify number and not the IP.

M = {}
local mask = scriptParameters.getValue("Diversion-Mask")
 function mask_diversion(msg)
    if mask
    then
       msg:applyNumberMask("Diversion", mask)
    end
end
function M.outbound_INVITE(msg)
mask_diversion(msg)
end
return M

It defines a "variable" called Diversion-Mask
Under the SIP trunk config, select your script, and enter
Diversion-Mask in the Parameter Name
In the Parameter Value enter your mask, for example if 4685661XXXX.

On Thu, Oct 27, 2011 at 10:40 AM, Terpreau, Christophe
<ct773q at intl.att.com> wrote:
> Hello,
>
> I’m using CUCM 8.5.1 and would like to use a sip normalization script to
> replace domain name/ip in a sip invite header.
>
>
>
> I want replace
>
>
>
> From:
> <sip:003318364XXXX at 192.168.10.200>;tag=22~e8453ebe-922b-4be2-8809-d5a36dd7f976-27199614
> To: <sip:014941XXXX at sip.XXX.net>
> Remote-Party-ID:
> <sip:003318364XXXX at 192.168.10.200>;party=calling;screen=yes;privacy=off
>
>
>
> To
>
>
>
> From: "003318364XXXX" <sip:003318364XXXX at sip.xxx.net>;tag=c5b255163ae082co0
> To: <sip:0149410000 at sip.xxx.net>
> Contact: "0033183644040" sip:003318364XXXX at publicipaddress:5060
>
>
>
> I want to replace the local Lan ip address by the public one in the sip
> invite header.
>
>
>
>
>
>
>
> Cheers.
>
> Thx
>
>
>
> _______________________________________________
> cisco-voip mailing list
> cisco-voip at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-voip
>
>



More information about the cisco-voip mailing list