Hello, does it actually remove the media after you send the message out? Usually the message altering functions will only be applied when you send out the message due to performance reasons.
You can force it in the cfg with the function “msg_apply_changes” – then you should be able to see it as well in the log. But using this function has other side effects and is not recommended if you don’t need it. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com<https://gilawa.com/> From: sr-users <[email protected]> On Behalf Of Miteshkumar Thakkar Sent: Tuesday, December 17, 2019 6:53 AM To: [email protected] Subject: [SR-Users] KSR.sdpops.remove_media is not working as expected 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:[email protected]:5060<http://sip:[email protected]: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<http://xxxxxxxxxx.com:5060>>;tag=xxxxx To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060<http://xxxxxxxxxx.com:5060>> Call-ID: [email protected]<mailto:[email protected]> CSeq: 1 INVITE Contact: sip:xx@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
_______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
