[Freeswitch-users] Executing a JavaScript application during startup

David Swardstrom dswardstrom at remotelink.com
Mon Aug 2 09:54:07 PDT 2010


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



More information about the FreeSWITCH-users mailing list