[Asterisk-Users] Cmd READ and #
Adam Robins
arobins at PharmaCentra.com
Wed Jan 26 17:24:18 MST 2005
Hello,
I've set up a dial plan so that outside callers hear a "Welcome" message which asks them to enter an extension or press * to dial by name. This works great.
I also want to allow a remote employee to interrupt the message by pressing #, which will direct them to voicemail.
The issue I am having is that the READ command uses # as a termination symbol. Is there any other way I can accept # as input or must I use a digit instead?
I have:
[extensions]
;
; Directory
;
exten => _*,1,Answer
exten => _*,2,Wait(1)
exten => _*,3,Directory(default|extensions)
exten => _*,4,Goto(incoming,s,1)
;
; Access Voicemail
;
exten => #,1,Answer
exten => #,2,Wait(1)
exten => #,3,VoicemailMain(${CALLERIDNUM})
exten => #,4,Hangup
...
...
[incoming]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,DigitTimeout(3) ; Set Digit Timeout to 3 seconds
exten => s,4,ResponseTimeout(5) ; Set Response Timeout to 5 seconds
exten => s,5,Read(RESP,vm-mainext,2) ; Ask for extension or * for directory
exten => s,6,GotoIf($[${RESP} = *]?7:8) ; Check for *
exten => s,7,Goto(extensions,_*,1) ; goto *
exten => s,8,GotoIf($[${RESP} = #]?9:10) ; Check for #
exten => s,9,Goto(extensions,#,1) ; goto #
exten => s,10,.....
Thanks,
Adam
The contents of this email message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply email and delete this message and its attachments, if any.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 2964 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20050126/e3f906c7/attachment.bin
More information about the asterisk-users
mailing list