[SR-Users] KSR.sdpops.remove_media is not working as expected

Miteshkumar Thakkar mitesh.thakkar at plivo.com
Tue Dec 17 06:53:19 CET 2019


Hi,

I wants to remove media type "image" from SDP. For that I have tried to
use KSR.sdpops.remove_media but it is not working. Not working in the sense
that there is no effect of that function on SDP. I am using lua. Kindly
find more details below.

*Kamailio version*: kamailio 5.2.5 (x86_64/linux) 62d35f

*SDP to process:*
INVITE sip:xxxxxxxxxx at xxxxxxxxx.com:5060 SIP/2.0
Via: SIP/2.0/UDP xxx.xxx.xxx.xxx:5060;branch=z9hG4bK-60823-1-0
From: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060>;tag=xxxxx
To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060>
Call-ID: 1-60823 at 172.16.19.64
CSeq: 1 INVITE
Contact: sip:xx at xxxxxxx:5060
Max-Forwards: 70
Content-Type: application/sdp
Content-Length:   337

v=0
o=zt 53655765 2353687637 IN IP4 xxx.xxx.xxx.xxx
s=-
c=IN IP4 xxx.xxx.xxx.xxx
t=0 0
m=image xxxx RTP/AVP udptl t38
a=sendrecv
a=T38FaxVersion:0
a=T38MaxBitRate:14400
a=T38FaxRateManagement:transferredTCF
a=T38FaxMaxBuffer:262
a=T38FaxMaxDatagram:176
a=T38FaxUdpEC:t38UDPRedundancy
m=audio xxxx RTP/AVP 0
a=rtpmap:0 PCMU/8000


*Code snippet:*
KSR.sdpops.remove_media("image")
logger.log("info", "SDP:" .. headers.get("$sdp(body)"))

*Log snippet:*
https://pastebin.com/5JZmQUfq

One more thing I would like to mention that if I do not use dialog module
then the function KSR.sdpops.remove_media works. But I can not avoid using
dialog module.

Thanks in advance.

Mitesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191217/4ad4b92e/attachment.html>


More information about the sr-users mailing list