mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-16 14:58:25 +00:00
Add the Ring time in the CONNECT on the queue_log and on the Manager event AgentConnect
Closes issue #10349, patch by eliel git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2460,7 +2460,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
{
|
{
|
||||||
struct member *cur;
|
struct member *cur;
|
||||||
struct callattempt *outgoing = NULL; /* the list of calls we are building */
|
struct callattempt *outgoing = NULL; /* the list of calls we are building */
|
||||||
int to;
|
int to, orig;
|
||||||
char oldexten[AST_MAX_EXTENSION]="";
|
char oldexten[AST_MAX_EXTENSION]="";
|
||||||
char oldcontext[AST_MAX_CONTEXT]="";
|
char oldcontext[AST_MAX_CONTEXT]="";
|
||||||
char queuename[256]="";
|
char queuename[256]="";
|
||||||
@@ -2583,6 +2583,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
to = (qe->expire - now) * 1000;
|
to = (qe->expire - now) * 1000;
|
||||||
else
|
else
|
||||||
to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
|
to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
|
||||||
|
orig = to;
|
||||||
ring_one(qe, outgoing, &numbusies);
|
ring_one(qe, outgoing, &numbusies);
|
||||||
ast_mutex_unlock(&qe->parent->lock);
|
ast_mutex_unlock(&qe->parent->lock);
|
||||||
if (use_weight)
|
if (use_weight)
|
||||||
@@ -2918,7 +2919,8 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
} else
|
} else
|
||||||
ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
|
ast_log(LOG_WARNING, "Asked to execute an AGI on this channel, but could not find application (agi)!\n");
|
||||||
}
|
}
|
||||||
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s", (long) time(NULL) - qe->start, peer->uniqueid);
|
ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "CONNECT", "%ld|%s|%ld", (long) time(NULL) - qe->start, peer->uniqueid,
|
||||||
|
(long)(orig - to > 0 ? (orig - to) / 1000 : 0));
|
||||||
if (qe->parent->eventwhencalled)
|
if (qe->parent->eventwhencalled)
|
||||||
manager_event(EVENT_FLAG_AGENT, "AgentConnect",
|
manager_event(EVENT_FLAG_AGENT, "AgentConnect",
|
||||||
"Queue: %s\r\n"
|
"Queue: %s\r\n"
|
||||||
@@ -2928,9 +2930,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||||||
"MemberName: %s\r\n"
|
"MemberName: %s\r\n"
|
||||||
"Holdtime: %ld\r\n"
|
"Holdtime: %ld\r\n"
|
||||||
"BridgedChannel: %s\r\n"
|
"BridgedChannel: %s\r\n"
|
||||||
|
"Ringtime: %ld\r\n"
|
||||||
"%s",
|
"%s",
|
||||||
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
|
queuename, qe->chan->uniqueid, peer->name, member->interface, member->membername,
|
||||||
(long) time(NULL) - qe->start, peer->uniqueid,
|
(long) time(NULL) - qe->start, peer->uniqueid, (long)(orig - to > 0 ? (orig - to) / 1000 : 0),
|
||||||
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
|
qe->parent->eventwhencalled == QUEUE_EVENT_VARIABLES ? vars2manager(qe->chan, vars, sizeof(vars)) : "");
|
||||||
ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
|
ast_copy_string(oldcontext, qe->chan->context, sizeof(oldcontext));
|
||||||
ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
|
ast_copy_string(oldexten, qe->chan->exten, sizeof(oldexten));
|
||||||
|
|||||||
@@ -56,13 +56,14 @@ origposition.
|
|||||||
|
|
||||||
The configuration has been reloaded (e.g. with asterisk -rx reload)
|
The configuration has been reloaded (e.g. with asterisk -rx reload)
|
||||||
|
|
||||||
\textbf{CONNECT(holdtime|bridgedchanneluniqueid)}
|
\textbf{CONNECT(holdtime|bridgedchanneluniqueid|ringtime)}
|
||||||
|
|
||||||
The caller was connected to an agent. Hold time represents the amount
|
The caller was connected to an agent. Hold time represents the amount
|
||||||
of time the caller was on hold. The bridged channel unique ID contains
|
of time the caller was on hold. The bridged channel unique ID contains
|
||||||
the unique ID of the queue member channel that is taking the call. This
|
the unique ID of the queue member channel that is taking the call. This
|
||||||
is useful when trying to link recording filenames to a particular
|
is useful when trying to link recording filenames to a particular
|
||||||
call in the queue.
|
call in the queue. Ringtime represents the time the queue members phone
|
||||||
|
was ringing prior to being answered.
|
||||||
|
|
||||||
\textbf{ENTERQUEUE(url|callerid)}
|
\textbf{ENTERQUEUE(url|callerid)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user