Executing a JavaScript application during startup
Is there a way to cause a JavaScript script to be executed during FreeSWITCH initialization? Actually, what I want to do is to add a table to the SQLite DB and populate it with some data that I will use later in a JavaScript application. I could do this some other ways, but the ability to initialize some system wide data during startup using JavaScript would be useful. I do know some techniques that I could use which I don't really want to use: * The JavaScript application that I am using could try to determine if this is the first time, and do any initialization. Sounds reasonable, but could encounter a race condition with a 2nd call. * I do plan to have an Erlang program running which uses mod_erlang_event. I could use it, but there is a possibility that a call could come in before the Erlang program starts or some other race condition. I could write a special module to do this, but wonder if there is a way to do this. Regards, David Swardstrom (profile)http://wiki.freeswitch.org/wiki/User:Dswardstrom
I know that with perl and lua is possible to specy a script to execute in the freeswitch startup. But with javascript I dont know if there is this option also. To do with lua. Open the lua.conf in the autoload configs of freeswitch and there is this option there. Leo Is there a way to cause a JavaScript script to be executed
during FreeSWITCH initialization?
participants (2)
-
David Swardstrom
-
leonardo alves