[OpenSIPS-Users] codec_delete_except_re() and RFC2833
Laszlo
laszlo at voipfreak.net
Fri Aug 16 23:55:40 CEST 2013
Hi Jeff,
codec_delete_except_re("PCMU|tel");
should do the trick.
-Laszlo
2013/8/16 Jeff Pyle <jpyle at fidelityvoice.com>
> Hello,
>
> This is on OpenSIPS 1.9.
>
> I want to remove all audio codecs except PCMU from an SDP. I have the
> following config:
>
> if (codec_exists("PCMU")) {
> codec_delete_except_re("PCMU");
> } else {
> send_reply("488", "PCMU required");
> exit;
> }
>
> 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.
>
> Codecs in:
>
> m=audio 16414 RTP/AVP 9 0 18 101.
> a=rtpmap:9 G722/8000.
> a=rtpmap:0 PCMU/8000.
> a=rtpmap:18 G729/8000.
> a=fmtp:18 annexb=no.
> a=rtpmap:101 telephone-event/8000.
>
>
> Codecs out:
>
> m=audio 16414 RTP/AVP 0 .
> a=rtpmap:0 PCMU/8000.
>
> Perhaps the correct question to ask is how to delete everything except
> PCMU *and* telephone-event?
>
>
>
> Regards,
> Jeff
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
--
Kind regards,
Laszlo Bekesi
http://voipfreak.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130816/45916f33/attachment-0001.htm>
More information about the Users
mailing list