[Freeswitch-dev] Dynamically serve javascript.

Mathieu Rene mrene_lists at avgs.ca
Tue Jun 15 18:34:19 PDT 2010


If you start the data by ~, it'll be interpreted inline, therefore you can serve a dynamic dialplan like <action application="javascript"><![CDATA[~ 
js here
]]></action>

Mathieu Rene
Avant-Garde Solutions Inc
Office: + 1 (514) 664-1044 x100
Cell: +1 (514) 664-1044 x200
mrene at avgs.ca




On 2010-06-10, at 4:44 PM, Johny Kadarisman Kwan wrote:

> Cool, will submit a patch once done. 
> 
> I have a second thought, in that way, we could have this curl function outside of javascript, ie:
> 
> curl http://ip/scripts /temp/scripts
> jsrun /temp/scripts
> 
> this way, it can be use for different type of scripts, ie "lua", etc. So, curl have to be a separate module. 
> 
> Do you see any drawback with above method?
> 
> 
> On Thu, Jun 10, 2010 at 4:30 PM, Michael Jerris <mike at jerris.com> wrote:
> I would do exactly that.  You could do something into memory, but I think its just asking for problems.  Sounds great and I look forward to seeing your patch.  You can submit patches via http://jira.freeswitch.org.  If you assign it to me I will try to look at it quickly.
> 
> 
> Mike
> 
> On Jun 10, 2010, at 4:08 PM, Johny Kadarisman Kwan wrote:
> 
>> Mike, 
>> 
>> Thanks for the pointer. So,the flow will be curl into temp file and use existing jsrun to run the temp script.
>> I'm looking at js_fetchurl_file, look like i can copy some of the functionality from there.
>> 
>> Johny K.
>> 
>> 
>> On Thu, Jun 10, 2010 at 11:58 AM, Michael Jerris <mike at jerris.com> wrote:
>> This could be accomplished fine with a little added code in mod_spidermonkey.  We already have libcurl in that module, but you would need to add the code to get the file from http
>> 
>> Mike
>> 
>> On Jun 9, 2010, at 4:05 PM, Johny Kadarisman Kwan wrote:
>> 
>>> I want to dynamically serve javascript to freeswitch. ie. "jsrun http://ip/mydynamicscript"
>>> Is there any way to accomplish above function? or any pro and cons on above intention.
>> 
> 
> 
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
> 
> 
> _______________________________________________
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100615/0622e59a/attachment.html 


More information about the FreeSWITCH-dev mailing list