<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I think this is helpful?
<div class=""><br class="">
</div>
<div class=""><a href="https://opensips.org/pipermail/users/2016-September/035510.html" class="">https://opensips.org/pipermail/users/2016-September/035510.html</a></div>
<div class=""><br class="">
</div>
<div class="">james<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">
    <br />
    <p style="font-family: Open Sans,sans-serif;">
    <b><span style="font-family: Open Sans,sans-serif; font-size:10.0pt;color:#888888">James Hogbin</span></b>
    <b><span style="font-family: Open Sans,sans-serif;font-size:8.0pt;color:#888888;"><br />Director</span></b>
    </p>
    <table border="0" cellspacing="0" cellpadding="0"><tr><td><a href="http://ip-sentinel.com"><IMG border="0" alt="IP Sentinel Logo" src="cid:119092616571200971@uk-mta-55.uk.mimecast.lan" ></A></td></tr></table>
                <span style="font-family: Open Sans,sans-serif;font-size:8.0pt;color:#222222;"><br />t. <a href="tel:+442030114150" target="_blank">+44 (0)20 3011 4150</a><br /></span><span style="font-family: Open Sans,sans-serif;font-size:8.0pt;color:#222222;">m. +44 7786910895<br /></span><span style="font-family: Open Sans,sans-serif;font-size:8.0pt;color:#222222">w. <a href="https://www.ip-sentinel.com/" target="_blank">https://www.ip-sentinel.com</a><br /></span><table>
                <tbody><tr>
                        </tr>
                <tr>
                        
                </tr>
                <tr>
                        
                </tr>
                <tr>
                        
                </tr>
    </tbody></table>
    <br />
    
On 26 Sep 2019, at 16:37, Mark Farmer <<a href="mailto:farmorg@gmail.com" class="">farmorg@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">
<div dir="ltr" class="">Been looking at this for a while now and it just won't play ball.
<div class="">I have an avp defined:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""># Codecs we do NOT support!</div>
<div class="">$avp(BadCodec) = "G729";</div>
<div class="">$avp(BadCodec) = "G729a";</div>
<div class=""><br class="">
</div>
<div class="">Then I use a for each to remove any instances of the codecs:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">for ($var(ToDelete) in $(avp(BadCodec)[*]))</div>
<div class="">                if (codec_delete($var(ToDelete))) {</div>
<div class="">                            xlog("CUSTOM_LOG: Invalid codec detected and deleted: $var(ToDelete)");</div>
<div class="">                }</div>
</div>
<div class=""><br class="">
</div>
<div class="">sipmsgops reports that it's trying to remove codecs:</div>
<div class=""><br class="">
</div>
<div class="">DBG:sipmsgops:codec_delete: deleting codec <G729a> with clock <><br class="">
</div>
<div class="">---</div>
<div class="">DBG:sipmsgops:codec_delete: deleting codec <G729> with clock <><br class="">
</div>
<div class="">---</div>
<div class=""><br class="">
</div>
<div class="">My custom logs only generate a single entry since only G729 is present in SDP:</div>
<div class=""><br class="">
</div>
<div class="">CUSTOM_LOG: Invalid codec detected and deleted: G729<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">But when the call is routed, the G729 codecs remain in the SDP:</div>
<div class=""><br class="">
</div>
<div class="">a=rtpmap:18 G729/8000<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Can anyone suggest why might that be?</div>
<div class=""><br class="">
</div>
<div class="">Regards</div>
<div class="">Mark.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div dir="ltr" class="gmail_signature"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Users mailing list<br class="">
<a href="mailto:Users@lists.opensips.org" class="">Users@lists.opensips.org</a><br class="">
http://lists.opensips.org/cgi-bin/mailman/listinfo/users<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>



    <p style="font-family: Open Sans, Arial, sans-serif;padding: 5px;background:#D5EAFF">
    <span style="font-family: Open Sans,sans-serif;font-size:8.0pt;color:red">IP Sentinel Disclaimer <br /></span>
    <span style="font-family: Open Sans,sans-serif;font-size:6.0pt;color:black">The information contained in this e-mail, and any attachment, is confidential and is intended solely for the use of the intended recipient. Access, copying or re-use of the e-mail or any attachment, or any information contained therein, by any other person is not authorized. Unintended recipients are prohibited from taking action on the basis of information in this e-mail. If you are not the intended recipient or have received this email in error, please notify the sender immediately by return email and delete the email from your computer.
E-mail messages may contain computer viruses or other defects, may not be accurately replicated on other systems, or may be intercepted, deleted or interfered with without the knowledge of the sender or the intended recipient. We do not guarantee that either are virus-free and accept no liability for any damage sustained as a result of computer viruses or other defects. 
. 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. </span>
    </p><span style="font-size:1.0pt;color:white">Q3dhRSrm_disclaimer</span>
</body></html>