playback: Easy ways to handle different situations?
Hi, I am fiddling arround with fs and different situations to handle playbacks and wonder, if there are some tricks or options, to tell "playback", to handle playbacks in different ways? What I found out till now: 1.) If i want to stop a playback, I have to send a "break"... 2.) If I playback a soundfile (#1) and tell fs to play another soundfile (#2), while #1 is still playing back, fs behaves as follow: #1 will pause, #2 will be played back and after #2 was played back, #1 will continue to play back. Why is this the default behavior? I want to the following and would like to ask, if there are or will be some options to do that in an easy way: 1.) Stop a playing file, by sending a new playback command with another file: Although I can figure out some situations, where the behavior described in 2.) could be useful, I would like to have the option, to tell fs with playback, to permanently stop the current playing file and replace it with the new file. Otherwise I always first have to send a "break", then wait for the "CHANNEL_EXECUTE_COMPLETE" and then send the new playfile command. Perhaps it would be easier, if fs could handle that. 2.) Play a list of files, one after the other: I would like to play a number of files in a row. For exaple I want to tell the caller, how much money he has left. Let's say, he has 12,55 (whatever) left. So I have to play 3 files: twelve.wav - fifty.wav - five.wav. As far as I see, I have to play the file "twelve.wav", wait for "CHANNEL_EXECUTE_COMPLETE" in conjuntion with "playback", play the file "fifty.wav", wait and so on... Another option to play a list would be, to use the behavior, described in the first 2.). Because a first called playback will pause, when another playback is sent, I could send 3 playback commands with the three files in a reversed order. playback five.wav, playback fifty.wav, blayback twelve.wav. Because the first two files will be paused, twelve.wav will be played first. Is this the way I have to go or are there chances, that there is a slicker solution for this? Thanks for the help. Dennis
On Oct 21, 2008, at 3:29 AM, Dennis wrote:
Hi,
I am fiddling arround with fs and different situations to handle playbacks and wonder, if there are some tricks or options, to tell "playback", to handle playbacks in different ways?
What I found out till now:
1.) If i want to stop a playback, I have to send a "break"...
2.) If I playback a soundfile (#1) and tell fs to play another soundfile (#2), while #1 is still playing back, fs behaves as follow: #1 will pause, #2 will be played back and after #2 was played back, #1 will continue to play back. Why is this the default behavior?
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect. /b
2008/10/21 Brian West <brian@freeswitch.org>:
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect.
Thanks, this works quite nice for playing a list of soundfiles. BUT, there is a big flaw when using "event-lock: true". There is no chance to stop playing the list, if I whish to. If a long list of files is playing and an event accours, which makes me want to stop playing all files, fs does not react on new commands, till all files where played back - even "break" won't do anything. Is there a solution for this? Dennis
yes post a feature request and maybe a bounty on http://wiki.freeswitch.org/wiki/Bounty On Tue, Oct 21, 2008 at 6:11 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/21 Brian West <brian@freeswitch.org>:
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect.
Thanks, this works quite nice for playing a list of soundfiles. BUT, there is a big flaw when using "event-lock: true". There is no chance to stop playing the list, if I whish to. If a long list of files is playing and an event accours, which makes me want to stop playing all files, fs does not react on new commands, till all files where played back - even "break" won't do anything.
Is there a solution for this?
Dennis
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Ok, if there is nothing implemented yet, which can "break" playing files, which where started with "event-lock:true", I will go your suggested way. I think, that this would be a very helpful feature. Kind regards Dennis 2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
yes post a feature request and maybe a bounty on http://wiki.freeswitch.org/wiki/Bounty
On Tue, Oct 21, 2008 at 6:11 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/21 Brian West <brian@freeswitch.org>:
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect.
Thanks, this works quite nice for playing a list of soundfiles. BUT, there is a big flaw when using "event-lock: true". There is no chance to stop playing the list, if I whish to. If a long list of files is playing and an event accours, which makes me want to stop playing all files, fs does not react on new commands, till all files where played back - even "break" won't do anything.
api break <uuid> will break one of them just not all. it has nothing to do with event lock event lock means do not parse events recursively like the behavior you described. Since you asked so nicely, I added the "all" modifier to the command. api break <uuid> all On Tue, Oct 21, 2008 at 9:45 AM, Dennis <odermann@googlemail.com> wrote:
Ok, if there is nothing implemented yet, which can "break" playing files, which where started with "event-lock:true", I will go your suggested way. I think, that this would be a very helpful feature.
Kind regards Dennis
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
yes post a feature request and maybe a bounty on http://wiki.freeswitch.org/wiki/Bounty
On Tue, Oct 21, 2008 at 6:11 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/21 Brian West <brian@freeswitch.org>:
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect.
Thanks, this works quite nice for playing a list of soundfiles. BUT, there is a big flaw when using "event-lock: true". There is no chance to stop playing the list, if I whish to. If a long list of files is playing and an event accours, which makes me want to stop playing all files, fs does not react on new commands, till all files where played back - even "break" won't do anything.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
On Tue, Oct 21, 2008 at 10:43 AM, Anthony Minessale < anthony.minessale@gmail.com> wrote:
api break <uuid> will break one of them just not all. it has nothing to do with event lock event lock means do not parse events recursively like the behavior you described.
Since you asked so nicely, I added the "all" modifier to the command.
api break <uuid> all
And the peasants rejoice!
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
api break <uuid> will break one of them just not all. it has nothing to do with event lock event lock means do not parse events recursively like the behavior you described.
Ah, ok, now I understand what event lock means, thanks.
Since you asked so nicely, I added the "all" modifier to the command.
api break <uuid> all
Thanks again! The command itself works great and is a great help, but after sending the command, fs exits with the error "Segmentation fault (core dumped)". After that I have to restart fs.
yah oops, that was a minor mistake it's already fixed. On Wed, Oct 22, 2008 at 1:45 AM, Dennis <odermann@googlemail.com> wrote:
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
api break <uuid> will break one of them just not all. it has nothing to do with event lock event lock means do not parse events recursively like the behavior you described.
Ah, ok, now I understand what event lock means, thanks.
Since you asked so nicely, I added the "all" modifier to the command.
api break <uuid> all
Thanks again! The command itself works great and is a great help, but after sending the command, fs exits with the error "Segmentation fault (core dumped)". After that I have to restart fs.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
On Oct 21, 2008, at 12:11 PM, Dennis wrote:
2008/10/21 Brian West <brian@freeswitch.org>:
If you add "event-lock:true" to your message you send then it will do what you want. It will play the files in order as you expect.
Thanks, this works quite nice for playing a list of soundfiles. BUT, there is a big flaw when using "event-lock: true". There is no chance to stop playing the list, if I whish to. If a long list of files is playing and an event accours, which makes me want to stop playing all files, fs does not react on new commands, till all files where played back - even "break" won't do anything.
Is there a solution for this?
Hi Dennis, The solution is to play each file individually. You'll get a CHANNEL_EXECUTE_COMPLETE event with the application set to 'playback' once the first file ends; you then play the second and so on. Cheers -- Dave
participants (5)
-
Anthony Minessale
-
Brian West
-
David Knell
-
Dennis
-
Michael Collins