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

Created by: John Schlimgen on 16-08-2011 03:23:00 PM
Can anyone help out?  I need to insert a Plus in the the Diversion header User field.  The Mask fields listed are all fixed length.  The client has a veraible length dial plan.

Subject: RE: SIP Normalization Script - Insert Plus for a varable length dial plan
Replied by: Yossi Ben Hagai on 08-09-2011 03:37:39 PM
You can try something like the below (haven't tested it):
1
2M = {}
3    function M.outbound_INVITE(msg)
4        local div = msg:getHeader("Diversion")")
5        local uri = string.gsub(div, "<", "<+")
6        msg:modifyHeader("Diversion")", uri)
7    end
8return M


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