[asterisk-users] Queue Question

Kevin Smith kevin.smith at mercury.net
Thu Sep 20 21:04:12 CDT 2007


Hi Jeremy,
A few thoughts that come to mind. We have a queue that is open between 
certain hours. I have a few checks in place before a caller enters, 
first it checks to see if there it is within the time window, then 
checks to see if there are any agents log into queue, if any fail they 
get our closed message. Sounds like you are trying to do something similar.
Not sure what you have for extension numbers numbers, but you will get 
the idea.

Your first friend:
GotoIfTime(<time range>|<days of week>|<days of 
month>|<months>?[[context|]extension|]pri)
http://www.voip-info.org/wiki-Asterisk+cmd+GotoIfTime

I don't know how your dial plan is structured. My guess is the "after 
hours" operation is in a separate part of the code from the other. Since 
we are just looking at after hours, I would use the reverse on your 
time. Because the command jumps when the statement is true. I do not 
know what will happen if you say go from 17:00-8:00, but you can try it.

Example:
exten => 800,1,GotoIfTime(8:00-17:00|mon-fri|*|*?NormalOp,900,1) ; Since 
this will fail if it is 9pm, it moves on to the next priority in this 
exten.

[NormalOp]
exten => 900,1,blah

Next, is your other test. Use the queue agent count function 
QUEUEAGENTCOUT(queuename)
http://www.voip-info.org/wiki/index.php?page=Asterisk+func+queueagentcount

If the number is greater then 0, then you move them into the queue, if 
not, whatever you want.

Finally, in terms of your other questions about logging the agents in. 
You could do the database way. You also could create a log in extension 
where you can take their cell number ( caller id) and use the 
application AddQueueMember(queuename[|interface][|penalty])

http://www.voip-info.org/wiki/index.php?page=Asterisk+cmd+AddQueueMember

So you should be able to do something like
AddQueueMember(queueName|ZAP/${CALLID(num)})

Anyway hope that helps.

Kevin




Jeremy Mann wrote:
>
> I’m curious if anyone has implemented the following:
>
> Need to setup an on-call queue, that activates after 5PM and 
> de-activates at 8AM, also that activates/deactivates on demand(I’m 
> thinking a feature code here). The “agents” need to log in via cell 
> phones, and when calls come in from outside to the asterisk system, 
> it’ll need to call the cell phone agents that are active.
>
> I’m thinking that it’s a simple SQL query, to update the agents status 
> and number, and that asterisk will do a lookup and append that to the 
> ZAP channel to dial, but interested in any logic someone might be able 
> to come up with for the dialplan.
>
>
> ------------------------------------------------------------------------
> This e-mail, facsimile, or letter and any files or attachments 
> transmitted with it contains information that is confidential and 
> privileged. This information is intended only for the use of the 
> individual(s) and entity(ies) to whom it is addressed. If you are the 
> intended recipient, further disclosures are prohibited without proper 
> authorization. If you are not the intended recipient, any disclosure, 
> copying, printing, or use of this information is strictly prohibited 
> and possibly a violation of federal or state law and regulations. If 
> you have received this information in error, please notify Texas 
> Health Management Group immediately at 1-817-310-4999. Texas Health 
> Management Group, its subsidiaries, and affiliates hereby claim all 
> applicable privileges related to this information.
>
> -- 
> This message has been scanned for viruses and
> dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> believed to be clean.
> ------------------------------------------------------------------------
>
> _______________________________________________
>
> Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 
>
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list