<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="monospace">Hi Kosmas,<br>
      <br>
      For Issue 1, try placing a t_newtran(); before calling the cc
      function in the script - this will prevent the issues due to
      retransmissions.<br>
      <br>
      Regards,<br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 7/4/23 1:15 PM, Kosmas Palios wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+iUSH3GRTyhTyW=wrwmFvyA9boH3CZ60a4pY_RdtSBPNRq3cw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"
          id="gmail-docs-internal-guid-24bcbef2-7fff-0d92-e619-18932c434553"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Hello community,</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Our team has managed to setup a SIP Trunk to forward calls to a number of SIP clients, in opensips 3.1.16. We are using the call center module, and it works fine for low traffic. We would like to ask two separate but related questions.</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">ISSUE 1</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We are using the call center module to forward calls to 100 SIP agents, and it works well if traffic is relatively low (about 25 incoming calls per minute). However, when traffic is higher, i.e. up to 60 incoming calls per minute, we see calls getting rejected because of cc_handle_call() failing with error message:</span></p>
        <br>
        <p dir="ltr"
style="line-height:1.38;margin-left:30pt;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">DBG:b2b_entities:server_new: It is a retransmission, drop</span></p>
        <p dir="ltr"
style="line-height:1.38;margin-left:30pt;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:"Roboto Mono",monospace;color:rgb(24,128,56);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">ERROR:b2b_logic:b2b_process_scenario_init: failed to create new b2b server instance</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Unfortunately, every time this happens, an agent's status gets stuck to "incall" forever, even though no cc_calls row includes him. So that agent is lost.</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We are running in UDP mode, using 6 UDP workers. I’m attaching the configuration file as opensips_3_1_16.cfg</span></p>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">I can share the whole setup if needed.</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">ISSUE 2</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">We decided to migrate to 3.2 after seeing the bugfix to b2b_clients leak. When we got to migrating the call center, we read this blogpost: <a href="https://blog.opensips.org/2021/01/06/the-script-driven-sip-b2bua/" moz-do-not-send="true">https://blog.opensips.org/2021/01/06/the-script-driven-sip-b2bua/</a></span></p>
        <br>
        <p dir="ltr"
style="line-height:1.38;margin-left:30pt;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">" When comes to the modules using the </span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">b2b_logic</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> API (providing features on top of the B2B engine), the only affected one is the </span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">call_center</span><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> module. The change is minor – the xml file controlling the call queuing logic was removed, as not needed any more. Otherwise, in terms of usage, it is exactly the same."</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">However, when we removed the lines:</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">modparam("b2b_logic_xml","script_scenario", "/etc/opensips/scenario_callcenter.xml")</span></p>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">modparam("call_center", "b2b_scenario", "call center")   </span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">the call center started behaving weird: it created another invite to the sip trunk, instead of creating the invite to the agent (the call id was good, but the to uri was wrong). I can give detailed logs on this, but I wouldn't want to make this email any bigger than it already is. I’m also attaching the configuration file as opensips_3_2_13.cfg</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">To sum up, our questions are:</span></p>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">1. Any ideas on what the problem is with creating a new server instance for high numbers of calls?</span></p>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">2. What's the recommended way to migrate the call center to version 3.2 ? Can we find an example script-driven call center somewhere?</span></p>
        <div><br>
        </div>
        <div>Thank you in advance for your help!</div>
        <div><br>
        </div>
        <div>Best regards, <br>
        </div>
        <div><br>
        </div>
        <div>Kosmas<br>
        </div>
        <br>
        <br>
        <p dir="ltr"
          style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">P.S.: about our team: we are a small team from Athens, Greece integrating voice assistants on various platforms. Unfortunately we missed the latest Opensips summit held last September.</span></p>
        <br>
      </div>
      <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>
    <br>
  </body>
</html>