[asterisk-dev] app_queue missed calls per agent - caller hangup before timeout

marek cervenka cervajs2 at gmail.com
Sun Dec 18 10:32:46 CST 2016


ok. i understand

but the use case is

- the call is ringing to agent (queue member selected)

- caller hangs

- queue_log is run from queue_exec (but i expected queue_log from 
try_calling)

i'll try investigate it deeper and fill bug if it looks like a bug

Dne 15/12/2016 v 23:11 Matthew Jordan napsal(a):
>
> On Thu, Dec 15, 2016 at 10:17 AM, marek cervenka <cervajs2 at gmail.com 
> <mailto:cervajs2 at gmail.com>> wrote:
>
>     i think i foud possible solution. can you confirm if i'm on
>     correct path?
>
>     sql data looks
>
>     +-----+----------------------------+-----------------+-----------+-------+---------+-------+-------+-------+-------+-------+
>     | id  | time                       | callid          | queuename |
>     agent | event   | data1 | data2 | data3 | data4 | data5 |
>     | 165913 | 2016-12-14 11:01:20.965839 | 1481709660.56899  | queue1
>         | NONE  | ABANDON | 1     | 1     | 9     |       |       |
>
>     data3 contains ringtime but agent is filled as "NONE"
>
>
>     in app_queue there are 2 places which fills ABANDON
>
>
>     function queue_exec
>
>     stop:
>         if (res) {
>             if (res < 0) {
>                 if (!qe.handled) {
>                     record_abandoned(&qe);
>     *                ast_queue_log(args.queuename,
>     ast_channel_uniqueid(chan), "NONE", "ABANDON", "%d|%d|%ld",
>     qe.pos, qe.opos,  (long) (time(NULL) - qe.start));*
>                     res = -1;
>                 } else if (qcontinue) {
>                     reason = QUEUE_CONTINUE;
>                     res = 0;
>                 }
>             } else if (qe.valid_digits) {
>                 ast_queue_log(args.queuename,
>     ast_channel_uniqueid(chan), "NONE", "EXITWITHKEY",
>                     "%s|%d|%d|%ld", qe.digits, qe.pos, qe.opos, (long)
>     (time(NULL) - qe.start));
>     }
>
>
>     BUT
>
>     in try_calling function
>
>     there is member filled
>
>     } else if (ast_check_hangup(qe->chan)) {
>                     /* Caller must have hung up just before being
>     connected */
>                     ast_log(LOG_NOTICE, "Caller was about to talk to
>     agent on %s but the caller hungup.\n", ast_channel_name(peer));
>     *                ast_queue_log(queuename,
>     ast_channel_uniqueid(qe->chan), member->membername, "ABANDON",
>     "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));*
>                     record_abandoned(qe);
>                     ast_channel_publish_dial(qe->chan, peer,
>     member->interface,
>     ast_hangup_cause_to_dial_status(ast_channel_hangupcause(peer)));
>                     ast_autoservice_chan_hangup_peer(qe->chan, peer);
>                     ao2_ref(member, -1);
>                     return -1;
>     }
>
>
>     why isnt used the try_calling to fill ABANDON?
>
>     is it safe fill member (if exist) in queue_exec?
>
>
>
> These two locations are fulfilling two different purposes.
>
> 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.
>
> As such, no, you cannot get a queue member name in queue_exec, as 
> there is no queue member that has been chosen.
>
>
>
>
>     -------- Přeposlaná zpráva --------
>     Předmět: 	app_queue missed calls per agent - caller hangup before
>     timeout
>     Datum: 	Wed, 14 Dec 2016 14:26:21 +0100
>     Od: 	marek cervenka <cervajs2 at gmail.com> <mailto:cervajs2 at gmail.com>
>     Komu: 	Asterisk Users Mailing List - Non-Commercial Discussion
>     <asterisk-users at lists.digium.com>
>     <mailto:asterisk-users at lists.digium.com>
>
>
>
>     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
>
>     ---
>     https://www.thirdlane.com/forum/queue-log-problem
>     <https://www.thirdlane.com/forum/queue-log-problem>
>
>     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->name, qe->chan->uniqueid, membername,
>     "RINGNOANSWER", "%d", rnatime);
>     ---
>
>
>     any tips howto detect missed calls where caller hangup before timeout?
>     tnx
>     Marek
>
>     --
>     _____________________________________________________________________
>     -- Bandwidth and Colocation Provided by http://www.api-digital.com
>     -- asterisk-dev mailing list To UNSUBSCRIBE or update options
>     visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
>     <http://lists.digium.com/mailman/listinfo/asterisk-dev> 
>
> -- 
> Matthew Jordan Digium, Inc. | CTO 445 Jan Davis Drive NW - Huntsville, 
> AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20161218/674f92e4/attachment.html>


More information about the asterisk-dev mailing list