[asterisk-dev] tilghman: branch 1.4 r156755 - /branches/1.4/apps/app_while.c

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Nov 14 08:30:27 CST 2008

On Friday 14 November 2008 07:22:20 Russell Bryant wrote:
> SVN commits to the Digium repositories wrote:
> > Author: tilghman
> > Date: Thu Nov 13 18:41:37 2008
> > New Revision: 156755
> >
> > URL: http://svn.digium.com/view/asterisk?view=rev&rev=156755
> > Log:
> > ast_waitfordigit() requires that the channel be up, for no good logical
> > reason.  This prevents While/EndWhile from working within the "h"
> > extension.
> Actually, I think this behavior makes perfect sense.  Every channel API
> call in Asterisk behaves this way.  This API call assumes the channel to
> be up, because it's hard to read digits from a channel that isn't up.
> :-)  API calls that have this requirement all return -1 as soon as
> possible to indicate that the call has been hung up, and that the
> appropriate post-hangup cleanup procedures should be done now.

Yes, but the issue isn't that some calls require that the channel be up.  It's
that the structural element While requires that the channel be up, for no good
logical reason.  Sorry if this was unclear in the log message.  Inside of the
While, if Read or some other application that actually interacts with the
channel, those are all good places to check if the channel is up.  But a
structural element like While simply shouldn't care one way or the other.


More information about the asterisk-dev mailing list