<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <pre style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; margin-top: 0px; margin-bottom: 0px !important; overflow-wrap: normal; padding: 16px; overflow: auto; line-height: 1.45; background-color: rgb(246, 248, 250); border-radius: 3px; color: rgb(36, 41, 46); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;"><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: initial; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; overflow-wrap: normal;">Hello Alain,

port-min = 5000
port-max = 50000
</code><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: initial; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; overflow-wrap: normal;">delete-delay = 5
</code><code style="box-sizing: border-box; font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace; font-size: 11.9px; padding: 0px; margin: 0px; background: initial; border-radius: 3px; word-break: normal; white-space: pre; border: 0px; display: inline; overflow: visible; line-height: inherit; overflow-wrap: normal;">timeout = 10
silent-timeout = 900</code>


onreply_route[handle_media_reply] {
        xlog("incoming reply\n");
        if(is_method("INVITE|UPDATE") && t_check_status("200|183")) {
                if(has_body("application/sdp")) {
                        rtpengine_answer("trust-address RTP/AVP replace-session-connection replace-origin ICE=remove");
                }
        }
        t_on_failure("media_delete_route");
}

failure_route[media_delete_route] {
        if(t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {
                xlog("Call with Reply [$rs] make it close");
                rtpengine_delete();
        }
}

but rtpengine produce error 

Mar 16 17:46:40 Proxy /usr/sbin/opensips[11348]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Ran out of ports
Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]: ERROR:rtpengine:rtpe_function_call: proxy replied with error: Unknown call-id

volga629
</pre>
    <div class="moz-cite-prefix">On 3/15/20 9:04 AM, Alain Bieuzent
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:86EA389D-D1B2-43F6-A1E8-AC08AD4BA48D@free.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Cantarell;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
      <div class="WordSection1">
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">Hi,<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">Can you share value of  delete-delay, port-min
            and port-max of your rtpengine configuration.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">Have you also check if you handle
            rtpengine_delete on failed calls (in case sip cause code
            4XX, 5XX and 6XX).<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">At @job, we handle max 6000 calls on a 6 cores
            servers without any issue.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">Regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <div style="border:none;border-top:solid #B5C4DF
          1.0pt;padding:3.0pt 0cm 0cm 0cm">
          <p class="MsoNormal"><b><span
                style="font-size:12.0pt;color:black">De : </span></b><span
              style="font-size:12.0pt;color:black">Users
              <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a> au nom de
              volga629 via Users <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
              <b>Répondre à : </b>volga629
              <a class="moz-txt-link-rfc2396E" href="mailto:volga629@networklab.ca"><volga629@networklab.ca></a>, OpenSIPS users mailling
              list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
              <b>Date : </b>vendredi 13 mars 2020 à 18:39<br>
              <b>À : </b><a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><br>
              <b>Objet : </b>[OpenSIPS-Users] opensips + rtpengine<o:p></o:p></span></p>
        </div>
        <div>
          <p class="MsoNormal"><o:p> </o:p></p>
        </div>
        <p><span style="font-family:"Cantarell",serif">Hello
            Everyone,</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">Might
            be  somebody can point me to right place.</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">Under
            load Rtpengine on server with 12 core can't pass 400
            channels/sessions.</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">Mar 13
            18:14:53 CentOS-77-64-minimal rtpengine[14588]: WARNING:
            [1b17077c-654e-11ea-bd31-87b1c8fc-849]: Protocol error in
            packet from 136.243.43.23:47763: Ran out of ports
            [d3:sdp289:</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">WARNING:
            [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in
            packet from 136.243.43.23:55847: Unknown call-id [d3:sdp250:</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">It like
            it not closing calls properly, but I am running 
            rtpengine_delete()  in loose _route on BYE or CANCEL.</span><o:p></o:p></p>
        <p><o:p> </o:p></p>
        <p><span style="font-family:"Cantarell",serif">Here
            are more details</span><o:p></o:p></p>
        <p><br>
          <span style="font-family:"Cantarell",serif"><a
              href="https://github.com/sipwise/rtpengine/issues/946"
              moz-do-not-send="true">https://github.com/sipwise/rtpengine/issues/946</a></span><o:p></o:p></p>
        <p><o:p> </o:p></p>
        <p style="margin-bottom:12.0pt"><span
            style="font-family:"Cantarell",serif"># Handle
            requests within SIP dialogs<br>
            route[handle_sequential] {<br>
                if (has_totag()) {<br>
                    if (loose_route()) {<br>
                            # BYE rtpengine_delete()<br>
                            if (is_method("BYE|CANCEL")) {<br>
                                    xlog("LOOSE_ROUTE:DBG: [$rm] trying
            delete rtpengine\n");<br>
                                    rtpengine_delete();<br>
                                    xlog("Average MOS of the entire call
            is $rtpstat(MOS-average)\r\n");<br>
                                    xlog("Average MOS of caller is
            $(rtpstat(MOS-average)[$ft])\r\n");<br>
                                    xlog("Average MOS of callee is
            $(rtpstat(MOS-average)[$tt])\r\n");<br>
                                    xlog("Min MOS of caller is
            $(rtpstat(MOS-min)[$ft]) reported at
            $(rtpstat(MOS-min-at)[$ft])\r\n");<br>
                            }<br>
                    t_relay();<br>
                    exit;</span><o:p></o:p></p>
        <p><span style="font-family:"Cantarell",serif">volga629</span><o:p></o:p></p>
        <p class="MsoNormal">_______________________________________________
          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> <o:p></o:p></p>
      </div>
    </blockquote>
  </body>
</html>