[OpenSIPS-Users] codec_delete() not working in 3.0

Mark Farmer farmorg at gmail.com
Thu Sep 26 11:37:58 EDT 2019


Been looking at this for a while now and it just won't play ball.
I have an avp defined:

# Codecs we do NOT support!
$avp(BadCodec) = "G729";
$avp(BadCodec) = "G729a";

Then I use a for each to remove any instances of the codecs:

for ($var(ToDelete) in $(avp(BadCodec)[*]))
                if (codec_delete($var(ToDelete))) {
                            xlog("CUSTOM_LOG: Invalid codec detected and
deleted: $var(ToDelete)");
                }

sipmsgops reports that it's trying to remove codecs:

DBG:sipmsgops:codec_delete: deleting codec <G729a> with clock <>
---
DBG:sipmsgops:codec_delete: deleting codec <G729> with clock <>
---

My custom logs only generate a single entry since only G729 is present in
SDP:

CUSTOM_LOG: Invalid codec detected and deleted: G729

But when the call is routed, the G729 codecs remain in the SDP:

a=rtpmap:18 G729/8000

Can anyone suggest why might that be?

Regards
Mark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190926/9ffbaf26/attachment.html>


More information about the Users mailing list