cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
268
Views
0
Helpful
0
Comments
cdnadmin
Level 11
Level 11
This document was generated from CDN thread

Created by: Christa Sherker on 08-09-2011 11:34:14 AM
<pre>We need to utilize LUA to manipulate SIP headers for interoperability
with our SIP trunking provider.

We need the ability to parse the first 6 digits of the From URI-user field of the INVITE
header.  Does anyone know of any documentation on the parsing capabilities of the LUA
scripting or any modules that can be added to support this.  Thanks.
</pre>

Subject: RE: Parsing capabilities in CUCM LUA
Replied by: Yossi Ben Hagai on 08-09-2011 03:07:07 PM
Hi,

The this calling party number manipulation functionality you have described can be achieved with number translation on the CUCM admin GUI.
However, doing it with normalization script should be just as easy, for example to add a prefix of "1" to the 6 leftmost digits, the following script should do the trick (never actually tested this one):
1
2M = {}
3function M.inbound_INVITE(msg)
4msg:applyNumberMask("From", "1XXXXXX")
5end
6return M


The Lua environment on CUCM does not include all standard Lua libraries, fortunately you have the string manipulation library at hand if you want to go freestyle.


Regards,
Yossi.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links