Dear Colleagues,
After a CUCM implementation I have faced with a problem. The anonymous calls are not forwarded and the provider informed me that the outbound INVITE has to met for two requirements:
- The INVITE's PAI has to contain a supported phone number instead of anonymous ID
- The INVITE has to contain Privacy:ID line
I wrote a LUA script and I have added it to the SIP trunk, but it does not work, please be so kind to help me out.
M = {}
function M.outbound_INVITE(msg)
local header = msg:getHeader("From")
if string.find(header, "anonymous")
then
local oldPAI = msg:getHeader("P-Asserted-Identity")
local newPAI = string.gsub(oldPAI, "anonymous@", "+3611234567@")
msg:modifyHeader("P-Asserted-Identity", newPAI)
msg:addHeader("Privacy", "ID")
end
end
return M
Thanks in advance,
Laci