Hi, I have lua script. the script is similar to the one in http://wiki.freeswitch.org/wiki/Mod_curl (lua usage) The script access a web service and get some data. The script work fine for my needs. However, sometimes when the script access the web service take several seconds to get the data, and the caller ear silence. Is it possible to play a sound file as long the script try to get the data from the web service? -- Atentamente, *Dario García* Consultor. CCCT, Nivel C2, Sector Yarey, Mz, Ofc. MZ03a. Caracas-Venezuela. Teléfono: +58 212 9081842 Cel: +58 412 2221515 dgarcia@anew.com.ve http://www.anew.com.ve
Hello, Can I ask why your web service is taking several seconds to respond? Could you not speed this up? As far as I'm aware, telling mod_curl to play music when a request is being executed is really not the right way to look at it. If you need to retrieve data from an external service that will take several seconds, you would place the call into hold or into a parking queue, execute the request, then come back.. however you'd do this within the mod_curl response, rather than it happening on a mod_curl call itself. For example, you could get the mod_curl to response immediately, then use a mixture of httpapi/includes/parking to achieve your goal.. Perhaps someone else might be able to offer a cleaner solution, but that's the best I can think of at the moment. Hope this helps! Cal On Fri, May 10, 2013 at 7:49 PM, Saugort Dario Garcia Tovar < dgarcia@anew.com.ve> wrote:
Hi,
I have lua script. the script is similar to the one in http://wiki.freeswitch.org/wiki/Mod_curl (lua usage)
The script access a web service and get some data. The script work fine for my needs. However, sometimes when the script access the web service take several seconds to get the data, and the caller ear silence. Is it possible to play a sound file as long the script try to get the data from the web service?
-- Atentamente, *Dario García* Consultor.
CCCT, Nivel C2, Sector Yarey, Mz, Ofc. MZ03a. Caracas-Venezuela. Teléfono: +58 212 9081842 Cel: +58 412 2221515 dgarcia@anew.com.ve http://www.anew.com.ve
_________________________________________________________________________ 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
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 Cal for your answer, Well, The web service is not in my control. The slowly response could be due to web server issues, network, internet conection, webservice itself, etc. In my country, quck and stable internet access is not granted as is in other countries. I suspect is due to network and internet conections. Before open this thread, I got some ideas in how to do it. I just wanted to know how other fs user do it. I tried to put the call in hold: 1. Tring to transfer the call to music_hod (9664) ... but I got stuck, how I retrieve/recover/unhold the call? 2. I tried using other fs way like uuid_hold, the call seems to be somewhere, no music is played, and then I got stuck, how I retrieve/recover/unhold the call? How uuid_hold should be used? I will try httpapi. Any suggestion, will be welcome On 5/10/2013 2:43 PM, Cal Leeming [Simplicity Media Ltd] wrote:
Hello,
Can I ask why your web service is taking several seconds to respond? Could you not speed this up?
As far as I'm aware, telling mod_curl to play music when a request is being executed is really not the right way to look at it. If you need to retrieve data from an external service that will take several seconds, you would place the call into hold or into a parking queue, execute the request, then come back.. however you'd do this within the mod_curl response, rather than it happening on a mod_curl call itself. For example, you could get the mod_curl to response immediately, then use a mixture of httpapi/includes/parking to achieve your goal..
Perhaps someone else might be able to offer a cleaner solution, but that's the best I can think of at the moment.
Hope this helps!
Cal
On Fri, May 10, 2013 at 7:49 PM, Saugort Dario Garcia Tovar <dgarcia@anew.com.ve <mailto:dgarcia@anew.com.ve>> wrote:
Hi,
I have lua script. the script is similar to the one in http://wiki.freeswitch.org/wiki/Mod_curl (lua usage)
The script access a web service and get some data. The script work fine for my needs. However, sometimes when the script access the web service take several seconds to get the data, and the caller ear silence. Is it possible to play a sound file as long the script try to get the data from the web service?
-- Atentamente, *Dario García* Consultor.
CCCT, Nivel C2, Sector Yarey, Mz, Ofc. MZ03a. Caracas-Venezuela. Teléfono: +58 212 9081842 <tel:%2B58%20212%209081842> Cel: +58 412 2221515 <tel:%2B58%20412%202221515> dgarcia@anew.com.ve <mailto:dgarcia@anew.com.ve> http://www.anew.com.ve
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto: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
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto: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
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 virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2012.0.2241 / Virus Database: 3162/5814 - Release Date: 05/10/13
-- Atentamente, *Dario García* Consultor. CCCT, Nivel C2, Sector Yarey, Mz, Ofc. MZ03a. Caracas-Venezuela. Teléfono: +58 212 9081842 Cel: +58 412 2221515 dgarcia@anew.com.ve http://www.anew.com.ve
participants (2)
-
Cal Leeming [Simplicity Media Ltd]
-
Saugort Dario Garcia Tovar