Log In
Developer Network
Technologies
Join the Network
Member Services
Events & Community
Unified Communications Manager SIP (SIP) Developer Center
Overview
Documentation
Community
Wiki
Testing
Everything
This Site
Blogs
9.1 SIP Documentation Now Available
Adrienne Moherek
10 Jan 2013
Unified Communications 9.0 Partner Bundle Offer Now Available to Order
Amanda Whaley
21 Sep 2012
Update - Silent Monitoring/Recording Supported Devices
George Gary
31 Aug 2012
Developer Partner 2012 US Update Presentations Available
George Gary
29 Jun 2012
Developer Partner 2012 London Update Presentations Available
George Gary
10 Feb 2012
Showing 1 - 5 of 21 results.
Items per Page 5
Page
(Changing the value of this field will reload the page.)
1
2
3
4
5
of 5
First
Previous
Next
Last
Forums
Message Boards Home
Recent Posts
Statistics
Answer
(
Unmark
)
Mark as an Answer
« Back to SIP Transparency and Normalization Questions
Masking the Calling Name based on Calling number
Threads [
Previous
|
Next
]
WILLIAM HATCHER
Posts:
1
Join Date:
5/27/11
Recent Posts
Masking the Calling Name based on Calling number
sip normalization
Answer
4/23/12 4:29 PM
Mark as an Answer
Submit
Reply with Quote
Quick Reply
We are trying to write a normalization script to change the outbound
calling name. We have several companies that are tenants as well, so
changing it just on the trunk is not an option since all tenants utilize
the same SIP trunk. We want to make the change based on the calling
number. Here is the script that we have come up with, but it does not
seem to be working. Also the trace is enabled on both the script and
the trunk, but we are not seeing any trace in the sdi when we make
calls. Any help or suggestions would be greatly appreciated.
Bill
M = {}
trace.enable()
local function modifyMessage(msg, newstring)
local newstring1 = '"'..newstring..'"'
trace.format("Newstring is %s", newstring)
trace.format("Newstring1 is %s", newstring1)
local paivalue = msg:getHeader("P-Asserted-Identity")
local painewuri = newstring1.." "..string.match(value, "(<.+>)")
trace.format("PAIValue is %s", paivalue)
trace.format("PAINewuri is %s", painewuri)
msg:modifyHeader("P-Asserted-Identity", painewuri)
local fromvalue = msg:getHeader("From")
local fromnewuri = newstring1.." "..string.match(value, "(<.+>)")
trace.format("FromValue is %s", fromvalue)
trace.format("FromNewuri is %s", fromnewuri)
msg:modifyHeader("From", fromnewuri)
local rpivalue = msg:getHeader("Remote-Party-ID")
local rpinewuri = newstring1.." "..string.match(value, "(<.+>)")
trace.format("RPIValue is %s", rpivalue)
trace.format("RPINewuri is %s", rpinewuri)
msg:modifyHeader("Remote-Party-ID", rpinewuri)
end
function M.outbound_ANY(msg)
local from = msg:getHeader("From")
if(from.find('636827...') not -1)
then
modifyMessage(msg, "Maritz")
end
if(from.find('6362262[0-5]..') not -1)
then
modifyMessage(msg, "Intellispend")
end
end
return M
Sign in to vote.
Flag
Please sign in to flag this as inappropriate.
Top
Collateral
No files available