[asterisk-users] Find out which key ended recording?
Steve Edwards
asterisk.org at sedwards.com
Fri Jun 7 00:20:34 CDT 2019
On Fri, 7 Jun 2019, David Cunningham wrote:
> We're using Perl and so far I haven't found an equivalent there.
On Thu, 6 Jun 2019, Steve Edwards wrote:
> I'm not much of a Perl programmer...
But you should never turn down an opportunity to develop your skills :)
Try something like:
my $result = $AGI->record_file(
'/tmp/foo' # filename
, 'wav' # format
, '#*0123456789' # escape digits
, '5000' # timeout
);
$AGI->verbose('result = ' . $result, 0);
Which results in:
<SIP/192.168.0.31-00000060>AGI Rx << RECORD FILE /tmp/foo wav #*0123456789 5000
<SIP/192.168.0.31-00000060>AGI Tx >> 200 result=50 (dtmf) endpos=0
<SIP/192.168.0.31-00000060>AGI Rx << VERBOSE "result = 50"
when '2' is pressed.
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
More information about the asterisk-users
mailing list