Hi, I can see that this question has been asked before, but my googling ability has let me down. Is it possible to play some music which does not block? I am trying to put together a javascript service that will play music whilst doing some other tasks. I have tried playfile & uuid_broadcast and both block. Is there another method that I am missing? Or perhaps I am missing something :) Any help would be appreciated. thanks
Have you tried displace_session ? On 15 September 2015 at 21:43, Matt Broad <matt@supportedbusiness.com> wrote:
Hi,
I can see that this question has been asked before, but my googling ability has let me down. Is it possible to play some music which does not block? I am trying to put together a javascript service that will play music whilst doing some other tasks. I have tried playfile & uuid_broadcast and both block. Is there another method that I am missing? Or perhaps I am missing something :) Any help would be appreciated.
thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Dušan Dragić
uuid_broadcast does not block. The problem is you are calling it from your js app which is occupying the session thread. To perform async operation you need to run your script outside the session thread by calling the script via the api interface via jsrun and pass the uuid then put the channel into park or use an esl script to control the session externally. On Wednesday, September 16, 2015, Dušan Dragić <dragic.dusan@gmail.com> wrote:
Have you tried displace_session ?
On 15 September 2015 at 21:43, Matt Broad <matt@supportedbusiness.com <javascript:;>> wrote:
Hi,
I can see that this question has been asked before, but my googling ability has let me down. Is it possible to play some music which does not block? I am trying to put together a javascript service that will play music whilst doing some other tasks. I have tried playfile & uuid_broadcast and both block. Is there another method that I am missing? Or perhaps I am missing something :) Any help would be appreciated.
thanks
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:;> 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@lists.freeswitch.org <javascript:;> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Dušan Dragić
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <javascript:;> 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@lists.freeswitch.org <javascript:;> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬ ☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>* ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900 https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
Hi Thanks for the reply Anthony, I did start off by using the uuid_broadcast directly within the js app. But this blocked the code. I then put together a test js script to just answer, sleep for 15 seconds and then hangup. I made a call to the service and once answered I ran uuid_broadcast from fs_cli but although this played the music the call did not end after 15 seconds and just continued until I hung up. I haven't come across jsrun before, this would be something worth looking into thanks Matt On 17 September 2015 at 06:36, Anthony Minessale < anthony.minessale@gmail.com> wrote:
uuid_broadcast does not block. The problem is you are calling it from your js app which is occupying the session thread.
To perform async operation you need to run your script outside the session thread by calling the script via the api interface via jsrun and pass the uuid then put the channel into park or use an esl script to control the session externally.
On Wednesday, September 16, 2015, Dušan Dragić <dragic.dusan@gmail.com> wrote:
Have you tried displace_session ?
On 15 September 2015 at 21:43, Matt Broad <matt@supportedbusiness.com> wrote:
Hi,
I can see that this question has been asked before, but my googling ability has let me down. Is it possible to play some music which does not block? I am trying to put together a javascript service that will play music whilst doing some other tasks. I have tried playfile & uuid_broadcast and both block. Is there another method that I am missing? Or perhaps I am missing something :) Any help would be appreciated.
thanks
_________________________________________________________________________
Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Dušan Dragić
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@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 ♬ @anthmfs ♬ @FreeSWITCH ♬
☞ http://freeswitch.org/ ☞ http://cluecon.com/ ☞ http://twitter.com/FreeSWITCH ☞ irc.freenode.net #freeswitch ☞ *http://freeswitch.org/g+ <http://freeswitch.org/g+>*
ClueCon Weekly Development Call ☎ sip:888@conference.freeswitch.org ☎ +19193869900
https://www.youtube.com/watch?v=9XXgW34t40s https://www.youtube.com/watch?v=NLaDpGQuZDA
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
Dušan Dragić
-
Matt Broad