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 <[email protected]> wrote: > Hi Jeff, > > codec_delete_except_re("PCMU|tel"); > should do the trick. > > -Laszlo > > > > 2013/8/16 Jeff Pyle <[email protected]> > >> 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 >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
