[asterisk-users] Newbie Queue: greetings when first joiningqueue
Lee, John (Sydney)
John.Lee at compuware.com
Tue Apr 29 02:44:00 CDT 2008
> Check the number of calls waiting in the queue, then play the message
if
> more than 0
>
> example code (written in the TBird IDE)
>
> Exten => 100,1,Answer()
> Exten => 100,n,Set(NumWaiting=${QUEUE_WAITING_COUNT(${QUEUENAME})})
> Exten => 100,n,GotoIf($[${NumWaiting} = 0]?JoinQueue)
> Exten => 100,n,PlayBack(MyMessage)
> Exten => 100,n(JoinQueue),Queue(MyQueueName)
> Exten => 100,n,Hangup()
>
> So, if there are no members in the queue, jump directly to the queue
> application, otherwise play the message first.
Thanks Julian and it certainly works.
I have got another question if I may.
If there is just one agent in the queue and he put on Do-Not-Disturb,
certainly in this case the queue count will be zero but I would still
like Asterisk to play back "Welcome to XYZ, your call is important to us
... please stay on the line", the logic above would fail to play back
the intro message.
I thought about trapping DIALSTATUS but if there is actually no dial
cmd, how can I trap the DND then and play back the message again?
Any thoughts?
More information about the asterisk-users
mailing list