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@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@172.16.19.64 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
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.comhttps://gilawa.com/
From: sr-users sr-users-bounces@lists.kamailio.org On Behalf Of Miteshkumar Thakkar Sent: Tuesday, December 17, 2019 6:53 AM To: sr-users@lists.kamailio.org 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:xxxxxxxxxx@xxxxxxxxx.com:5060http://sip:xxxxxxxxxx@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:5060http://xxxxxxxxxx.com:5060>;tag=xxxxx To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060http://xxxxxxxxxx.com:5060> Call-ID: 1-60823@172.16.19.64mailto:1-60823@172.16.19.64 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
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message. True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you, Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt hw@skalatan.de wrote:
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
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Miteshkumar Thakkar *Sent:* Tuesday, December 17, 2019 6:53 AM *To:* sr-users@lists.kamailio.org *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:xxxxxxxxxx@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@172.16.19.64 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:*
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
Hello,
I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Miteshkumar Thakkar mitesh.thakkar@plivo.com Sent: Thursday, December 19, 2019 10:56 AM To: Henning Westerholt hw@skalatan.de Cc: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message. True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you, Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> wrote: 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.comhttps://gilawa.com/
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of Miteshkumar Thakkar Sent: Tuesday, December 17, 2019 6:53 AM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org 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:xxxxxxxxxx@xxxxxxxxx.com:5060http://sip:xxxxxxxxxx@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:5060http://xxxxxxxxxx.com:5060>;tag=xxxxx To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060http://xxxxxxxxxx.com:5060> Call-ID: 1-60823@172.16.19.64mailto:1-60823@172.16.19.64 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
The log mentioned at https://pastebin.com/5JZmQUfq is by configuring "debug = 4" in kamailio.cfg. Please suggest other way if any, to get more debug logs.
Thank you, Mitesh
On Thu, Dec 19, 2019 at 3:34 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* Miteshkumar Thakkar mitesh.thakkar@plivo.com *Sent:* Thursday, December 19, 2019 10:56 AM *To:* Henning Westerholt hw@skalatan.de *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message.
True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you,
Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt hw@skalatan.de wrote:
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
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Miteshkumar Thakkar *Sent:* Tuesday, December 17, 2019 6:53 AM *To:* sr-users@lists.kamailio.org *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:xxxxxxxxxx@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@172.16.19.64 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:*
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
Hello,
from the logs it looks ok, no error etc..:
3(237) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: remove_media is str: image 3(237) DEBUG: sdpops [sdpops_mod.c:1037]: sdp_remove_media(): attempting to search for media type: [image] 3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 0 of 0 - media [image] 3(237) DEBUG: sdpops [sdpops_mod.c:1061]: sdp_remove_media(): removing media stream: image 3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 1 of 0 - media [audio]
This is probably a more frequest used function from the module. Can you double check if it’s really not removed on the network layer?
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Miteshkumar Thakkar mitesh.thakkar@plivo.com Sent: Thursday, December 19, 2019 11:16 AM To: Henning Westerholt hw@skalatan.de Cc: Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org Subject: Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
The log mentioned at https://pastebin.com/5JZmQUfq is by configuring "debug = 4" in kamailio.cfg. Please suggest other way if any, to get more debug logs.
Thank you, Mitesh
On Thu, Dec 19, 2019 at 3:34 PM Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> wrote: Hello,
I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working.
Cheers,
Henning
-- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.comhttps://gilawa.com/
From: Miteshkumar Thakkar <mitesh.thakkar@plivo.commailto:mitesh.thakkar@plivo.com> Sent: Thursday, December 19, 2019 10:56 AM To: Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> Cc: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org> Subject: Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message. True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you, Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt <hw@skalatan.demailto:hw@skalatan.de> wrote: 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.comhttps://gilawa.com/
From: sr-users <sr-users-bounces@lists.kamailio.orgmailto:sr-users-bounces@lists.kamailio.org> On Behalf Of Miteshkumar Thakkar Sent: Tuesday, December 17, 2019 6:53 AM To: sr-users@lists.kamailio.orgmailto:sr-users@lists.kamailio.org 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:xxxxxxxxxx@xxxxxxxxx.com:5060http://sip:xxxxxxxxxx@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:5060http://xxxxxxxxxx.com:5060>;tag=xxxxx To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060http://xxxxxxxxxx.com:5060> Call-ID: 1-60823@172.16.19.64mailto:1-60823@172.16.19.64 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
Hi,
After removing media using below code, I am sending offer to rtpengine. RTPEngine is receiving entire SDP. It is receiving media type "image" as well. I have tested again.
KSR.sdpops.remove_media("image") logger.log("info", "SDP:" .. headers.get("$sdp(body)"))
*SDP from RTPEngine log:*
=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
On Thu, Dec 19, 2019 at 4:04 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
from the logs it looks ok, no error etc..:
3(237) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: remove_media is str: image
3(237) DEBUG: sdpops [sdpops_mod.c:1037]: sdp_remove_media(): attempting to search for media type: [image]
3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 0 of 0 - media [image]
3(237) DEBUG: sdpops [sdpops_mod.c:1061]: sdp_remove_media(): removing media stream: image
3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 1 of 0 - media [audio]
This is probably a more frequest used function from the module. Can you double check if it’s really not removed on the network layer?
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* Miteshkumar Thakkar mitesh.thakkar@plivo.com *Sent:* Thursday, December 19, 2019 11:16 AM *To:* Henning Westerholt hw@skalatan.de *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
The log mentioned at https://pastebin.com/5JZmQUfq is by configuring "debug = 4" in kamailio.cfg. Please suggest other way if any, to get more debug logs.
Thank you,
Mitesh
On Thu, Dec 19, 2019 at 3:34 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* Miteshkumar Thakkar mitesh.thakkar@plivo.com *Sent:* Thursday, December 19, 2019 10:56 AM *To:* Henning Westerholt hw@skalatan.de *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message.
True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you,
Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt hw@skalatan.de wrote:
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
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Miteshkumar Thakkar *Sent:* Tuesday, December 17, 2019 6:53 AM *To:* sr-users@lists.kamailio.org *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:xxxxxxxxxx@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@172.16.19.64 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:*
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
Thank you Henning.
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.
Yes, that's true. When the message sent out, I can see that remove_media() has actually removed that part from SDP.
So basically, when I am sending rtpengine_offer, SDP is not altered. What should I do to alter SDP before calling rtpengine_offer?
On Fri, Dec 20, 2019 at 3:16 PM Miteshkumar Thakkar < mitesh.thakkar@plivo.com> wrote:
Hi,
After removing media using below code, I am sending offer to rtpengine. RTPEngine is receiving entire SDP. It is receiving media type "image" as well. I have tested again.
KSR.sdpops.remove_media("image") logger.log("info", "SDP:" .. headers.get("$sdp(body)"))
*SDP from RTPEngine log:*
=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
On Thu, Dec 19, 2019 at 4:04 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
from the logs it looks ok, no error etc..:
3(237) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: remove_media is str: image
3(237) DEBUG: sdpops [sdpops_mod.c:1037]: sdp_remove_media(): attempting to search for media type: [image]
3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 0 of 0 - media [image]
3(237) DEBUG: sdpops [sdpops_mod.c:1061]: sdp_remove_media(): removing media stream: image
3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 1 of 0 - media [audio]
This is probably a more frequest used function from the module. Can you double check if it’s really not removed on the network layer?
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* Miteshkumar Thakkar mitesh.thakkar@plivo.com *Sent:* Thursday, December 19, 2019 11:16 AM *To:* Henning Westerholt hw@skalatan.de *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
The log mentioned at https://pastebin.com/5JZmQUfq is by configuring "debug = 4" in kamailio.cfg. Please suggest other way if any, to get more debug logs.
Thank you,
Mitesh
On Thu, Dec 19, 2019 at 3:34 PM Henning Westerholt hw@skalatan.de wrote:
Hello,
I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working.
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
*From:* Miteshkumar Thakkar mitesh.thakkar@plivo.com *Sent:* Thursday, December 19, 2019 10:56 AM *To:* Henning Westerholt hw@skalatan.de *Cc:* Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected
Thank you for your response Henning!
Unfortunately, it is not removed from outgoing message.
True. I also believe that msg_apply_changes is not recommended, hence I am not using that.
Thank you,
Mitesh
On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt hw@skalatan.de wrote:
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
*From:* sr-users sr-users-bounces@lists.kamailio.org *On Behalf Of *Miteshkumar Thakkar *Sent:* Tuesday, December 17, 2019 6:53 AM *To:* sr-users@lists.kamailio.org *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:xxxxxxxxxx@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@172.16.19.64 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:*
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
Hello,
do msg_apply_changes() after removing the media stream:
KSR.sdpops.remove_media("image")
KSR.textopsx.msg_apply_changes()
then do the rtpengine control.
The rtpengine takes the full sdp and puts back a full one.
Cheers, Daniel
On 06.01.20 10:19, Miteshkumar Thakkar wrote:
Thank you Henning.
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.
Yes, that's true. When the message sent out, I can see that remove_media() has actually removed that part from SDP.
So basically, when I am sending rtpengine_offer, SDP is not altered. What should I do to alter SDP before calling rtpengine_offer?
On Fri, Dec 20, 2019 at 3:16 PM Miteshkumar Thakkar <mitesh.thakkar@plivo.com mailto:mitesh.thakkar@plivo.com> wrote:
Hi, After removing media using below code, I am sending offer to rtpengine. RTPEngine is receiving entire SDP. It is receiving media type "image" as well. I have tested again. KSR.sdpops.remove_media("image") logger.log("info", "SDP:" .. headers.get("$sdp(body)")) *SDP from RTPEngine log:* * * =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 On Thu, Dec 19, 2019 at 4:04 PM Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> wrote: Hello, from the logs it looks ok, no error etc..: 3(237) DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: remove_media is str: image 3(237) DEBUG: sdpops [sdpops_mod.c:1037]: sdp_remove_media(): attempting to search for media type: [image] 3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 0 of 0 - media [image] 3(237) DEBUG: sdpops [sdpops_mod.c:1061]: sdp_remove_media(): removing media stream: image 3(237) DEBUG: sdpops [sdpops_mod.c:1053]: sdp_remove_media(): stream 1 of 0 - media [audio] This is probably a more frequest used function from the module. Can you double check if it’s really not removed on the network layer? Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com <https://gilawa.com/> *From:* Miteshkumar Thakkar <mitesh.thakkar@plivo.com <mailto:mitesh.thakkar@plivo.com>> *Sent:* Thursday, December 19, 2019 11:16 AM *To:* Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> *Cc:* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected The log mentioned at https://pastebin.com/5JZmQUfq is by configuring "debug = 4" in kamailio.cfg. Please suggest other way if any, to get more debug logs. Thank you, Mitesh On Thu, Dec 19, 2019 at 3:34 PM Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> wrote: Hello, I see – do you get any error message in the logs? Can you execute it with debug logging activated, the function should output some debug logs about its working. Cheers, Henning -- Henning Westerholt – https://skalatan.de/blog/ Kamailio services – https://gilawa.com <https://gilawa.com/> *From:* Miteshkumar Thakkar <mitesh.thakkar@plivo.com <mailto:mitesh.thakkar@plivo.com>> *Sent:* Thursday, December 19, 2019 10:56 AM *To:* Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> *Cc:* Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>> *Subject:* Re: [SR-Users] KSR.sdpops.remove_media is not working as expected Thank you for your response Henning! Unfortunately, it is not removed from outgoing message. True. I also believe that msg_apply_changes is not recommended, hence I am not using that. Thank you, Mitesh On Thu, Dec 19, 2019 at 3:14 PM Henning Westerholt <hw@skalatan.de <mailto:hw@skalatan.de>> wrote: 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 <sr-users-bounces@lists.kamailio.org <mailto:sr-users-bounces@lists.kamailio.org>> *On Behalf Of *Miteshkumar Thakkar *Sent:* Tuesday, December 17, 2019 6:53 AM *To:* sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> *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:xxxxxxxxxx@xxxxxxxxx.com:5060 <http://sip:xxxxxxxxxx@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 <http://xxxxxxxxxx.com:5060>>;tag=xxxxx To: xxxxxxxxxx <sip: xxxxxxxxxx@ xxxxxxxxxx.com:5060 <http://xxxxxxxxxx.com:5060>> Call-ID: 1-60823@172.16.19.64 <mailto:1-60823@172.16.19.64> 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 sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users