[OpenSIPS-Users] sipmsgops.so / codec_delete_except_re

Alexey Kazantsev kurgan-rus at inbox.ru
Mon Aug 26 08:11:34 EDT 2019


Hi list

Trying to delete all codecs except one.
No success.


route[relay] {
        if (is_method("INVITE")) {
                t_on_branch("per_branch_ops");
                t_on_reply("handle_nat");
                t_on_failure("1");
        }

        script_trace( 1, "$rb(application/sdp)", "trace_codecs");
        codec_delete_except_re("pcm"); #will delete all codecs except PCMA and PCMU
        script_trace();

        if (!t_relay()) {
                send_reply(500,"Internal Error");
        }
        exit;
}


Tried several variants: pcm, pcma, PCMA, PCMA|PCMU,
started from an example in the documentation.

What I see in trace:

   [Script Trace][/etc/opensips/opensips.cfg:314][trace_codecs][module codec_delete_except_re] -> (<null>)
   [Script Trace][/etc/opensips/opensips.cfg:315][trace_codecs][core script_trace] -> (<null>)
   [Script Trace][/etc/opensips/opensips.cfg:314][trace_codecs][module codec_delete_except_re] -> (<null>)
   [Script Trace][/etc/opensips/opensips.cfg:315][trace_codecs][core script_trace] -> (<null>)

What I'm doing wrong?

-----------------------------------------------
BR, Alexey
http://alexeyka.zantsev.com/


More information about the Users mailing list