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

James Hogbin james at ip-sentinel.com
Thu Sep 26 11:57:09 EDT 2019

I think this is helpful?



James Hogbin
IP Sentinel 
t. +44 (0)20 3011 4150
m. +44 7786910895
w. https://www.ip-sentinel.com

On 26 Sep 2019, at 16:37, Mark Farmer <farmorg at gmail.com<mailto:farmorg at gmail.com>> wrote:

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?


Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>

IP Sentinel Disclaimer 
This communication is for the information of the person to whom it has been delivered and neither it nor any of its contents should be passed on to or used by any other person. IP Sentinel Ltd is a limited company registered in England and Wales under Registered Number 08648097. Registered Office: Newnhams Wood, Horsted Keynes, West Sussex, RH17 7BT. 
Disclaimer: Q3dhRSrm_disclaimer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190926/a4d7c109/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 119092616571201171.png
Type: image/png
Size: 3317 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20190926/a4d7c109/attachment.png>

More information about the Users mailing list