[Asterisk-bugs] [Asterisk 0010082]: Application and function to determine existence of extensions but not jump to it yet

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Jul 2 23:49:40 CDT 2007


email_notification_title_for_action_bugnote_submitted 
====================================================================== 
http://bugs.digium.com/view.php?id=10082 
====================================================================== 
Reported By:                chappell
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10082
Category:                   Applications/General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 59300 
Disclaimer on File?:        Yes 
Request Review:              
====================================================================== 
Date Submitted:             06-28-2007 12:05 CDT
Last Modified:              07-02-2007 23:49 CDT
====================================================================== 
Summary:                    Application and function to determine existence of
extensions but not jump to it yet
Description: 
Attached are a new dialplan command (application) and a new dialplan
function.

The command ReadExten works much like Read.  However, instead of simply
accepting digits until an inter-digit time runs out, it tests the dialed
digits against a specified context and returns when it determines that a
number valid in that context has been dialed.

The function ISEXTEN determines whether a given context, extension, and
priority exist or not.

We use this new features in a calling-card IVR.  It invites the caller to
dial a number.  When a valid number is detected, it plays "connecting..."
and jumps to the context, like so:

[ivr-system-access]
exten => s,1,Answer

; Let the user dial a number in this context.
exten =>
s,n(repeat),ReadExten(number,custom/system-access-dial-extension,,n)
exten => s,n,GotoIf(${ISNULL(${number})}?i,1)

; Dispatch non-extension menu items.
exten => s,n,GotoIf(${ISEXTEN(phones,${number})}?:phones,${number},1)

; Put thru call to the dialed extension.
exten => s,n,Verbose(2,${CALLERID(all)} (${CDR(accountcode)}) dialed
${number})
exten => s,n,Background(custom/system-access-connecting,noanswer)
exten => s,n,Dial(Local/${number}@ivr-system-access-extensions/n,,Hg)

; Call ended.  Go bad so that the user can dial again.
exten => s,n,Verbose(2,${CALLERID(all)} (${CDR(accountcode)}) ended call
to ${number})
exten => s,n,Goto(s,begin)

exten => 1,1,Playback(option-one)
exten => 1,n,Hangup

exten => i,1,Playback(custom/system-access-invalid-extension)
exten => i,n,Goto(s,repeat)

include => phones


====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 07-02-07 23:49  
---------------------------------------------------------------------- 
What does it do on ambiguous extensions?

For example, if both '2' and '201' are valid extensions, what happens when
you press '2'? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-02-07 23:49  Corydon76      Note Added: 0066432                          
======================================================================




More information about the Asterisk-bugs mailing list