I'm in the process of migrating our VCS registered devices to CUCM. One of the VCS features we used was a SIP URI dialing pattern to our video provider's SIP trunk. If a user needed to go into a meeting bridge 1234, they could dial 1234@video.com. The VCS then converted this to 18005556789**1234 before sending to the video provider which they accepted without issue. Since I can't modify SIP URI dialing like that in CUCM directly, I figured I would setup a SIP Normalization script to do the same modification as the call went to the provider. This is my first time programming one and it's not working at all. Per the traces, the INVITE is not being modified after the script. I added trace commands and enabled tracing (both in the SIP Trunk config and the script), but no results are being written to the SDL traces either. Any suggestions?
Here's the script (names, IPs and numbers have been modified to make it more generic):
M = {}
function M.outbound_INVITE(msg)
trace.enable()
trace.format("Tracing enabled and working")
local method, ruri, ver = msg:getRequestLine()
if string.find(ruri,"video.com") then
local ruri2 - string.gsub (ruri, "sip:", "")
local ruri3 = "sip:18005556789**" .. ruri2
local ruri4 = string.gsub (ruri3, “video.com", “10.10.10.10”)
trace.format("Invite now is %s", ruri4)
msg:setRequestUri(ruri4)
end
end
return M