Here is my dialplan for my support queue:
exten => 201,1,Verbose(2,Doing support call)
exten => 201,n,Answer()
exten => 201,n,Wait(0.5)
exten => 201,n,Set(qac=${QUEUE_MEMBER(support,free)})
exten => 201,n,GotoIf($[${qac} > 0]?HAVEAGNT)
exten => 201,n,Verbose(2,No agents free in support queue)
exten => 201,n,Playback(cfmc/support-no-agent)
exten => 201,n,Voicemail(201 at ourvm,u)
exten => 201,n,Playback(goodbye)
exten => 201,n,Hangup()
exten => 201,n(HAVEAGNT),Playback(cfmc/support-intro)
exten => 201,n,Verbose(2,Queuing caller for support agent)
exten => 201,n,Queue(support,nrt,,,120)
exten => 201,n,Verbose(2,Support agent did not answer call)
exten => 201,n,Voicemail(201 at ourvm,b)
exten => 201,n,Playback(goodbye)
exten => 201,n,Hangup()
; #### Agent login logout ####
exten => *20,1,Verbose(2,Doing agent login/logout)
exten => *20,n,Answer()
exten => *20,n,wait(.0.5)
exten => *20,n,Read(AgentNumber,agent-user)
exten => *20,n,Set(UserID=${DB(ExtenToUser/${AgentNumber})})
exten => *20,n,GotoIf($["${UserID}"=""]?NOUSER)
exten => *20,n,Set(AgentStatus=${DB(users/${UserID}/AgentStatus)})
exten => *20,n,GotoIf($["${AgentStatus}"="1"]?VERIFY)
exten => *20,n,GotoIf($["${AgentStatus}"="2"]?VERIFY)
exten => *20,n(NOUSER),Playback(cfmc/bad-agent)
exten => *20,n,Playback(vm-goodbye)
exten => *20,n,Hangup()
exten => *20,n(VERIFY),VMAuthenticate(${AgentNumber}@ourvm)
exten => *20,n,GotoIf($["${AgentStatus}"="2"]?AGENTOFF)
exten => *20,n,Set(DB(users/${UserID}/AgentStatus)=2)
exten => *20,n,Set(DB(users/${UserID}/AgentDevice)=${CUT(CHANNEL,-,1)})
exten => *20,n,AddQueueMember(support,Local/Queue$
{AgentNumber}@ansqueue,,,,${C$
; AQMSTATUS can be ADDED | MEMBERALREADY | NOSUCHQUEUE
exten => *20,n,Playback(agent-loginok)
exten => *20,n,Verbose(2,Agent ${AgentNumber} added ${DB(users/$
{UserID}/AgentD$
exten => *20,n,Hangup()
exten => *20,n(AGENTOFF),Set(DB(users/${UserID}/AgentStatus)=1)
exten => *20,n,Set(OldVal=${DB_DELETE(users/${UserID}/AgentDevice)})
exten => *20,n,RemoveQueueMember(support,Local/Queue$
{AgentNumber}@ansqueue)
exten => *20,n,Playback(agent-loggedoff)
exten => *20,n,Verbose(2,Agent ${AgentNumber} removed)
exten => *20,n,Hangup()
[ansqueue]
exten => _Queue.,1,Set(AgentNumber=${EXTEN:5})
exten => _Queue.,n,Set(UserID=${DB(ExtenToUser/${AgentNumber})})
exten => _Queue.,n,Set(AgentDevice=${DB(users/${UserID}/AgentDevice)})
exten => _Queue.,n,Verbose(2,Agent ${AgentNumber} status is $
{DEVICE_STATE(${Ag$
exten => _Queue.,n,GotoIf($["${DEVICE_STATE($
{AgentDevice})}"="NOT_INUSE"]?DIAL$
exten => _Queue.,n,Busy()
exten => _Queue.,n,Hangup()
exten => _Queue.,n(DIALIT),Dial(${AgentDevice},,g)
exten => _Queue.,n,Hangup()
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
On Aug 21, 2009, at 1:00 PM, James A. Shigley wrote:
> First off this is not my work for extensions.conf it is modified from
>
http://leifmadsen.wordpress.com/2009/07/15/migrating-from-agentcallbacklogin-to-standard-dialplan-methods-part-1/
> So credit to Leif Madsen
>
> But as to my question
>
> [AgentLogin]
> ;A replaced version of AgentCallbackLogin() using a GoSub()
> ;
> exten => XXXXXXXXXX,1,Verbose(2,Logging in agent)
> exten => XXXXXXXXXX,n,WaitExten(5)
> exten => XXXXXXXXXX,n,GoSub(AgentCallbackLogin,start,1)
> exten => XXXXXXXXXX,n,Hangup()
>
> [AgentLogOut]
> exten => XXXXXXXXXX,1,RemoveQueueMember(9819930,DAHDI/g1/$
> {CALLERID(num)})
>
> ; calling 'primary' queue
> ;
> exten => XXXXXXXXXX,1,Verbose(2,Calling into the primary queue)
> exten => XXXXXXXXXX,n,Playback(silence/1)
> exten => XXXXXXXXXX,n,Queue(9819930)
> exten => XXXXXXXXXX,n,Hangup()
> ;
> [AgentCallbackLogin]
> ; conversion of AgentCallbackLogin() to using AddQueueMember()
> ;
> exten => start,1,Verbose(2,Logging in agent)
> exten => start,n,Playback(silence/1)
> exten => start,n,Read(AGENT_USERID,agent-user)
> exten => start,n,VMauthenticate(${AGENT_USERID}@default)
> exten => start,n,AddQueueMember(Queue,DAHDI/g1/${CALLERID(num)})
> exten => start,n,Playback(agent-loginok)
> exten => start,n,Return()
>
>
> Queue Context from Queues.conf
>
> [Queue]
> music=default
> strategy=linear
> timeout=5
> retry=5
> wrapuptime=0
> maxlen = 0
> announce-frequency = 0
> announce-holdtime = no
>
> Ok Here is how I would like this queue to work
>
> First try and deliver the call to the Dynamic Agents who login using
> the above Setup from extensions. I of course want that to be linear
> in fashion with 5 seconds to try each one. BUT if none of the
> dynamic agents are available or if there are no dynamic agents I
> want to send that call to an interface/context. We are an answering
> service. If no agent is available in the queue I want to send it to
> the Interface which goes to my TAS equipment.
>
> So DAHDI/g2/Exten
>
> How do I accomplish that because I can?t figure it out from googling
> or http://www.voip-info.org/
>
>
> James Shigley
> Monroe Telephone Answering Service
> 409-981-9213
> Infinity 5.5,UC 4.02.3803, Blink 3.0.104
> Ecreator:2.21, eResponse 1.1.7
> Webportal,WebApps,
>
> CONFIDENTIALITY NOTICE: This email, including any attachments,
> contains information which may be confidential or privileged. The
> information =is intended to be for the use of the individual or
> entity named above. If you are not the intended recipient, be aware
> that any disclosure, copying, distribution or use of the contents of
> this information is prohibited. If you have received this email in
> error, please notify the sender immediately by "reply to sender
> only" message and destroy all electronic and hard copies of the
> communication, including attachments.
>
> <image001.jpg>
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20090821/67658ec1/attachment-0001.htm