[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 09:30:52 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 09:30 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
======================================================================
----------------------------------------------------------------------
file - 07-02-07 09:30
----------------------------------------------------------------------
Your files will become viewable once your license is accepted. Also - you
can use ChanIsAvail with the Local channel driver to see whether an
extension in a context exists or not.
Issue History
Date Modified Username Field Change
======================================================================
06-28-07 12:05 chappell New Issue
06-28-07 12:05 chappell Asterisk Version => SVN
06-28-07 12:05 chappell SVN Branch (only for SVN checkou => 1.4
06-28-07 12:05 chappell SVN Revision (number only!) => 59300
06-28-07 12:05 chappell Disclaimer on File? => Yes
06-28-07 12:08 chappell File Added: app_readexten.c
06-28-07 12:08 chappell File Added: app_readexten.c
06-28-07 12:08 chappell File Added: func_isexten.c
06-28-07 13:58 chappell Note Added: 0065852
06-28-07 14:03 chappell Note Added: 0065853
======================================================================
More information about the Asterisk-bugs
mailing list