<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>ok. i understand</p>
    <p>but the use case is</p>
    <p>- the call is ringing to agent (queue member selected)<br>
    </p>
    <p>- caller hangs<br>
    </p>
    - queue_log is run from queue_exec (but i expected queue_log from
    try_calling)<br>
    <br>
    i'll try investigate it deeper and fill bug if it looks like a bug<br>
    <br>
    <div class="moz-cite-prefix">Dne 15/12/2016 v 23:11 Matthew Jordan
      napsal(a):<br>
    </div>
    <blockquote
cite="mid:CAN2PU+56rcyU4QR-5FotfWiJu03NnXRmNhyaJqZ6NZX0KA5aVA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Thu, Dec 15, 2016 at 10:17 AM,
            marek cervenka <span dir="ltr"><<a
                moz-do-not-send="true" href="mailto:cervajs2@gmail.com"
                target="_blank">cervajs2@gmail.com</a>></span> wrote:<br>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <p>i think i foud possible solution. can you confirm if
                  i'm on correct path?</p>
                <p>sql data looks</p>
                <p>+-----+-----------------------<wbr>-----+-----------------+------<wbr>-----+-------+---------+------<wbr>-+-------+-------+-------+----<wbr>---+<br>
                  | id  | time                       | callid          |
                  queuename | agent | event   | data1 | data2 | data3 |
                  data4 | data5 |<br>
                  | 165913 | 2016-12-14 11:01:20.965839 |
                  1481709660.56899  | queue1     | NONE  | ABANDON |
                  1     | 1     | 9     |       |       |<br>
                </p>
                <p>data3 contains ringtime but agent is filled as "NONE"<br>
                </p>
                <p><br>
                </p>
                <p>in app_queue there are 2 places which fills ABANDON<br>
                </p>
                <p><br>
                </p>
                <p>function queue_exec<br>
                </p>
                <p>stop:<br>
                      if (res) {<br>
                          if (res < 0) {<br>
                              if (!qe.handled) {<br>
                                  record_abandoned(&qe);<br>
                  <b>                ast_queue_log(args.queuename,
                    ast_channel_uniqueid(chan), "NONE", "ABANDON",  
                    "%d|%d|%ld", qe.pos, qe.opos,  (long) (time(NULL) -
                    qe.start));</b><br>
                                  res = -1;<br>
                              } else if (qcontinue) {<br>
                                  reason = QUEUE_CONTINUE;<br>
                                  res = 0;<br>
                              }<br>
                          } else if (qe.valid_digits) {<br>
                              ast_queue_log(args.queuename,
                  ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",<br>
                                  "%s|%d|%d|%ld", qe.digits, qe.pos,
                  qe.opos, (long) (time(NULL) - qe.start));<br>
                  }<br>
                </p>
                <p><br>
                </p>
                <p>BUT <br>
                </p>
                <p>in try_calling function<br>
                </p>
                <p>there is member filled</p>
                <p>} else if (ast_check_hangup(qe->chan)) {<br>
                                  /* Caller must have hung up just
                  before being connected */<br>
                                  ast_log(LOG_NOTICE, "Caller was about
                  to talk to agent on %s but the caller hungup.\n",
                  ast_channel_name(peer));<br>
                  <b>                ast_queue_log(queuename,
                    ast_channel_uniqueid(qe->chan)<wbr>,
                    member->membername, "ABANDON", "%d|%d|%ld",
                    qe->pos, qe->opos, (long) (time(NULL) -
                    qe->start));</b><br>
                                  record_abandoned(qe);<br>
                                  ast_channel_publish_dial(qe-><wbr>chan,
                  peer, member->interface, ast_hangup_cause_to_dial_<wbr>status(ast_channel_<wbr>hangupcause(peer)));<br>
                                  ast_autoservice_chan_hangup_<wbr>peer(qe->chan,
                  peer);<br>
                                  ao2_ref(member, -1);<br>
                                  return -1;<br>
                  }<br>
                </p>
                <p><br>
                </p>
                <p>why isnt used the try_calling to fill ABANDON?<br>
                </p>
                <p>is it safe fill member (if exist) in queue_exec?<br>
                </p>
                <br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>These two locations are fulfilling two different
              purposes.</div>
            <div><br>
            </div>
            <div>The first, in queue_exec, handles the case where the
              caller abandons the queue prior to any queue member being
              selected. The second, as the comment suggests, handles the
              case where the caller abandons the queue after the queue
              member has been selected but before the two parties have
              been connected.</div>
            <div><br>
            </div>
            <div>As such, no, you cannot get a queue member name in
              queue_exec, as there is no queue member that has been
              chosen.</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000"> <br>
                -------- Přeposlaná zpráva --------
                <table
                  class="m_2873794714292601644moz-email-headers-table"
                  border="0" cellpadding="0" cellspacing="0">
                  <tbody>
                    <tr>
                      <th align="RIGHT" nowrap="nowrap"
                        valign="BASELINE">Předmět: </th>
                      <td>app_queue missed calls per agent - caller
                        hangup before timeout</td>
                    </tr>
                    <tr>
                      <th align="RIGHT" nowrap="nowrap"
                        valign="BASELINE">Datum: </th>
                      <td>Wed, 14 Dec 2016 14:26:21 +0100</td>
                    </tr>
                    <tr>
                      <th align="RIGHT" nowrap="nowrap"
                        valign="BASELINE">Od: </th>
                      <td>marek cervenka <a moz-do-not-send="true"
                          class="m_2873794714292601644moz-txt-link-rfc2396E"
                          href="mailto:cervajs2@gmail.com"
                          target="_blank"><cervajs2@gmail.com></a></td>
                    </tr>
                    <tr>
                      <th align="RIGHT" nowrap="nowrap"
                        valign="BASELINE">Komu: </th>
                      <td>Asterisk Users Mailing List - Non-Commercial
                        Discussion <a moz-do-not-send="true"
                          class="m_2873794714292601644moz-txt-link-rfc2396E"
                          href="mailto:asterisk-users@lists.digium.com"
                          target="_blank"><asterisk-users@lists.digium.<wbr>com></a></td>
                    </tr>
                  </tbody>
                </table>
                <div>
                  <div class="h5"> <br>
                    <br>
                    <pre>hi,

i'm trying get report about missed calls per agent. i'm using queue_log 
and RINGNOANSWER event
but i found problem described here

---
<a moz-do-not-send="true" class="m_2873794714292601644moz-txt-link-freetext" href="https://www.thirdlane.com/forum/queue-log-problem" target="_blank">https://www.thirdlane.com/<wbr>forum/queue-log-problem</a>

RINGNOANSWER only happens if the call TIMES OUT ringing the agent and it 
returns to the queue. If your agent has a 30 second timeout and the 
caller ABANDONS the call in 5 seconds it will log an ABANDON not a 
RINGNOANSWER.

This is the only time ast_queue_log is executed with RINGNOANSWER. The 
subsequent code of this function goes on to autopause the agent/member 
if autopause is enabled. Not something that happens when callers hang up 
when ringing the agents.

/*! \brief RNA == Ring No Answer. Common code that is executed when we 
try a queue member and they don't answer. */
static void rna(int rnatime, struct queue_ent *qe, char *interface, char 
*membername)
{
if (option_verbose > 2)
ast_verbose( VERBOSE_PREFIX_3 "Nobody picked up in %d ms\n", rnatime);
ast_queue_log(qe->parent-><wbr>name, qe->chan->uniqueid, membername, 
"RINGNOANSWER", "%d", rnatime);
---


any tips howto detect missed calls where caller hangup before timeout?
tnx
Marek
</pre>
  </div></div></div>


--

______________________________<wbr>______________________________<wbr>_________

-- Bandwidth and Colocation Provided by <a moz-do-not-send="true" href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --



asterisk-dev mailing list

To UNSUBSCRIBE or update options visit:

   <a moz-do-not-send="true" href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-dev</a>
</blockquote></div>

<div>
</div>-- 
<div class="gmail_signature" data-smartmail="gmail_signature">Matthew Jordan
Digium, Inc. | CTO
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: <a moz-do-not-send="true" href="http://digium.com" target="_blank">http://digium.com</a> & <a moz-do-not-send="true" href="http://asterisk.org" target="_blank">http://asterisk.org</a></div>
</div></div>


<fieldset class="mimeAttachmentHeader"></fieldset>


</blockquote>
</body></html>