[Asterisk-Dev] Re: [Asterisk-cvs] asterisk/apps app_queue.c,1.39,1.40

James Sizemore james at deny.org
Thu Nov 20 01:02:40 MST 2003


Thanks for taking a crack at this issue! <smile> but,
This patch is not useful for any ring strategy other then
ringall.  In that regards it is inferior to patch:
http://bugs.digium.com/bug_view_page.php?bug_id=0000214

Say we wanted to use the roundrobin strategy  and ring three
different phone then drop out of the queue, so as to use the queue
to emulate hunt groups for SIP. 

Having a timeout separate from the strategy timeout really is needed.

exten => 3860,2,Queue(nocq|tT|||45)  ;<--- This is how it should be done!
exten => 3860,2,Queue(nocq|tTn)  ;<--- This is inflexible!


martinp at lists.digium.com wrote:

>Update of /usr/cvsroot/asterisk/apps
>In directory mongoose.digium.com:/tmp/cvs-serv16523/apps
>
>Modified Files:
>	app_queue.c 
>Log Message:
>Add 'n' option to Queue application to fall through to the next extension after the timeout if no member picks up
>
>
>Index: app_queue.c
>===================================================================
>RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
>retrieving revision 1.39
>retrieving revision 1.40
>diff -u -d -r1.39 -r1.40
>--- app_queue.c	8 Nov 2003 04:35:57 -0000	1.39
>+++ app_queue.c	19 Nov 2003 21:56:45 -0000	1.40
>@@ -75,6 +75,7 @@
> "      'T' -- to allow the calling user to transfer the call.\n"
> "      'd' -- data-quality (modem) call (minimum delay).\n"
> "      'H' -- allow caller to hang up by hitting *.\n"
>+"      'n' -- no retries on the timeout; will exit this application and go to the next step.\n"
> "  In addition to transferring the call, a call may be parked and then picked\n"
> "up by another user.\n"
> "  The optionnal URL will be sent to the called party if the channel supports\n"
>@@ -99,7 +100,8 @@
> "Example: RemoveQueueMember(techsupport|SIP/3000)\n"
> "";
> 
>-
>+/* whether to exit Queue application after the timeout hits */
>+static int go_on = 0;
> 
> 
> /* We define a customer "local user" structure because we
>@@ -739,6 +741,8 @@
> 				tmp->dataquality = 1;
> 			if (strchr(options, 'H'))
> 				tmp->allowdisconnect = 1;
>+			if (strchr(options, 'n'))
>+				go_on = 1;
> 		}
> 		if (url) {
> 			ast_log(LOG_DEBUG, "Queue with URL=%s_\n", url);
>@@ -1156,6 +1160,11 @@
> 				res = try_calling(&qe, options, announceoverride, url);
> 				if (res)
> 					break;
>+				/* exit after a timeout if 'n' option enabled */
>+				if (go_on) {
>+					res = 0;
>+					break;
>+				}
> 				res = wait_a_bit(&qe);
> 				if (res < 0) {
> 					if (option_verbose > 2) {
>
>_______________________________________________
>Asterisk-Cvs mailing list
>Asterisk-Cvs at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-cvs
>  
>





More information about the asterisk-dev mailing list