diff --git a/apps/app_queue.c b/apps/app_queue.c
index b40c1db30f..0abd512fa8 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -256,7 +256,7 @@
any of the join options cause the caller to not enter the queue.
This application does not automatically answer and should be preceeded
by an application such as Answer(), Progress(), or Ringing().
- This application sets the following channel variable upon completion:
+ This application sets the following channel variables upon completion:
The status of the call as a text string.
@@ -268,6 +268,10 @@
+
+ If the call was not answered by an agent this variable will be TRUE.
+
+
@@ -4617,6 +4621,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}",
@@ -7961,6 +7967,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);