[asterisk-commits] branch bweschke/queue_improvements r16663 - in /team/bweschke/queue_improveme...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 31 06:21:16 MST 2006


Author: bweschke
Date: Fri Mar 31 07:21:14 2006
New Revision: 16663

URL: http://svn.digium.com/view/asterisk?rev=16663&view=rev
Log:
 Set the MEMBERINTERFACE var on the caller's channel in the queue before bridging them with the queue member when the queue config value is set to do so.


Modified:
    team/bweschke/queue_improvements/apps/app_queue.c
    team/bweschke/queue_improvements/configs/queues.conf.sample

Modified: team/bweschke/queue_improvements/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/queue_improvements/apps/app_queue.c?rev=16663&r1=16662&r2=16663&view=diff
==============================================================================
--- team/bweschke/queue_improvements/apps/app_queue.c (original)
+++ team/bweschke/queue_improvements/apps/app_queue.c Fri Mar 31 07:21:14 2006
@@ -327,6 +327,7 @@
 	unsigned int eventwhencalled:1;
 	unsigned int leavewhenempty:2;
 	unsigned int ringinuse:1;
+	unsigned int setinterfacevar:1;
 	unsigned int reportholdtime:1;
 	unsigned int wrapped:1;
 	unsigned int timeoutrestart:1;
@@ -577,6 +578,7 @@
 	q->roundingseconds = 0; /* Default - don't announce seconds */
 	q->servicelevel = 0;
 	q->ringinuse = 1;
+	q->setinterfacevar = 0;
 	q->moh[0] = '\0';
 	q->announce[0] = '\0';
 	q->context[0] = '\0';
@@ -630,6 +632,8 @@
 			q->timeout = DEFAULT_TIMEOUT;
 	} else if (!strcasecmp(param, "ringinuse")) {
 		q->ringinuse = ast_true(val);
+	} else if (!strcasecmp(param, "setinterfacevar")) {
+		q->setinterfacevar = ast_true(val);
 	} else if (!strcasecmp(param, "monitor-join")) {
 		q->monjoin = ast_true(val);
 	} else if (!strcasecmp(param, "monitor-format")) {
@@ -2259,6 +2263,8 @@
 	 			ast_log(LOG_DEBUG, "app_queue: sendurl=%s.\n", url);
  			ast_channel_sendurl(peer, url);
  		}
+		if (qe->parent->setinterfacevar)
+				pbx_builtin_setvar_helper(qe->chan, "MEMBERINTERFACE", member->interface);
 		if (!ast_strlen_zero(agi)) {
 			if (option_debug)
 				ast_log(LOG_DEBUG, "app_queue: agi=%s.\n", agi);

Modified: team/bweschke/queue_improvements/configs/queues.conf.sample
URL: http://svn.digium.com/view/asterisk/team/bweschke/queue_improvements/configs/queues.conf.sample?rev=16663&r1=16662&r2=16663&view=diff
==============================================================================
--- team/bweschke/queue_improvements/configs/queues.conf.sample (original)
+++ team/bweschke/queue_improvements/configs/queues.conf.sample Fri Mar 31 07:21:14 2006
@@ -77,7 +77,7 @@
 ; 
 ;autofill=yes
 ;
-; Autopause will pause a queue member if the y fail to answer a call
+; Autopause will pause a queue member if they fail to answer a call
 ;
 ;autopause=yes
 ;
@@ -85,6 +85,12 @@
 ;
 ;maxlen = 0
 ;
+; If set to yes, just prior to the caller being bridged with a queue member 
+; the MEMBERINTERFACE variable will be set with the interface name (eg. Agent/1234)
+; of the queue member that was chosen and is now connected to be bridged with
+; the caller
+;
+;setinterfacevar=no
 ;
 ; How often to announce queue position and/or estimated holdtime to caller (0=off)
 ;



More information about the asterisk-commits mailing list