cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3000
Views
0
Helpful
2
Replies

SIP Normalization Script Assistance:

philjaeger
Level 1
Level 1

Good Day,

I'm running CUCM 10.5.1 and having issues with a SIP normalization script.   I am trying to change any diversion header, in an invite message,  to a specific phone number.   The script I am using is below but it doesn't make any changes to the diversion header.

M={}

function M.outbound_INVITE(msg)
msg:applyNumberMask("Diversion", "4078222000")

end


function M.outbound_INVITE(msg)
msg:applyNumberMask("P-Asserted-Identity", "XXXXXXXXXX")

end
return M

Any advice is appreciated.

Regards,

1 Accepted Solution

Accepted Solutions

Mark Stover
Cisco Employee
Cisco Employee

I have never tried a script exactly like this, but what I believe is happening is that only the second function is being run, and it is masking the P-Asserted-Identity right back to the same number it started with...

You Lua script can only have 1 outbound_INVITE rule... If you wanted to do both things in a single script, it would have to look like this...

M={}

  function M.outbound_INVITE(msg)

    msg:applyNumberMask("Diversion", "4078222000")

    msg:applyNumberMask("P-Asserted-Identity", "XXXXXXXXXX")

  end

return M

View solution in original post

2 Replies 2

Mark Stover
Cisco Employee
Cisco Employee

I have never tried a script exactly like this, but what I believe is happening is that only the second function is being run, and it is masking the P-Asserted-Identity right back to the same number it started with...

You Lua script can only have 1 outbound_INVITE rule... If you wanted to do both things in a single script, it would have to look like this...

M={}

  function M.outbound_INVITE(msg)

    msg:applyNumberMask("Diversion", "4078222000")

    msg:applyNumberMask("P-Asserted-Identity", "XXXXXXXXXX")

  end

return M

Thank you for the assist!  Works fine now.