11-28-2016 07:24 AM
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,
Solved! Go to Solution.
11-30-2016 08:13 AM
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
11-30-2016 08:13 AM
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