Playback of multiple wavs in a round-robin scenario
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction. Thank you.
Is this part of an IVR? -MC On Mon, Jul 2, 2012 at 8:22 AM, BookBag <asaad2@gmail.com> wrote:
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction.
Thank you.
Do you need a strict round robin list, or is a: "pick a random one where everything has the same chance of being called" -- if so, http://wiki.freeswitch.org/wiki/Mod_distributor might work for you, setting everything to an equal weight. That page can probably be cleaned up to display it's usefulness... -Avi On Mon, Jul 2, 2012 at 6:31 PM, Michael Collins <msc@freeswitch.org> wrote:
Is this part of an IVR? -MC
On Mon, Jul 2, 2012 at 8:22 AM, BookBag <asaad2@gmail.com> wrote:
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction.
Thank you.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
thanks avi. I can see some really good ways I can use this On Mon, Jul 2, 2012 at 11:14 AM, Avi Marcus <avi@avimarcus.net> wrote:
Do you need a strict round robin list, or is a: "pick a random one where everything has the same chance of being called" -- if so, http://wiki.freeswitch.org/wiki/Mod_distributor might work for you, setting everything to an equal weight. That page can probably be cleaned up to display it's usefulness...
-Avi
On Mon, Jul 2, 2012 at 6:31 PM, Michael Collins <msc@freeswitch.org>wrote:
Is this part of an IVR? -MC
On Mon, Jul 2, 2012 at 8:22 AM, BookBag <asaad2@gmail.com> wrote:
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction.
Thank you.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
no its not part of an ivr On Mon, Jul 2, 2012 at 10:31 AM, Michael Collins <msc@freeswitch.org> wrote:
Is this part of an IVR? -MC
On Mon, Jul 2, 2012 at 8:22 AM, BookBag <asaad2@gmail.com> wrote:
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction.
Thank you.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
Join Us At ClueCon - Aug 7-9, 2012
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
you can pass the call control to a Lua or Javascript script, and then calculate the file number and execute the playback. The easiest is to take the current time in seconds, take a modulo by the total number of your WAV files, and then play the corresponding file. Should be a quite trivial exercise for anyone having basic programming skills :)
________________________________ From: BookBag <asaad2@gmail.com> To: freeswitch-users@lists.freeswitch.org Sent: Monday, July 2, 2012 5:22 PM Subject: [Freeswitch-users] Playback of multiple wavs in a round-robin scenario
Hello all, I have been searching day and night for a way on how to do this. I have a customer who would like like random ads stored as wav's to be played once an incoming call comes in. For example, this customer has 5 ads each one in its own wav file. If an incoming call comes in, one of those wav's gets played. When a second call comes in, another wav gets selected and gets played. Anybody can help point me in the right direction.
Thank you.
participants (4)
-
Avi Marcus
-
BookBag
-
Michael Collins
-
Stanislav Sinyagin