[asterisk-bugs] [Asterisk 0011579]: [patch] Add a new function to check if a extension[, priority] exits in a context

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Dec 17 11:16:24 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11579 
====================================================================== 
Reported By:                irroot
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11579
Category:                   Functions/NewFeature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 90470 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             12-17-2007 09:11 CST
Last Modified:              12-17-2007 11:16 CST
====================================================================== 
Summary:                    [patch] Add a new function to check if a
extension[,priority] exits in a context
Description: 
this is a wrapper to ast_exists_extension and/or ast_findlabel_extension

this will be used to avoid goto falling off the map/hanging up ... if
there is no extension 

ie

exten =>t,n,
GotoIf(${ISEXTEN(ivr-${IVRCONT},${NEWUEXTEN})}?ivr-${IVRCONT},${NEWUEXTEN},1)

will work or continue on to next priority or alternate 
====================================================================== 

---------------------------------------------------------------------- 
 irroot - 12-17-07 11:16  
---------------------------------------------------------------------- 
here is a piece of dialplan that listens for a single key and when a match
is found dispatches it a dialplan replacement for WaitExten used with
background/playtones 

exten => _X,1,GotoIf(${EXISTS(${UEXTEN})}?add)
exten => _X,n,SET(UEXTEN=${EXTEN})
exten => _X,n,Goto(tryivr)
exten => _X,n+1(add),SET(UEXTEN=${UEXTEN}${EXTEN})
exten => _X,n,Goto(tryivr)
exten =>
_X,n+1(tryivr),GotoIf(${ISEXTEN(ivr-${IVRCONT},${UEXTEN})}?gotoivr)
exten => _X,n+1(gotoivr),SET(NEWUEXTEN=${UEXTEN})
exten => _X,n,SET(UEXTEN=)
exten => _X,n,Goto(ivr-${IVRCONT},${NEWUEXTEN},1) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
12-17-07 11:16  irroot         Note Added: 0075572                          
======================================================================




More information about the asterisk-bugs mailing list