<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>As I said, in the cc_flows, you have no value for the
      "message_queue" column - this is a must, it has to be an URL to
      provide playback for the call queuing.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
    <div class="moz-cite-prefix">On 08/31/2018 04:06 PM, Daniel Zanutti
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAN0jgiOAJO8CZpoeY6VdnjSwXj-BrdtzFcQEpVfsY3PNNt2QWA@mail.gmail.com">
      <div dir="ltr">Hi Bogdan
        <div><br>
        </div>
        <div>Here it is table cc_flows:</div>
        <div>
          <div>    id  flowid  priority  skill    prependcid 
            message_welcome  message_queue  </div>
          <div>------  ------  --------  -------  ---------- 
            ---------------  ---------------</div>
          <div>     1  fila-1       256  suporte  fila-1               
                                  </div>
        </div>
        <div><br>
        </div>
        <div>Also table agents:</div>
        <div>
          <div>    id  agentid                 location                 
                   logstate  skills   last_call_end  </div>
          <div>------  ---------------------- 
            -------------------------------  --------  ------- 
            ---------------</div>
          <div>     1  <a href="mailto:1000@plat5.domain.com"
              moz-do-not-send="true">1000@plat5.domain.com</a>  <a
              href="http://sip:1000@plat5.domain.com:5060"
              moz-do-not-send="true">sip:1000@plat5.domain.com:5060</a> 
                   1  suporte       1535650312</div>
        </div>
        <div><br>
        </div>
        <div>Thanks</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Fri, Aug 31, 2018 at 5:02 AM Bogdan-Andrei
          Iancu <<a href="mailto:bogdan@opensips.org"
            moz-do-not-send="true">bogdan@opensips.org</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> <tt>Hi Daniel,<br>
              <br>
              It is not about the B2B scenario, but about how you
              provisioned the flow in DB. Could you simply dump the
              output of "select * from cc_flows" ?<br>
              <br>
              Regards,<br>
            </tt>
            <pre class="m_8374099162904021336moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_8374099162904021336moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="m_8374099162904021336moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
            <div class="m_8374099162904021336moz-cite-prefix">On
              08/30/2018 08:34 PM, Daniel Zanutti wrote:<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hi Bogdan
                <div><br>
                </div>
                <div>Yes, It's the same scenario and same message. The
                  call flow is:</div>
                <div><br>
                </div>
                <div>Asterisk Dials(port 5070) -> Opensips (port
                  5060) forward to Queue -> Calls local user</div>
                <div><br>
                </div>
                <div>I'm using standard Queue scenario:</div>
                <div>
                  <div><?xml version="1.0"?></div>
                  <div><scenario id="call center" name="Call center"
                    param="1" type="script"></div>
                  <div>        <init></div>
                  <div>                <bridge></div>
                  <div>                        <server></div>
                  <div>                               
                    <id>server1</id></div>
                  <div>                        </server></div>
                  <div>                        <client></div>
                  <div>                               
                    <id>client1</id></div>
                  <div>                               
                    <type>message</type></div>
                  <div>                               
                    <destination></div>
                  <div>                                        <value
                    type="param">1</value></div>
                  <div>                               
                    </destination></div>
                  <div>                        </client></div>
                  <div>                </bridge></div>
                  <div>                <state>1</state></div>
                  <div>        </init></div>
                  <div></scenario></div>
                </div>
                <div><br>
                </div>
                <div>And SIP message is the same on all calls, just
                  changed Call-id/tags:</div>
                <div><br>
                </div>
                <div>
                  <div>U <a href="http://10.10.10.10:5070"
                      target="_blank" moz-do-not-send="true">10.10.10.10:5070</a>
                    -> <a href="http://10.10.10.10:5060"
                      target="_blank" moz-do-not-send="true">10.10.10.10:5060</a></div>
                  <div>INVITE <a
                      href="http://sip:fila-1@10.10.10.10:5060"
                      target="_blank" moz-do-not-send="true">sip:fila-1@10.10.10.10:5060</a>
                    SIP/2.0.</div>
                  <div>Via: SIP/2.0/UDP
                    10.10.10.10:5070;branch=z9hG4bK2abb2acc;rport.</div>
                  <div>Max-Forwards: 70.</div>
                  <div>From: <<a
                      href="http://sip:551122223333@10.10.10.10:5070"
                      target="_blank" moz-do-not-send="true">sip:551122223333@10.10.10.10:5070</a>>;tag=as6440e239.</div>
                  <div>To: <<a
                      href="http://sip:fila-1@10.10.10.10:5060"
                      target="_blank" moz-do-not-send="true">sip:fila-1@10.10.10.10:5060</a>>.</div>
                  <div>Contact: <<a
                      href="http://sip:551122223333@10.10.10.10:5070"
                      target="_blank" moz-do-not-send="true">sip:551122223333@10.10.10.10:5070</a>>.</div>
                  <div>Call-ID: <a
                      href="http://357cf76348e4e68325d065e85282320a@10.10.10.10:5070"
                      target="_blank" moz-do-not-send="true">357cf76348e4e68325d065e85282320a@10.10.10.10:5070</a>.</div>
                  <div>CSeq: 102 INVITE.</div>
                  <div>User-Agent: PBX SIPTEK.</div>
                  <div>Date: Thu, 30 Aug 2018 17:30:30 GMT.</div>
                  <div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER,
                    SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE.</div>
                  <div>Supported: replaces, timer.</div>
                  <div>P-Asserted-Identity: "551122223333" <<a
                      href="mailto:sip%3A551122223333@10.10.10.10"
                      target="_blank" moz-do-not-send="true">sip:551122223333@10.10.10.10</a>>.</div>
                  <div>Content-Type: application/sdp.</div>
                  <div>Content-Length: 353.</div>
                  <div>[SDP OMMITED]<br>
                  </div>
                </div>
                <div><br>
                </div>
                <div>I updated to latest 2.4.2 GIT version (commit
                  8b6830cdd96298682fcc298095ad1b718c54c77d), same
                  problem is happening.</div>
                <div><br>
                </div>
                <div>Also you can access the server if you want, it's
                  dedicated to this test. </div>
                <div><br>
                </div>
                <div>Thanks</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr">On Thu, Aug 30, 2018 at 1:04 PM
                  Bogdan-Andrei Iancu <<a
                    href="mailto:bogdan@opensips.org" target="_blank"
                    moz-do-not-send="true">bogdan@opensips.org</a>>
                  wrote:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  <div bgcolor="#FFFFFF" text="#000000"> Hi Daniel,<br>
                    <br>
                    Are you sure you configured a proper SIP URI as
                    "message_queue" in the flow description ? My
                    impression is you have an empty string there - and
                    OpenSIPS is trying to put the call on the queue (as
                    there is no agent), but the SIP URI is not valid.<br>
                    <br>
                    Regards,<br>
                    <pre class="m_8374099162904021336m_-5716859673662338194moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="m_8374099162904021336m_-5716859673662338194moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank" moz-do-not-send="true">http://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 2018
  <a class="m_8374099162904021336m_-5716859673662338194moz-txt-link-freetext" href="http://opensips.org/training/OpenSIPS_Bootcamp_2018/" target="_blank" moz-do-not-send="true">http://opensips.org/training/OpenSIPS_Bootcamp_2018/</a>
</pre>
                    <div
                      class="m_8374099162904021336m_-5716859673662338194moz-cite-prefix">On
                      08/29/2018 10:26 PM, Daniel Zanutti wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr">Got some more info.
                        <div><br>
                        </div>
                        <div><b>This is the first call that worked fine:</b></div>
                        ......<br>
                        <div><br>
                        </div>
                        <div><b>This is the second call that had the
                            problem:</b></div>
                        <div>.....<br>
                          <div>Aug 29 16:04:38 plat5
                            /sbin/opensips[24890]:
                            DBG:call_center:cc_call_state_machine:
                            selecting QUEUE</div>
                          <div>Aug 29 16:04:38 plat5
                            /sbin/opensips[24890]:
                            DBG:call_center:cc_queue_push_call:  QUEUE -
                            adding call 0x7fd8510524a8</div>
                          <div>Aug 29 16:04:38 plat5
                            /sbin/opensips[24890]:
                            DBG:call_center:cc_queue_push_call: adding
                            call on pos 0 (already 1 calls), l=(nil)
                            h=(nil)</div>
                          <div>Aug 29 16:04:38 plat5
                            /sbin/opensips[24890]:
                            DBG:call_center:w_handle_call: new
                            destination for call(0x7fd8510524a8) is 
                            (state=2)</div>
                        </div>
                        .....<br>
                        <div><br>
                        </div>
                      </div>
                      <br>
                      <div class="gmail_quote">
                        <div dir="ltr">On Mon, Aug 27, 2018 at 6:15 PM
                          Daniel Zanutti <<a
                            href="mailto:daniel.zanutti@gmail.com"
                            target="_blank" moz-do-not-send="true">daniel.zanutti@gmail.com</a>>
                          wrote:<br>
                        </div>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div dir="ltr">Trying to configure the call
                            center modules, but found a problem when
                            there is no agents available.
                            <div><br>
                            </div>
                            <div>If there is 1 agent available, call is
                              sent to him with no problem:</div>
                            <div><br>
                            </div>
                            <div>
                              <div>Aug 27 18:11:00 plat5
                                /sbin/opensips[23575]: Recebida asterisk
                                - Tentando entrar na fila fila-1</div>
                              <div>Aug 27 18:11:00 plat5
                                /sbin/opensips[23575]: Entrou na fila
                                com sucesso (fila-1)!</div>
                              <div>Aug 27 18:11:01 plat5
                                /sbin/opensips[23569]: incoming reply</div>
                            </div>
                            <div><br>
                            </div>
                            <div>But when there is no agent available,
                              opensips refuses:</div>
                            <div>
                              <div>Aug 27 18:11:07 plat5
                                /sbin/opensips[23569]: Recebida asterisk
                                - Tentando entrar na fila fila-1</div>
                              <div>Aug 27 18:11:07 plat5
                                /sbin/opensips[23569]:
                                ERROR:b2b_logic:b2b_process_scenario_init:
                                Failed to get the value for the b2b
                                client ruri</div>
                              <div>Aug 27 18:11:07 plat5
                                /sbin/opensips[23569]:
                                ERROR:call_center:set_call_leg: failed
                                to init new b2bua call (empty ID
                                received)</div>
                              <div>Aug 27 18:11:07 plat5
                                /sbin/opensips[23569]:
                                ERROR:call_center:w_handle_call: failed
                                to set new destination for call</div>
                              <div>Aug 27 18:11:07 plat5
                                /sbin/opensips[23569]: errnum: -1</div>
                            </div>
                            <div><br>
                            </div>
                            <div>Error -1 means flowID is invalid, but I
                              sent the same value on both calls.</div>
                            <div><br>
                            </div>
                            <div>This is the call: </div>
                            <div><br>
                            </div>
                            <div>cc_handle_call("$rU")<br>
                            </div>
                            <div><br>
                            </div>
                            <div>I'm using Opensips 2.4.2 with Debian
                              8.11.</div>
                            <div><br>
                            </div>
                            <div>Am I missing something or found a bug?</div>
                            <div><br>
                            </div>
                            <div>Thanks</div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                      <fieldset
                        class="m_8374099162904021336m_-5716859673662338194mimeAttachmentHeader"></fieldset>
                      <br>
                      <pre>_______________________________________________
Users mailing list
<a class="m_8374099162904021336m_-5716859673662338194moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="m_8374099162904021336m_-5716859673662338194moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                    </blockquote>
                    <br>
                  </div>
                </blockquote>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>