[Freeswitch-users] playback timeout when using multiple files
Nishad Musthafa
nishadmusthafa at gmail.com
Mon Mar 28 19:03:22 MSD 2016
Hi Michael,
Thanks for pointing me to the channel variable. I tried that out. The
variable works for the first in the set of delimiter separated urls. I even
tried setting the channel variable twice to see if it would make the
timeout happen on the first two urls. But that didn't happen. The timeout
still occurred only on the first of the urls in the list.
Mario,
Thank you for your response. I was able to set a timeout for each url.
However I wanted to see if I could do something like this
ringback = {timeout="..moh1_timeout.."}
("file_string://"..em1.."!local_stream://mohmv!file_string://"..em2.."!local_strea
m://mohmv”)
That is, a timeout for the entire set of strings. Not really sure if that's
possible or not and what the syntax is if it is possible.
Nishad
On Fri, Mar 25, 2016 at 10:47 PM Mario G <mario_fs at mgtech.com> wrote:
> This may help… I am sure it does what you want depending on where you put
> timeout. Look at my comments and my LUA code below.
>
> The link is the doc I write up for timeout. When it was introduced I
> thought the timeout was for each file.
>
> https://freeswitch.org/confluence/display/FREESWITCH/mod_local_stream#mod_local_stream-ExecutionParameters
>
> Also, here is an email I sent that comment implies each can have timeout.
> I also looked at my LUA program and my old comments also imply that but
> only use 1 timeout at this point.
>
> Here is how I construct a LUA variable to play multiple files in a
> ringback, syntax would be the same for your application. This is a complex
> one since it not only plays different files but sets a time limit for each:
>
> ringback =
> "file_string://"..em1.."!{timeout="..moh1_timeout.."}local_stream://mohmv!file_string://"..em2.."!local_strea
> m://mohmv”
>
>
> On Mar 25, 2016, at 9:48 AM, Michael Collins <msc at freeswitch.org> wrote:
>
> Maybe you could do some tests and report back to the list. In
> switch_ivr_play_say.c there's a function called switch_ivr_play_file which
> is called by the playback dialplan app. In there it references a channel
> variable named playback_timeout_sec. Try setting that value prior to your
> playback app and see what happens.
>
> Be sure to let us know how it goes. :)
>
> -MSC
>
> On Thu, Mar 24, 2016 at 8:28 AM, Nishad Musthafa <nishadmusthafa at gmail.com
> > wrote:
>
>> Hi,
>>
>> From the wiki and through experimenting with FS, I know it's possible to
>> playback multiple files using the playback_delimiter channel variable and
>> then something like
>>
>> <!-- Delimiter is set by a var which also enables the parser -->
>> <action application="set" data="playback_delimiter=!"/>
>> <action application="set" data="playback_sleep_val=500"/>
>> <action application="playback" data="/ram/sr8k.wav!/ram/swimp.wav"/>
>>
>> It is also possible to set a timeout for a single file using
>>
>> <action application="playback" data="{timeout=15000}file_string://${sound_dir}/music/8000/music1.wav"/>
>>
>> Is it possible to merge the above two? I am looking at setting a single
>> timeout for multiple files. Is this possible?
>>
>> Nishad
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at 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 at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160328/2c6b4467/attachment-0001.html
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list