Louis Carreiro
2011-Mar-28 12:54 UTC
[asterisk-users] DTMF input while waiting in queue...
Hey all! I'm trying to figure out how to have a queue accept an inbound caller's key press to action on. At first I'm just trying to implement a "Press 1 to leave a voice mail" announced and at any time in the queue, the user can press 1 and go to the queue's voicemail. Later I'd like to have it accept "Press 1 if this is an x issue, press 2 if this a y problem" and I'll have UserEvent's generated for the press. This is the dial plan I have now. exten => 1820,1,Macro(user-callerid,) exten => 1820,n,Answer exten => 1820,n,ExecIf($["${QUEUEWAIT}" = ""]?Set(__QUEUEWAIT=${EPOCH})) exten => 1820,n,Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL}) exten => 1820,n,Set(__BLKVM_BASE=${EXTEN}) exten => 1820,n,Set(DB(${BLKVM_OVERRIDE})=TRUE) exten => 1820,n,UserEvent(QueueAlert,CallerID: ${CALLERID(number)},Queue: ${EXTEN},UniqueID: ${UNIQUEID},Channel: ${CHANNEL}) exten => 1820,n,ExecIf($["${REGEX("(M[(]auto-blkvm[)])" ${DIAL_OPTIONS})}" != "1"]?Set(_DIAL_OPTIONS=${DIAL_OPTIONS}M(auto-blkvm)U(ackcall^s^1))) exten => 1820,n,Set(__NODEST=${EXTEN}) exten => 1820,n,GotoIf($["foo${RGPREFIX}" = "foo"]?REPCID) exten => 1820,n,GotoIf($["${RGPREFIX}" !"${CALLERID(name):0:${LEN(${RGPREFIX})}}"]?REPCID) exten => 1820,n,Noop(Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID) exten => 1820,n,Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}}) exten => 1820,n,Set(_RGPREFIX=) exten => 1820,n(REPCID),Noop(CALLERID(name) is ${CALLERID(name)}) exten => 1820,n,Set(_RGPREFIX=IT HD:) exten => 1820,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)}) exten => 1820,n,Set(MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${STRFTIME (${EPOCH},,%Y%m%d-%H%M%S)}-${UNIQUEID}) exten => 1820,n,Set(__CWIGNORE=TRUE) exten => 1820,n,Queue(1820,t,,) exten => 1820,n,Noop(Deleting: ${BLKVM_OVERRIDE} ${DB_DELETE(${BLKVM_OVERRIDE})}) exten => 1820,n,Set(__NODEST=) exten => 1820,n,Set(__CWIGNORE=) exten => 1820,n,Goto() exten => 1820*,1,Macro(agent-add,1820,1739) exten => 1820**,1,Macro(agent-del,1820) exten => *451820,1,Set(QUEUENO=1820) exten => *451820,n,Goto(app-queue-toggle,s,start) exten => h,1,Macro(hangupcall,) Thanks in advance everyone! Louis -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110328/09fd5748/attachment.htm>
Sherwood McGowan
2011-Mar-28 15:07 UTC
[asterisk-users] DTMF input while waiting in queue...
On 3/28/2011 7:54 AM, Louis Carreiro wrote:> > Hey all! > > I?m trying to figure out how to have a queue accept an inbound > caller?s key press to action on. At first I?m just trying to implement > a ?Press 1 to leave a voice mail? announced and at any time in the > queue, the user can press 1 and go to the queue?s voicemail. Later I?d > like to have it accept ?Press 1 if this is an x issue, press 2 if this > a y problem? and I?ll have UserEvent?s generated for the press. >*snip* In your queues.conf, in the definition for 1820, add the following: context=queue1820-exit Then, in your dialplan create a new context: [queue1820-exit] exten => 1,1,Noop(Caller Pressed 1 to leave a voicemail) exten => 1,n,Voicemail(<voicemailbox>,<theoptionsyouwant>) exten => 1,n,Hangup That should get you started...Read about the "context" configuration option here: http://www.voip-info.org/wiki/view/Asterisk+config+queues.conf Cheers! -- Sherwood McGowan <sherwood.mcgowan at gmail.com> Carrier, ITSP, Call Center, and PBX Solutions Consultant