diff options
author | Joshua Colp <jcolp@digium.com> | 2016-11-10 07:48:05 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-11-10 07:48:05 -0600 |
commit | fb2d609bbc58923ccfb11003f56dc4bc8c02e729 (patch) | |
tree | 9dbacd26a26a78372d83ae8e32ee07cedcf18428 | |
parent | c7511029c339542391f7612bb07de2ff3e4c23a3 (diff) | |
parent | abd41590d743c7e6bed27bee88f5a46b69190301 (diff) |
Merge "app_queue: new variable set when abandoned" into 14
-rw-r--r-- | apps/app_queue.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 4bbccc346..4b05f3851 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -258,7 +258,7 @@ ASTERISK_REGISTER_FILE() any of the join options cause the caller to not enter the queue.</para> <para>This application does not automatically answer and should be preceeded by an application such as Answer(), Progress(), or Ringing().</para> - <para>This application sets the following channel variable upon completion:</para> + <para>This application sets the following channel variables upon completion:</para> <variablelist> <variable name="QUEUESTATUS"> <para>The status of the call as a text string.</para> @@ -270,6 +270,10 @@ ASTERISK_REGISTER_FILE() <value name="LEAVEUNAVAIL" /> <value name="CONTINUE" /> </variable> + <variable name="ABANDONED"> + <para>If the call was not answered by an agent this variable will be TRUE.</para> + <value name="TRUE" /> + </variable> </variablelist> </description> <see-also> @@ -4619,6 +4623,8 @@ static void record_abandoned(struct queue_ent *qe) { RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref); + pbx_builtin_setvar_helper(qe->chan, "ABANDONED", "TRUE"); + set_queue_variables(qe->parent, qe->chan); ao2_lock(qe->parent); blob = ast_json_pack("{s: s, s: i, s: i, s: i}", @@ -7964,6 +7970,8 @@ static int queue_exec(struct ast_channel *chan, const char *data) /* Setup our queue entry */ qe.start = time(NULL); + pbx_builtin_setvar_helper(chan, "ABANDONED", NULL); + /* set the expire time based on the supplied timeout; */ if (!ast_strlen_zero(args.queuetimeoutstr)) { qe.expire = qe.start + atoi(args.queuetimeoutstr); |