[Asterisk-Users] Invalid extension handling

Adam Robins arobins at PharmaCentra.com
Thu Apr 14 12:11:11 MST 2005


When an outside callers hits my system, I play them a welcome message
and ask that they enter an extension.  If the extension is invalid, it
tells them so, and asks them to try again.  The relevant logic for this
is:

[extensions]
exten => _2XXX,Dial(SIP/${EXTEN})
;
exten => i,1,Playback,invalid
exten => i,n,Goto(incoming,_NXXNXXXXXX,1)
;

[incoming]
exten => _NXXNXXXXXX,1,Answer
exten => _NXXNXXXXXX,n,Background(welcome)        ; play welcome msg &
ask for extension
exten => _NXXNXXXXXX,n,WaitExten(5)               ; Wait for extension


This works fine, however, there is one special case that I would like to
handle differently.  If the caller inadvertently presses the # key
following the extension, I would like to discard the # and then send the
call back onto the stack.  I know how to strip the #, but I can't find
another command like WaitExten that will reprocess the call as new.

Any ideas are appreciated.

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.





More information about the asterisk-users mailing list