[asterisk-dev] Asterisk AGI Playback FF and Playback REW

Bryant Zimmerman BryantZ at zktech.com
Thu Feb 18 18:55:46 CST 2010


Johan

Thanks for the feed back.

I am using AGI how would I maintain control with-in my AGI program. The 
only way to access the Controlplayback would be with the EXEC command based 
on what I have seen the overhead would kill the app. I would need to issue 
a Get on each of the variables after each stop. This would cause three to 
four additional calls. 

The real issue is I need to be able to with a single key press enter in 
either fast forward or rewind modes. For example when a user presses key 4 
start playback in reverse with 500ms skip, if they press 5 Playback normal 
, If they Press 6 playback fast forward with 1000ms skip.   The way all of 
the current control options are offered requires the user to enter play 
back first and then press a key for the option. 

Does anyone know if there would be any adverse impact to updating the 
(STREAM FILE) AGI command to support this?

Thanks
Bryant

 From: "Johan Wilfer" <johan at wilfer.se>
Controlplayback reports the variables CPLAYBACKSTATUS, CPLAYBACKOFFSET 
and CPLAYBACKSTOPKEY. If you like you can define the ff and rev buttons 
as stop keys and inspect these variables and then act as you like.

I've implemented it in the dialplan like this, I use the keys 1,4,7 to 
rewind 1, 5 or 15 minutes. And I use the keys 3, 6 and 9 to forward 1, 5 
or 15 minutes.

Good luck!
/Johan

Bryant Zimmerman skrev:
> Jared
> 
> Thanks for your response. How do I get setup on the asterisk-biz mailin 
> list?
> 
> I believe the ControlPlayback gives me the same ability as the CONTROL 
> STREAM FILE agi command.
> 
> I have been testing with (CONTROL STREAM FILE). The issue I have with it 

> is I need to be able to switch the modes to keep track of playback 
> state. If a user hits the FF, REV or Pause keys.I don't get state 
> updates. So I can't maintain playback states in my AGI application.
> 
> I need a version of 
> (STREAM FILE) That would take several additional options. MODE 
> (Play, FF, REV) and RATE (skipms) The default for MODE would be PLAY 
> With this command I could send in my escape digits to the keys that I 
> want for Stop, Pause, Play, FF, REV and then when the user presses one 
> of the digits I could re-enter the (STREAM FILE) in the last position 
> using the correct mode.
> 
> I have looked at the c code for the CONTROL STREAM FILE and the STREAM 
> FILE commands and believe most of the ability is already there between 
> the two of them. The STREAM FILE just needs to be reworked with the 
> additional options and ability. Based on my design the STREAM FILE could 

> be modified using optional settings and not break any existing AGI apps. 

> This provides a higher level of playback control without having to add 
> more AGI functions and with no impact on users not interested in the 
> enhanced STREAM FILE ability.
> 
> Any feed back is appreciated.
> Thanks
> Bryant / zktech
> 
> ------------------------------------------------------------------------
> *From*: "Jared Smith" <jsmith at digium.com>
> 
> On Wed, 2010-02-17 at 17:45 -0500, Bryant Zimmerman wrote:
>> How do I go about setting up a bounty for a feature?
> 
> We don't have a formal bounty system. Your best bet is to ask on the
> asterisk-biz mailing list, and see if anyone jumps.
> 
>> I need the ability to do file playback in Fast Forward and Reverse
>> from AGI scripts. The current methods require you enter playback and
>> then have the user enter another key. A recording app I am working on
>> needs complete playback control from the AGI scripts.
> 
> Does the ControlPlayback application work well enough for what you're
> trying to accomplish? It should be easy enough to call from AGI using
> the EXEC command.
> 
> --
> Jared Smith
> Digium, Inc.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100218/b3e713d9/attachment-0001.htm 


More information about the asterisk-dev mailing list