[SR-Users] Remove a Line from SDP

egemen ulus ulus_egemen at hotmail.com
Thu Jun 18 10:43:50 CEST 2020


Hi all,

I am trying to remove a line from the SDP body of INVITE on kamailio 4.4 via SDPOPS module but it does not work even though there is no any error message.

This is how I configure kamailio.cfg, it matches with if condition and executes "sdp_remove_line_by_prefix" function, but when I check sended INVITE, I still see the line that beginning with "a=rtpmap". I thought, in the RELAY function, the sdp body might not prepared yet? Is there any suggestion to remove a line from the SDP body?

route[RELAY] {
...
...
if(is_method("INVITE")) {
if( $ct =~ "0553847<tel:+10553847>aaaa"){
xlog("L_WARN", "$ct check_this \n");
sdp_remove_line_by_prefix("a=rtpmap");
}
}
}

/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=614 a=16 n=if
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=611 a=26 n=xlog
/path/kamailio[10332]: WARNING: <script>: <sip:0553847<tel:+10553847>aaaa at x.x.x.x:5060> check_this
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=612 a=25 n=sdp_remove_line_by_prefix
/path/kamailio[10332]: exec: *** cfgtrace:request_route=[RELAY] c=[/path/kamailio.cfg] l=622 a=16 n=if

Regards
Egemen U.

Get Outlook for Android<https://aka.ms/ghei36>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200618/8d6ca341/attachment.html>


More information about the sr-users mailing list