<div dir="ltr"><div><div>Hi Jeff,<br><br>codec_delete_except_re("PCMU|tel");<br></div>should do the trick.<br><br></div>-Laszlo<br><div><div><div></div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/8/16 Jeff Pyle <span dir="ltr"><<a href="mailto:jpyle@fidelityvoice.com" target="_blank">jpyle@fidelityvoice.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><div>Hello,</div><div><br></div><div>This is on OpenSIPS 1.9.</div><div><br></div><div>I want to remove all audio codecs except PCMU from an SDP. I have the following config:</div><div><br></div><div>
<div>
if (codec_exists("PCMU")) {</div><div> codec_delete_except_re("PCMU");</div><div> } else {</div><div> send_reply("488", "PCMU required");</div>
<div> exit;</div><div> }</div></div><div><br></div><div>It does exactly what it's supposed to do, leaving only PCMU in the SDP. The problem is that it also removes the RFC2833 definition.</div>
<div>
<br></div><div>Codecs in:</div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div dir="ltr"><div><div>m=audio 16414 RTP/AVP 9 0 18 101.</div></div></div></div><div><div dir="ltr"><div><div>
a=rtpmap:9 G722/8000.</div></div></div></div><div><div dir="ltr"><div><div>a=rtpmap:0 PCMU/8000.</div></div></div></div><div><div dir="ltr"><div><div>a=rtpmap:18 G729/8000.</div></div></div></div><div><div dir="ltr"><div>
<div>a=fmtp:18 annexb=no.</div></div></div></div><div><div dir="ltr"><div><div>a=rtpmap:101 telephone-event/8000.</div></div></div></div></blockquote><div><div dir="ltr"><div><br></div><div>Codecs out:</div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div dir="ltr"><div><div><div>m=audio 16414 RTP/AVP 0 .</div><div>a=rtpmap:0 PCMU/8000.</div></div></div><div><br></div></div></div></blockquote><div><div dir="ltr">Perhaps the correct question to ask is how to delete everything except PCMU <i>and</i> telephone-event?</div>
</div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Regards,</div><div dir="ltr">Jeff</div><div dir="ltr"><br></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div><div><div><br>--<br></div>Kind regards,<br></div>Laszlo Bekesi<br></div><a href="http://voipfreak.net" target="_blank">http://voipfreak.net</a><br>
</div>
</div>