[OpenSIPS-Users] codec_delete_except_re

Adrian Fretwell adrian.fretwell at topgreen.co.uk
Mon Sep 5 12:00:53 CEST 2016


Hello Opensips Users,
I thought I would share this with you because it had me scratching my 
head for a while:

I use the function codec_delete_except_re to remove all the codecs in 
the SDP that RTPPROXY can't transcode, but I noticed problems with T38 
fax and with DTMF using RFC2833.  I noticed that the function was not 
only removing the codecs but also the T38 attribute and the 101 
telephone event.  Adding these to the function solved the issue, code 
snip below...

     if(has_body("application/sdp")) {
         if (codec_exists("PCMU") || codec_exists("PCMA") || 
codec_exists("G729") || codec_exists("G722") || codec_exists("GSM") || 
stream_exists("image")) {
codec_delete_except_re("PCMA|PCMU|G729|G722|GSM|t38|telephone-event");
         } else {
             send_reply("488","Not Acceptable Here");
             exit;
         }
    }

Kind regards,

Adrian Fretwell
A² Engineering Services
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160905/78e7f184/attachment.htm>


More information about the Users mailing list