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[1] 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 used available. > 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 contains it. [1] https://issues.asterisk.org/jira/browse/ASTERISK-14380 -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check out the new Asterisk community forum at: https://community.asterisk.org/ New to Asterisk? Start here: https://wiki.asterisk.org/wiki/display/AST/Getting+Started asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users