Review Board 1.7.16


Support a hint on a queue.

Review Request #1619 - Created Dec. 12, 2011 and submitted

Alec Davis
trunk
Reviewers
asterisk-dev
Asterisk
Note: the 2 debug print lines will go.

Picking up queues is possible, but knowing that a queue is ringing is useful,
particulary when you are not logged in to that queue, or not a member of it.

Non BLF users, dial 72# and then are connected with caller.
If they forget to press # or the SEND button they think the pickup hasn't worked.
Not understanding there is a 3-4 second delay before the SIP call is placed.

Example 1: Night Queue with a permanent member (specifcially just bells):

exten => 72,hint,Queue:night_queue ;queue NIGHT BELL

exten => _72,1,NoOp(Pickup Night Bell)
exten => _72,n,Pickup(4999@isdn)    ;direct call pickup to local Asterisk
exten => _72,n,NoOp(PICKUPRESULT=${PICKUPRESULT})
exten => _72,n,Hangup()

exten => **72,1,Goto(72,1)


Example 2: Queue with Dynamic Users:
Note: we use '_' in the queue names, and '-' for the context 

[trusted]
exten => 8501,hint,Queue:itg_queue        ;Provide a hint for the queue
exten => _**8501,1,Pickup(itg@trusted)    ;Pickup the queue

exten => 8501,1,Goto(itg-queue,itg,1)     ;Ring the queue

[itg-queue]
exten => itg,1,Queue(itg_queue,crhH,,,127)

In use for months on a 1.8.5 production box.

NightBell usage:

Users with BLFs configured hear the nightbells, and see the BLF flash, press the BLF and are immediately connected with caller.

Diff revision 2 (Latest)

1 2
1 2

  1. trunk/apps/app_queue.c: Loading...
trunk/apps/app_queue.c
Revision 373162 New Change
[20] 2808 lines
[+20] [+] static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason, int position)
2809
		}
2809
		}
2810
		ast_copy_string(qe->moh, q->moh, sizeof(qe->moh));
2810
		ast_copy_string(qe->moh, q->moh, sizeof(qe->moh));
2811
		ast_copy_string(qe->announce, q->announce, sizeof(qe->announce));
2811
		ast_copy_string(qe->announce, q->announce, sizeof(qe->announce));
2812
		ast_copy_string(qe->context, q->context, sizeof(qe->context));
2812
		ast_copy_string(qe->context, q->context, sizeof(qe->context));
2813
		q->count++;
2813
		q->count++;

    
   
2814
		if (q->count == 1) {

    
   
2815
			ast_devstate_changed(AST_DEVICE_RINGING, "Queue:%s", q->name);

    
   
2816
		}

    
   
2817

   
2814
		res = 0;
2818
		res = 0;
2815
		/*** DOCUMENTATION
2819
		/*** DOCUMENTATION
2816
		<managerEventInstance>
2820
		<managerEventInstance>
2817
			<synopsis>Raised when a channel joins a Queue.</synopsis>
2821
			<synopsis>Raised when a channel joins a Queue.</synopsis>
2818
			<syntax>
2822
			<syntax>
[+20] [20] 294 lines
[+20] [+] static void leave_queue(struct queue_ent *qe)
3113
	prev = NULL;
3117
	prev = NULL;
3114
	for (current = q->head; current; current = current->next) {
3118
	for (current = q->head; current; current = current->next) {
3115
		if (current == qe) {
3119
		if (current == qe) {
3116
			char posstr[20];
3120
			char posstr[20];
3117
			q->count--;
3121
			q->count--;

    
   
3122
			if (!q->count) {

    
   
3123
				ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Queue:%s", q->name);

    
   
3124
			}
3118

    
   
3125

   
3119
			/* Take us out of the queue */
3126
			/* Take us out of the queue */
3120
			/*** DOCUMENTATION
3127
			/*** DOCUMENTATION
3121
			<managerEventInstance>
3128
			<managerEventInstance>
3122
				<synopsis>Raised when a channel leaves a Queue.</synopsis>
3129
				<synopsis>Raised when a channel leaves a Queue.</synopsis>
[+20] [20] 6596 lines
  1. trunk/apps/app_queue.c: Loading...

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.