[asterisk-dev] semantics of send_digit_begin
and AST_FLAG_END_DTMF_ONLY
Luigi Rizzo
rizzo at icir.org
Fri Jan 19 15:17:12 MST 2007
On Fri, Jan 19, 2007 at 03:35:40PM -0600, Steven Critchfield wrote:
> On Fri, 2007-01-19 at 13:08 -0800, Luigi Rizzo wrote:
> > On Fri, Jan 19, 2007 at 02:15:22PM -0600, Russell Bryant wrote:
...
> > > Well, there is some history behind the reasoning that this is the case.
> > > Previously, Asterisk treated DTMF as a single event, and the frame
> > > type was AST_FRAME_DTMF. However, there were some problems with this,
> > > so we had to start moving toward treating a digit as two events, a
> > > beginning and end.
> > >
> > > To make this transition easiest, AST_FRAME_DTMF and AST_FRAME_DTMF_END
> > > are actually the exact same thing. When the core receives an END
> > > without receiving a BEGIN earlier for whatever reason, it turns it into
> > > a BEGIN and later sends an END.
...
> > i think i did not explain myself clearly.
> > I understand that in some cases a channel only generates
> > one event, and in some it generates two. Now, what i meant is
> >
> > 1. when you receive a digit, always send event #1 (call it begin if you like)
> > 2. if the destination channel needs two events, when it is due time, also
> > send event #2 (call it end if you like)
> >
> > This would remove the need for any magic in the initial handler,
> > woudln't it ?
> > an incoming event #1 in would always generate an event #1 out,
> > possibly scheduling also an event #2 at a later time if
> > the destination needs one (e.g. by setting send_dtmf_end
> > to non-null).
> > Then:
>
> You seem to have missed the historic problem and the flag day event to
quite possible :)
by that you mean that the constants (AST_FRAME_DTMF_BEGIN,
AST_FRAME_DTMF_END, AST_FRAME_DTMF) are sent over the wire ?
cheers
luigi
More information about the asterisk-dev
mailing list