[Asterisk-code-review] app queue: new variable set when abandoned (asterisk[14])

Joshua Colp asteriskteam at digium.com
Thu Nov 10 07:48:06 CST 2016


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/4356 )

Change subject: app_queue: new variable set when abandoned
......................................................................


app_queue: new variable set when abandoned

sets the variable ABANDONED to TRUE if the call was not answered.

ASTERISK-26558

Change-Id: I4729af9bff4eba436d8a776afd3374065d0036d3
---
M apps/app_queue.c
1 file changed, 9 insertions(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved



diff --git a/apps/app_queue.c b/apps/app_queue.c
index 4bbccc3..4b05f38 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -258,7 +258,7 @@
 			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>
@@ -269,6 +269,10 @@
 					<value name="JOINUNAVAIL" />
 					<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>
@@ -4619,6 +4623,8 @@
 {
 	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 @@
 	/* 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);

-- 
To view, visit https://gerrit.asterisk.org/4356
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4729af9bff4eba436d8a776afd3374065d0036d3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Sebastian Gutierrez <scgm11 at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list