[Freeswitch-users] How to start with js

David Elbel david.elbel at gmail.com
Thu Aug 17 03:28:46 PDT 2006


Hello Tamas,

Getting starting with spidermonkey is as simple as following this example in
this email.

In your configuration file of freeswitch.xml, simply configure a dial plan
extension that will executes the "Javascript" dial plan application.

For example * , inserting this segment into your dial plan section will
yield extension 1480 to 'default.js' :

      <extension name="1480">
         <condition field="destination_number" expression="^1480$">
           <action application="javascript" data="default.js" />
         </condition>
      </extension>

To explore, change "default.js" to another .js file and make sure that your
js file is located in /usr/local/freeswitch/scripts .
[ I am not sure what directory this is under win32, can somebody clarify
this?]

You should be able to download the example JS scripts from the URL you
provided and follow the same directions.

Beyond that is basically up to your feedback.   How would you best see the
framework solving problems for your environment?

Try reviewing the "mod_spidermonkey.c" source code, and if you have any
questions feel free to post them here.

Best regards,
D
www.hypercubesolutions.com

* Make sure that when you build Freeswitch that your "modules.conf" includes
the un-commented line of mod_spidermonkey (Which is _not_ on by default)









On 8/16/06, Tamas <jalsot at gmail.com> wrote:
>
> Hi,
>
> I'm experimenting with freeswitch and want to build simple IVR in js,
> however I don't know how to set up freeswitch for it.
> I have mod_spidermonkey compiled already.
>
> Could anybody tell me what to do next?
> [I know, there are some examples scripts at
> http://www.freeswitch.org/eg/js/]
>
> Thanks in advance,
>     Tamas
>
> _______________________________________________
> 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/20060817/6b6ab731/attachment-0003.html 


More information about the FreeSWITCH-users mailing list