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

Normalization script to remove codecs for range of extensions

jeesemon.91
Level 1
Level 1

Hi all

 

    For an issue that we are facing found that SIP normalization script will be a resolution. Here my goal is to restrict all video codecs for a particular range of extension.

Found a script from cisco dev guide to remove the codecs. But i need the script for particular range of extension.  
Can someone please help on this ?

 

M = {}

function M.outbound_INVITE(msg)
     local sdp = msg:getSdp()

     if sdp
     then
        sdp = sdp:removeLine("a=rtpmap:", "G729")
        msg:setSdp(sdp)
     end
end
return M

1 Reply 1

Anthony Holloway
Cisco Employee
Cisco Employee

To help nudge you in the right direction, but not straight out give you a solution, look to the following two items:

 

1) store a reference to the From header

 

from = msg:getHeader("From")

 

2) check if the the from number is in the from

 

if string.find(from, "2001")