[asterisk-users] Simple speech recognition for driving IVR - "press or say one".
jcolp at digium.com
Sun Dec 10 17:38:14 CST 2017
On Sun, Dec 10, 2017, at 05:51 PM, Jonathan H wrote:
> Hang on, all of the fiddling in this thread seems remarkably
> over-complicating what should be an incredibly simple task.
> We know that a DTMF keypress interrupted the recording. We also know
> that app_record.c knows which keypress it was from
> * \param dtmf_integer the integer value of the DTMF key received
> as in
> static enum dtmf_response record_dtmf_response(struct ast_channel
> *chan, struct ast_flags *flags, int dtmf_integer, int terminator)
> For reasons which have me scratching my head, app_record turns a
> useful DTMF value into a rather meaningless "DTMF" in the
> RECORD_STATUS variable.
When originally added it was only possible to terminate based on a
termination DTMF, so you'd know which DTMF key was used because no other
DTMF would stop. Afterwards a community member contributed a change
to add an option to allow any DTMF key to terminate it, but the dialplan
variable stuff was not extended to make the knowledge of which DTMF was
> But SOMETHING must be floating around in Asterisk for app_record.c to
> know what number was pushed. If I'm using RFC2833, is there ANY way of
> getting that last keypress.
> In other words: "The user pressed a number, recording stopped, now
> what was that number?" - WITHOUT rewriting and recompiling a core
> application or doing any complex workaround?
Within the code f->subclass.integer is where the DTMF digit is. You'd
need to make a code change to set another dialplan variable which
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-users