[Freeswitch-users] Using CURL inside a JavaScript.

Timothy Bolton ifoundthetao at gmail.com
Thu Jun 7 06:31:52 MSD 2012


Do you have any code that you want to post (http://pastebin.freeswitch.org)?

Also, you may want to look into timers/intervals (setTimer 
setInterval).  I use those to keep tabs on responses from requests.  
Otherwise, the JavaScript will continue to execute without getting the 
response, which can be very frustrating.

'We who cut mere stones must always be envisioning cathedrals.'
Quarry Worker's Creed


On 6/6/2012 7:16 PM, Venkatesh wrote:
> Hi !
>
> I am developing a simple IVR application using JS. One of the things I 
> want to do when my JS fires is to issue a WS API to fetch some data 
> relevant to the call; wait for the response and use information in the 
> response to process the incoming call. To meet that end, I wrote up a 
> simple JS that issues a CURL request providing appropriate call back 
> function. However, I dont see any callback being fired back to my 
> application. The JS simply proceeds to execute the next instruction. I 
> know my WS returns a string (verified by running the exact same 
> command via a command line). I wanted to know if there is anything I 
> need to do to make the application "wait for the call back".  Would 
> appreciate any help.
>
> Regards,
> Venkatesh
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.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 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/20120606/78541de3/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list