Given a URI string, this function parses the specified URI into a sipUri object and returns the sipUri object to the calling script. Null is returned if a valid URI is not specified.
Example:
Script
MM = {}
function M.inbound_INVITE(msg)
local uriString = msg:getUri("P-Asserted-Identity")
if uriString
then
local uri = sipUtils.parseUri(uriString)
end
end
return M
Message
INVITE sip:1234@10.10.10.1 SIP/2.0
.
P-Asserted-Identity: <sip:1234@10.10.10.1>
.
Output/Results
Local variable uriString is set to "sip:1234@10.10.10.1"
Local variable uri is a sipUri object containing the parsed form of uriString