[asterisk-users] DTMF input while waiting in queue...

Louis Carreiro carreirolt at gmail.com
Mon Mar 28 07:54:33 CDT 2011


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>


More information about the asterisk-users mailing list