From khorsmann@gmail.com Fri Nov 1 18:03:08 2019 From: Karsten Horsmann To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] How to use sdp_remove_media() ? Date: Fri, 01 Nov 2019 18:02:51 +0100 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1937379296==" --===============1937379296== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi Denys, AFAIK read and writes rtpengine the complete sdp. So manipulating with the "classic" textops tools is more for RtpProxy. You can search for things but writing will done by rtpengine. I remove for example an codec with codec-mask. Or you can manipulate the avp you read from rtpengine (via modparam) in the request. Did you try to *codec-mask=3D in the rtpengine calls (answer / manage)? * *So rtpengine takes care for the removal. * *It needs to know what to remove. * https://www.kamailio.org/docs/modules/5.3.x/modules/rtpengine.html#idm1459 Cheers Karsten Denys Pozniak schrieb am Fr., 1. Nov. 2019, 15:10: > If I put route(SDP_VIDEO_REMOVER) into the section route[NATMANAGE] ( > https://github.com/kamailio/kamailio/blob/master/etc/kamailio.cfg#L820 ), > Kamailio shows the error I posted below. > > route[SDP_VIDEO_REMOVER] { > if ( is_request() && has_body("application/sdp") && > sdp_with_media("video") ) { > sdp_remove_media("video"); > msg_apply_changes(); > xlog("L_WARN","[$cfg(route)] *m=3Dvideo detected* | > $rm/$rs/$avp(sdp_mvideo_line)/ \n"); > } > } > > 16(15993) DEBUG: sdpops [sdpops_mod.c:883]: sdp_with_media(): attempting > to search for media type: [video] > 16(15993) DEBUG: sdpops [sdpops_mod.c:898]: sdp_with_media(): stream 0 of > 0 - media [audio] > 16(15993) DEBUG: sdpops [sdpops_mod.c:898]: sdp_with_media(): stream 1 of > 0 - media [video] > 16(15993) DEBUG: sdpops [sdpops_mod.c:1038]: sdp_remove_media(): > attempting to search for media type: [video] > 16(15993) DEBUG: sdpops [sdpops_mod.c:1055]: sdp_remove_media(): stream 0 > of 0 - media [audio] > 16(15993) DEBUG: sdpops [sdpops_mod.c:1055]: sdp_remove_media(): stream 1 > of 0 - media [video] > 16(15993) DEBUG: sdpops [sdpops_mod.c:1061]: sdp_remove_media(): removing > media stream: video16(15993) *ERROR: textopsx [textopsx.c:181]: > ki_msg_apply_changes(): invalid usage - not in request route or a reply* > 16(15993) WARNING: