cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1890
Views
5
Helpful
3
Replies

How to remove m=application line from SDP header

Paul Freiberg
Level 1
Level 1

Hi,

 

I got a problem with my cisco jabber when I use them as sofphone.

I removed all video sdp-headers but one line I can not remove with sip-profile:

m=application xxxxx RTP/SAVP 125

First my itsp always send me "message too large".

Now just "Not Acceptable Here"

I do not want to disable video for all csf's.

A call with a video telefon like dx80 works with removing all video sdp-headers.

Do you have an idea?

I tried this script on the sip trunk but without succes and I do not found a way to debug it:

M = {}


function M.inbound_INVITE(msg)

    local sdp = msg:getSdp()


    if sdp

    then

        sdp = sdp:removeLine("m=", "application")

        msg:setSdp(sdp)

    end

end

 

1 Accepted Solution

Accepted Solutions

M = {}
function M.outbound_INVITE(msg)
local sdp = msg:getSdp()
if sdp
then
sdp = sdp:removeMediaDescription(3)
msg:setSdp(sdp)
end
end
return M

View solution in original post

3 Replies 3

Paul Freiberg
Level 1
Level 1

OK after reading the Developer Guide for SIP Transparency and Normalization

I realazied that I just had to change the line:

"function M.inbound_INVITE(msg)"

to

"function M.outbound_INVITE(msg)"

Then I associated the script with the sip trunk to my cube/pstn and now I can call outside with the softclints :D

 

Thx 4 reading

M = {}
function M.outbound_INVITE(msg)
local sdp = msg:getSdp()
if sdp
then
sdp = sdp:removeMediaDescription(3)
msg:setSdp(sdp)
end
end
return M

Thanks ryschaef  ,

we resolved it with regions. To PSTN we do not allow video.

But if we do, I will use your script :)