[asterisk-users] Playback file and detect a key press

Bob Smither Smither at C-C-I.com
Wed Dec 12 07:48:12 CST 2007


On Sat, 2007-12-08 at 13:40 -0600, Moises Silva wrote:
> Bob,
> 
> GET DATA should do something like that. But, to do "exactly" that, you
> could try a patch I did to call AGI(agi:async), this is a special way
> of AGI. As you know, you can already call AGI(name-of-script.php), or
> AGI(agi://ipaddress) for the so named FastAGI. I created another
> variant AGI(agi:async) that will allow you to run AGI thru the manager
> interface. That way you could easily do this in a language like php.

Thanks Moises - I will take a look at your patch, it sounds interesting.

I found a developed a workaround using a standard AGI script.  The
message is played back using Stream File with 0 offset and the allowed
escape digits.  When an allowed digit is pressed, the digit and the file
offset is returned by Stream File.  Using the pressed digit you can go
to an appropriate routine to play back an acknowledgment "Thank you for
pressing ..." and then start the message playback just before the time
that the key was pressed.

The user hears the message, then has feedback that the key was detected,
and then hears the rest of the message.  This actually works pretty
well.

Thanks!
-- 
Bob Smither, PhD                                   Circuit Concepts, Inc.
=========================================================================
   You have the right to YOUR life, liberty and property, but not MINE
=========================================================================
Smither at C-C-I.Com  http://www.C-C-I.Com  281-331-2744(office)  -4616(fax)




More information about the asterisk-users mailing list