[OpenSIPS-Users] codec_delete_except_re() and RFC2833

Jeff Pyle jpyle at fidelityvoice.com
Sat Aug 17 00:59:58 CEST 2013


Hi Laszlo,

Thanks, that works perfectly.  Now with it in front of me it does seem
rather obvious.  :)



- Jeff




On Fri, Aug 16, 2013 at 5:55 PM, Laszlo <laszlo at voipfreak.net> wrote:

> 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
>>
>>
> --
> Kind regards,
> Laszlo Bekesi
> http://voipfreak.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130816/fe9a88a5/attachment.htm>


More information about the Users mailing list