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

CUCM normalization script, match and change SIP Request URI

singh.amanprt
Level 1
Level 1

Hi All,

 

I’m trying to create a script to modify the request URI based on the match and translate it to a number, secondly change the domain part of the URI but unfortunately no success yet.

 

We want to translate the Request URI “meet@lab.uc.net” to “7777@uc.net” and “<anything>@lab.uc.net” to “<anything>@uc.net”, this is what I have created but no success,

 

M = {}

function M.outbound_INVITE(msg)

local method, ruri, ver = msg:getRequestLine()

local user = msg:getRequestLine(user)

local newuser = string.gsub(user, "meet", "7777")

local uri = string.gsub (ruri, “lab.uc.net″, “uc.net”)

msg:setRequestUri (newuser,uri)

end

 

Not very much familiar with the Lua scripting, wondering if someone please suggest/guide on this.

 

Thanks in advance.

0 Replies 0