[Freeswitch-users] Using CURL inside a JavaScript.

Venkatesh vvenkatar at gmail.com
Thu Jun 7 07:36:23 MSD 2012


Hi !

I have uploaded the relevant JS code to pastebin:
http://pastebin.freeswitch.org/19238

Would really appreciate any help!

Venkatesh

On Wed, Jun 6, 2012 at 7:31 PM, Timothy Bolton <ifoundthetao at gmail.com>wrote:

>  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.orghttp://www.freeswitchsolutions.com
>
> FreeSWITCH-powered IP PBX: The CudaTel Communication Server
>
> Official FreeSWITCH Siteshttp://www.freeswitch.orghttp://wiki.freeswitch.orghttp://www.cluecon.com
>
> Join Us At ClueCon - Aug 7-9, 2012
>
> FreeSWITCH-users mailing listFreeSWITCH-users at lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.freeswitch.org
>
>
> _________________________________________________________________________
> 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/ed90ae11/attachment.html 


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