[asterisk-bugs] [Asterisk 0019136]: [patch] 'e' special extension fails to trigger in at least two cases

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Apr 26 17:14:33 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19136 
====================================================================== 
Reported By:                kshumard
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   19136
Category:                   PBX/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Target Version:             1.8.5
Asterisk Version:           SVN 
JIRA:                       SWP-3347 
Regression:                 No 
Reviewboard Link:           https://reviewboard.asterisk.org/r/1196/ 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 314115 
Request Review:              
====================================================================== 
Date Submitted:             2011-04-18 14:45 CDT
Last Modified:              2011-04-26 17:14 CDT
====================================================================== 
Summary:                    [patch] 'e' special extension fails to trigger in at
least two cases
Description: 
https://wiki.asterisk.org/wiki/display/AST/The+Asterisk+Dialplan says, "e -
This extension will substitute as a catchall for any of the 'i', 't', or
'T' extensions, if any of them do not exist and catching the error in a
single routine is desired. The function EXCEPTION may be used to query the
type of exception or the location where it occurred."

The attached patch attempts to make this statement more true. In testing,
neither 'i' nor 't' was present but when the appropriate conditions were
met the channel didn't move it to the 'e' extension. The patch throws an
exception if WaitExten results in a timeout, and explicitly jumps to e,1
when an invalid extension is entered and there's no 'i' (though the
proposed patch might not be the proper way to accomplish this).

pbx_builtin_background should also throw an exception if it times out, but
currently doesn't. I just didn't know the appropriate logic to use at the
end of the function to add it in.
====================================================================== 

---------------------------------------------------------------------- 
 (0134158) svnbot (reporter) - 2011-04-26 17:14
 https://issues.asterisk.org/view.php?id=19136#c134158 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 315645

U   branches/1.8/main/pbx.c

------------------------------------------------------------------------
r315645 | rmudgett | 2011-04-26 17:14:32 -0500 (Tue, 26 Apr 2011) | 21
lines

The 'e' special extension fails to trigger in at least two cases.

The 'e' extension is a fall back for the 'i', 't', or 'T' extensions if
any of them do not exist.  Many of the places the 'e' extension was
supposed to be invoked fail because the priority was set wrong.  There
were two places where the 'e' extension was not even checked for fall
back.

* Made invoke the 'e' extension similarly to the previous 'i', 't', or 'T'
extension check and added the 'e' extension as a fall back to the two
missing locations.

* Prioritized and optimized some hangup tests associated with the 'e'
extension.

(closes issue https://issues.asterisk.org/view.php?id=19136)
Reported by: kshumard
Tested by: rmudgett

Review: https://reviewboard.asterisk.org/r/1196/

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=315645 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-04-26 17:14 svnbot         Note Added: 0134158                          
======================================================================




More information about the asterisk-bugs mailing list