[Asterisk-Users] Invalid extension handling
Kanuri, Seshu (Company IT)
Seshu.Kanuri at morganstanley.com
Thu Apr 14 13:27:52 MST 2005
Use Gotoif instead of Goto. Check Gotoif usage.
This will give you enough features to fork the calls after the extension
is re-entered
Seshu
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Adam
Robins
Sent: Thursday, April 14, 2005 3:11 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Invalid extension handling
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.
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited.
More information about the asterisk-users
mailing list