Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] playback: Easy ways to handle different s


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
odermann at googlemail...
Guest





PostPosted: Tue Oct 21, 2008 4:40 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

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

_______________________________________________
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
Back to top
brian at freeswitch.org
Guest





PostPosted: Tue Oct 21, 2008 5:25 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

On Oct 21, 2008, at 3:29 AM, Dennis wrote:

Quote:
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


_______________________________________________
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
Back to top
odermann at googlemail...
Guest





PostPosted: Tue Oct 21, 2008 6:25 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

2008/10/21 Brian West <brian@freeswitch.org>:

Quote:
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
Back to top
dave at 3c.co.uk
Guest





PostPosted: Tue Oct 21, 2008 8:28 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

On Oct 21, 2008, at 12:11 PM, Dennis wrote:

Quote:
2008/10/21 Brian West <brian@freeswitch.org>:

Quote:
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


_______________________________________________
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
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Oct 21, 2008 8:52 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

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 (odermann@googlemail.com)> wrote:
Quote:
2008/10/21 Brian West <brian@freeswitch.org (brian@freeswitch.org)>:

Quote:
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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
odermann at googlemail...
Guest





PostPosted: Tue Oct 21, 2008 10:01 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

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>:
Quote:
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:
Quote:

2008/10/21 Brian West <brian@freeswitch.org>:

Quote:
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
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Oct 21, 2008 12:53 pm    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

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 (odermann@googlemail.com)> wrote:
Quote:
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 (anthony.minessale@gmail.com)>:
Quote:
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 (odermann@googlemail.com)> wrote:
Quote:

2008/10/21 Brian West <brian@freeswitch.org (brian@freeswitch.org)>:

Quote:
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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
msc at freeswitch.org
Guest





PostPosted: Tue Oct 21, 2008 2:15 pm    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

On Tue, Oct 21, 2008 at 10:43 AM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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!
Back to top
odermann at googlemail...
Guest





PostPosted: Wed Oct 22, 2008 1:52 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

2008/10/21 Anthony Minessale <anthony.minessale@gmail.com>:
Quote:
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.


Quote:
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
Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Oct 22, 2008 8:31 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

yah oops, that was a minor mistake it's already fixed.


On Wed, Oct 22, 2008 at 1:45 AM, Dennis <odermann@googlemail.com (odermann@googlemail.com)> wrote:
Quote:
2008/10/21 Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)>:

Quote:
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.


Quote:
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 (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 ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
odermann at googlemail...
Guest





PostPosted: Wed Oct 22, 2008 10:42 am    Post subject: [Freeswitch-users] playback: Easy ways to handle different s Reply with quote

Great, now it works perfectly. Thanks a lot!

(Could you have a look at my thread "Socket inbound or outbound with
PHP?" please? I am in some trouble...)


2008/10/22 Anthony Minessale <anthony.minessale@gmail.com>:
Quote:
yah oops, that was a minor mistake it's already fixed.

_______________________________________________
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services