I need help in adding a user in a specific case when a call comes in without a "source number" "user", i get a SIP "From" header looking like this:
"<sip:10.160.108.53>;tag=2821~76ab30d4-0f12-4cd8-8bec-63e69de49af2-34353355", and this call is not possible to answer.
I have tried with the following script but i must be "off" somwhere casuse it does not work :-)
M = {}
local function add_user(msg, header)
local uriString = msg:getUri(header)
if uriString
then
local uri = sipUtils.parseUri(uriString)
if uri
then
local user = uri:getUser()
if user == nil or user == "" then
local newuri = string.format("<sip:anonymous@%s>", "%1")
hdrvalue = hdrvalue:gsub("<sip

.*)>", newuri)
end
end
end
end
end
local function process_outbound_INVITE(msg)
add_user(msg, "From")
end
M.outbound_INVITE = process_outbound_INVITE -- Process outbound INVITE
return M
Anyone how can point me in the right direction ?
Bengt