[Freeswitch-users] Playback of multiple wavs in a round-robin scenario
Stanislav Sinyagin
ssinyagin at yahoo.com
Mon Jul 2 23:05:10 MSD 2012
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 at gmail.com>
>To: freeswitch-users at 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120702/117f0162/attachment.html
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list