[asterisk-dev] [Asterisk 0011377]: added a return variable to app_controlplayback that reports the key used to stop playback.

Johan Wilfer johan at wilfer.se
Wed Dec 12 14:21:56 CST 2007


Jason Parker wrote:
> Johan Wilfer wrote:
>   
>> ...
>> My suggestion is to simply default to no forward / rewind key. Because 
>> if you would like to
>> use your own logic in the dialplan and don't want to use the forward / 
>> rewind you still have to provide
>> two keys for this along with 0 as skip argument to neutralize this default.
>>
>> Maybe the current default doesn't make sense anyway, and should be 
>> changed. As stated on voip-info.org:
>> "Note that as the *** key is on the left and the *#* button is on the 
>> right of a  telephone keypad, it may make
>> more sense to swap the default buttons: use *** for rewind and *#* for 
>> forward."
>>
>>
>> Could we remove these defaults?
>>
>>     
>
> I might as well throw in my $2.50, since my comment prompted this. :)
>
> I'm a bit torn.  On one hand, I fully agree that forcing defaults is bad and
> in your case, unwelcome.
>
> On the other hand, I don't know if it would be a good idea to change the
> defaults, as that would be an unexpected change in behavior (however, it would
> only go in trunk, and can thus be documented in UPGRADE.txt)
>   
Aha, so you are Qwell, I see.. :-)

I can't say I see any problem in changing this behavior in trunk. Two 
reasons: If you upgrade from 1.4 to 1.6 there
are likely to be other things you will have to fix. Fixing this would be 
a matter of replace ControlPlayback(filename) with
ControlPlayback(filename,,*,#). The other reason is that this is 
backwards and a strange default (does anyone use it?).

> Perhaps what would make sense, is some mixture of both.  If you just do
> ControlPlayback(filename), I think * and # should be ffwd and rew (I also
> agree that they are backwards...).  However, if you do
> ControlPlayback(filename,,,,), I think maybe it could set them to NULL.  The
> only problem I can see with this method, is that it would be an unexpected
> change, if you only INTENDED to change skipms (or whatever is after ffwd and rew).
>
> Another thought I had, was that in your case, you're wanting to set every key
> to be a stop key.  What if we left the default behavior, except in the case
> where stopkey has a key that would normally be a default (ffwd and rew)?  For
> instance: ControlPlayback(filename,123456789*0).  In this case, * would be
> ONLY a stop key, and # would continue to rewind.  If you were to put # into
> stopkeys, then it would no longer act as rew.
>
>
> I think I like the last method the best.  Thoughts?
>   
The last one is best if you would like to keep the current defaults.

However - there might be situations there you would like to use 
ControlPlayback like streamfile in AGI.
With streamfile you can define which keys that are allowed to stop the 
playback. It might be useful if the
ControlPlayback application could be used in a similar way say 
ControlPlayback(file,,,,0) to only allow
the 0 to stop the playback.

I think the more generic and simple the better.

Greetings
Johan



More information about the asterisk-dev mailing list