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
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hello David, thank you for the explanation. In the meantime I got help on the irc channel so I was able to find out the right way :) (unfortunately I didn't get back my mail on mailing list so I wasn't able to reply to say how it was solved). As a quick step, I added this question to the FAQ (http://www.voip-info.org/wiki/view/FreeSwitch+FAQ), feel free to refine. Thanks for your help. Kind regards, Tamas David Elbel wrote:
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 <http://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@gmail.com <mailto:jalsot@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
Also, http://www.voip-info.org/wiki/view/FreeSwitch+Javascript was just added to the wiki as extensive documentation at most or all of the objects, methods, and properties available to you in javascript. A big thanks to trixter for putting this out there. Mike
-----Original Message----- From: Tamas [mailto:jalsot@gmail.com] Sent: Monday, August 21, 2006 4:50 AM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] How to start with js
Hello David,
thank you for the explanation. In the meantime I got help on the irc channel so I was able to find out the right way :) (unfortunately I didn't get back my mail on mailing list so I wasn't able to reply to say how it was solved).
As a quick step, I added this question to the FAQ (http://www.voip-info.org/wiki/view/FreeSwitch+FAQ), feel free to refine.
Thanks for your help.
Kind regards, Tamas
participants (3)
-
David Elbel
-
Michael Jerris
-
Tamas