<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>In the meanwhile you can try stream_delete() for all streams that
      you're not interested in, then calling
<a class="moz-txt-link-freetext" href="https://opensips.org/html/docs/modules/3.3.x/sipmsgops.html#func_get_updated_body_part">https://opensips.org/html/docs/modules/3.3.x/sipmsgops.html#func_get_updated_body_part</a>
      to get the updated SDP and feed that to RTPEngine.</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 2/19/25 23:31, Pyle, Jeff wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:SJ1PR12MB6098AC88D1068A063E62C0E1A9C52@SJ1PR12MB6098.namprd12.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        I asked the rtpengine-related part of this question on the
        rtpengine list. Richard's response:</div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <blockquote
style="margin-left: 0.8ex; padding-left: 1ex; border-left: 3px solid rgb(200, 200, 200);">
        <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
          In the newer Kamailio module we have restructured the flags
          parsing so that you can do
          `rtpengine_offer("sdp-media-remove=[video message image]")`
          but likely that change hasn't made it over to OpenSIPS yet.</div>
      </blockquote>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Is his assumption correct? Does this make sense for a feature
        request on the Github page?</div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Regards,</div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Jeff</div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof"
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <hr style="display: inline-block; width: 98%;">
      <div id="divRplyFwdMsg" dir="ltr" style="color: inherit;"><span
style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> Users
          <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a> on behalf of Pyle,
          Jeff <a class="moz-txt-link-rfc2396E" href="mailto:JPyle@fusionconnect.com"><JPyle@fusionconnect.com></a><br>
          <b>Sent:</b> Wednesday, January 22, 2025 18:30<br>
          <b>To:</b> OpenSIPS Users <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
          <b>Subject:</b> [OpenSIPS-Users] how to send a 'list'
          parameter to rtpengine, or modify SDP in script before sending
          to rtpengine</span>
        <div> </div>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Hello,</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        I'm on OpenSIPS 3.4.9 with rtpengine 13.1.1.6. I'm trying to
        make use of the 'sdp-media-remove' command supported in this
        version of rtpengine to remove unwanted media sessions from the
        SDP.</div>
      <div class="elementToProof"
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        The author of rtpengine reminds me its syntax is </div>
      <div
style="direction: ltr; font-family: "Lucida Console", Monaco, monospace; font-size: 10pt; color: rgb(0, 0, 0);">
          "sdp-media-remove" : ["<media-type>",
        "<media-type>", ...]</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Or, in other words, this command requires a 'list' as its
        parameters.</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        The only way I could get rtpengine not to throw an error was by
        using "sdp-media-remove=video". rtpengine shows this as</div>
      <div
style="direction: ltr; font-family: "Lucida Console", Monaco, monospace; font-size: 10pt; color: rgb(0, 0, 0);">
          "sdp-media-remove": "video"</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Based on the documentation, it needs to be</div>
      <div
style="direction: ltr; font-family: "Lucida Console", Monaco, monospace; font-size: 10pt; color: rgb(0, 0, 0);">
          "sdp-media-remove" : ["video"]</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        How can one formulate an rtpengine_offer() command so that I can
        provide a 'list'. In my case I want to preserve only the 'audio'
        session, so, I need to write an rtpengine_offer() message with
        the sdp-media-remove command that sends this:</div>
      <div
style="direction: ltr; font-family: "Lucida Console", Monaco, monospace; font-size: 10pt; color: rgb(0, 0, 0);">
          "sdp-media-remove" : ["video", "text", "application",
        "message", "other"]</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Even better, is it possible to use standard OpenSIPS scripting
        commands like stream_exists() and stream_delete() to remove the
        streams from the SDP before sending to rtpengine? In my testing,
        these commands don't have any effect on what rtpengine
        receives. </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        I have Cisco devices on my network that send an rtpmap payload
        of 255, which rtpengine typically refuses to process because
        it's out of spec. Removing the erroneous an unnecessary streams
        in OpenSIPS before processing in rtpengine would solve this
        problem without having to patch rtpengine.</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Regards,</div>
      <div
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        Jeff</div>
      <div class="elementToProof"
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      <div class="elementToProof"
style="direction: ltr; font-family: Verdana, Geneva, sans-serif; font-size: 10pt; color: rgb(0, 0, 0);">
        <br>
      </div>
      This message is subject to Fusion Connect, Inc.’s email
      communication policy: <a class="moz-txt-link-abbreviated" href="http://www.fusionconnect.com/email-policy">www.fusionconnect.com/email-policy</a>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre wrap="" class="moz-quote-pre">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>