<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="Cantarell">Might dev team can take a look on  ticket
        under rtpengine</font></p>
    <p><br>
      <font face="Cantarell"><a
          href="https://github.com/sipwise/rtpengine/issues/946">https://github.com/sipwise/rtpengine/issues/946</a><br>
      </font></p>
    <p><font face="Cantarell"><br>
      </font></p>
    <p><font face="Cantarell">I wonder if any call id rewrites happened.</font></p>
    <p>Because I can't make it work properly.</p>
    <p><br>
    </p>
    <p>volga629<br>
    </p>
    <p><br>
      <font face="Cantarell"></font></p>
    <p><font face="Cantarell"></font><br>
    </p>
    <div class="moz-cite-prefix">On 3/16/20 2:51 PM, volga629 via Users
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:30ab6066-bf2b-84b5-cef0-5106e68a64e8@skillsearch.ca">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p><font face="Cantarell">I tried test changes, but  not working
          100% yet</font></p>
      <p><font face="Cantarell"><br>
        </font></p>
      <p><font face="Cantarell">Mar 16 17:46:40 Proxy
          /usr/sbin/opensips[11348]: ERROR:rtpengine:rtpe_function_call:
          proxy replied with error: Ran out of ports<br>
          Mar 16 17:46:40 Proxy /usr/sbin/opensips[11365]:
          ERROR:rtpengine:rtpe_function_call: proxy replied with error:
          Unknown call-id<br>
        </font></p>
      <p>volga629</p>
      <p><br>
      </p>
      <p><br>
      </p>
      <div class="moz-cite-prefix">On 3/16/20 7:30 AM, volga629 wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:77deeb89-a38a-80be-e290-5e2447680861@skillsearch.ca">
        <meta http-equiv="Content-Type" content="text/html;
          charset=UTF-8">
        <p><font face="Cantarell">Thank you all for the answer.</font></p>
        <p><font face="Cantarell">I made the following changes .</font></p>
        <p><font face="Cantarell">Rtpengine  config <br>
          </font></p>
        <p><br>
        </p>
        <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;">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>
<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;"></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;"></code></pre>
        <p><font face="Cantarell">the question is </font><br>
        </p>
        <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;">num-threads = </code></pre>
        <p><font face="Cantarell">route[relay] {<br>
                    # for INVITEs enable some additional helper routes<br>
                    route(handle_media);<br>
                    t_relay();<br>
                    exit;<br>
            }<br>
          </font></p>
        <p><font face="Cantarell">route[handle_media] {<br>
                   if(!is_method("INVITE|UPDATE|BYE|CANCEL"))<br>
                            return;</font></p>
        <p><font face="Cantarell">                # BYE
            rtpengine_delete()<br>
                            if (is_method("BYE|CANCEL")) {<br>
                                    xlog("LOOSE_ROUTE:DBG: [$rm] trying
            delete rtpengine\n");<br>
                                    rtpengine_delete("to-tag");<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>
                            }</font></p>
        <p><font face="Cantarell">        if(is_method("INVITE|UPDATE")
            && has_body("application/sdp")) {<br>
                            xlog("[$rm] Call going from WAN SouceIP
            <$si> to LAN.\n");<br>
                            rtpengine_offer("RTP/AVP
            replace-session-connection replace-origin ICE=remove");<br>
                            # Reset session timer for voicemail redirec<br>
                            $T_fr_inv_timeout = 55;<br>
                            t_on_reply("handle_media_reply");<br>
                    }</font></p>
        <p><font face="Cantarell">        if(is_method("ACK") &&
            has_body("application/sdp")) {<br>
                            rtpengine_offer("RTP/AVP
            replace-session-connection replace-origin ICE=remove");<br>
                    }<br>
            }<br>
          </font></p>
        <p><font face="Cantarell"><br>
          </font></p>
        <p><font face="Cantarell">onreply_route[handle_media_reply] {<br>
                    xlog("incoming reply\n");<br>
                    if(is_method("INVITE|UPDATE") &&
            t_check_status("200|183")) {<br>
                            if(has_body("application/sdp")) {<br>
                                    rtpengine_answer("trust-address
            RTP/AVP replace-session-connection replace-origin
            ICE=remove");<br>
                            }<br>
                    }<br>
                    t_on_failure("media_delete_route");<br>
            }<br>
          </font></p>
        <p><font face="Cantarell"><br>
          </font></p>
        <p><font face="Cantarell">failure_route[media_delete_route] {<br>
                    if(is_method("INVITE") &&
            t_check_status("[56][0-9][0-9]|408|[60][0-9][0-9]")) {<br>
                            xlog("Call with Reply [$rs] make it close");<br>
                            rtpengine_delete();<br>
                    }<br>
            }<br>
          </font></p>
        <p><br>
        </p>
        <p>volga629<br>
        </p>
        <p><br>
        </p>
        <div class="moz-cite-prefix">On 3/16/20 6:03 AM, Callum Guy
          wrote:<br>
        </div>
        <blockquote type="cite"
cite="mid:CAFjCFznG8=cE6yEgjSf8D-8GLPpvU30WN_i6CFKdp+3KDSH2RA@mail.gmail.com">
          <pre class="moz-quote-pre" wrap="">I encountered a similar issue recently, I was using dialog variables
to flag sessions where RTPEngine is engaged so rtpengine_delete only
fired on applicable BYE/CANCEL requests. For reasons I have not yet
understood the dialog variable was not always available so the
sessions were left open and subject to an hours wait for the rtpengine
timeouts. I've tried to improve the logic with AVP's however I'm still
seeing unclosed sessions so am planning just to always fire it off on
a BYE/CANCEL and let RTPEngine drop requests when it is not engaged.
For your script I would recommend that you take the delete function
out of loose routing and implement it whenever you have BYE/CANCEL
requests arriving. I would also highly recommend that you enable the
rtpengine CLI so you are able to control session limits on a running
instance.

Alain, thanks for your anecdotal stats - I've been wondering how far
we'll be able to push an instance of RTPEngine. We have some powerful
24 core machines and are using the packet forwarding module and are
hoping to approach 10000 sessions per instance. If your figures scale
up it sounds like this is very achievable!



On Sun, 15 Mar 2020 at 12:05, Alain Bieuzent <a class="moz-txt-link-rfc2396E" href="mailto:alain.bieuzent@free.fr" moz-do-not-send="true"><alain.bieuzent@free.fr></a> wrote:
</pre>
          <blockquote type="cite">
            <pre class="moz-quote-pre" wrap="">Hi,



Can you share value of  delete-delay, port-min and port-max of your rtpengine configuration.



Have you also check if you handle rtpengine_delete on failed calls (in case sip cause code 4XX, 5XX and 6XX).



At @job, we handle max 6000 calls on a 6 cores servers without any issue.



Regards







De : Users <a class="moz-txt-link-rfc2396E" href="mailto:users-bounces@lists.opensips.org" moz-do-not-send="true"><users-bounces@lists.opensips.org></a> au nom de volga629 via Users <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org" moz-do-not-send="true"><users@lists.opensips.org></a>
Répondre à : volga629 <a class="moz-txt-link-rfc2396E" href="mailto:volga629@networklab.ca" moz-do-not-send="true"><volga629@networklab.ca></a>, OpenSIPS users mailling list <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org" moz-do-not-send="true"><users@lists.opensips.org></a>
Date : vendredi 13 mars 2020 à 18:39
À : <a class="moz-txt-link-rfc2396E" href="mailto:users@lists.opensips.org" moz-do-not-send="true"><users@lists.opensips.org></a>
Objet : [OpenSIPS-Users] opensips + rtpengine



Hello Everyone,

Might be  somebody can point me to right place.

Under load Rtpengine on server with 12 core can't pass 400 channels/sessions.

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:

WARNING: [1be05a46-654e-11ea-b136-573b6201-849]: Protocol error in packet from 136.243.43.23:55847: Unknown call-id [d3:sdp250:

It like it not closing calls properly, but I am running  rtpengine_delete()  in loose _route on BYE or CANCEL.



Here are more details


<a class="moz-txt-link-freetext" href="https://github.com/sipwise/rtpengine/issues/946" moz-do-not-send="true">https://github.com/sipwise/rtpengine/issues/946</a>



# Handle requests within SIP dialogs
route[handle_sequential] {
    if (has_totag()) {
        if (loose_route()) {
                # BYE rtpengine_delete()
                if (is_method("BYE|CANCEL")) {
                        xlog("LOOSE_ROUTE:DBG: [$rm] trying delete rtpengine\n");
                        rtpengine_delete();
                        xlog("Average MOS of the entire call is $rtpstat(MOS-average)\r\n");
                        xlog("Average MOS of caller is $(rtpstat(MOS-average)[$ft])\r\n");
                        xlog("Average MOS of callee is $(rtpstat(MOS-average)[$tt])\r\n");
                        xlog("Min MOS of caller is $(rtpstat(MOS-min)[$ft]) reported at $(rtpstat(MOS-min-at)[$ft])\r\n");
                }
        t_relay();
        exit;

volga629

_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a> <a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>

_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
          </blockquote>
        </blockquote>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
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>