<p><br>
Hi All</p>
<p> I have a problem with connecting to a database from LUA using ODBC. I have noticed that when my freeswitch starts it doesn&#39;t load the spider monkey module. I did the following:</p>
<p>Installed Freeswitch using debian repository from &quot;deb <a href="http://files.freeswitch.org/repo/deb/debian/">http://files.freeswitch.org/repo/deb/debian/</a> squeeze main&quot;. I installed the package freeswitch-meta-vanilla and freeswitch-spidermonkey<br>

I copied the vanilla configuration from /usr/share/freeswitch/conf/vanilla/* to /etc/freeswitch folder<br>
I configured MySQL DB ODBC as described in <a href="http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core">http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core</a> and tested it through isql command and it connected fine<br>

I started my freeswitch as root using the command /usr/bin/freeswitch and I got the below error<br>
2013-05-07 22:19:33.922678 [CRIT] switch_loadable_module.c:1330 Error Loading module /usr/lib/freeswitch/mod/mod_spidermonkey.so<br>
**/usr/lib/freeswitch/mod/mod_spidermonkey.so: cannot open shared object file: No such file or directory**</p>
<p>I didn&#39;t see the file mod_spidermonkey.so in my /usr/lib/freeswitch folder but in /opt/freeswitch/mod folder. So I added a symbolic link from /opt/freeswitch/mod to /usr/lib/freeswitch/mod for below files:<br>
      mod_spidermonkey_core_db.so<br>
      mod_spidermonkey_odbc.so  <br>
      mod_spidermonkey_socket.so<br>
      mod_spidermonkey_curl.so<br>
      mod_spidermonkey.so<br>
      mod_spidermonkey_teletone.so</p>
<p>Then I started freeswitch again and received the error below:<br>
2013-05-07 22:30:25.813120 [CRIT] switch_loadable_module.c:1330 Error Loading module /usr/lib/freeswitch/mod/mod_spidermonkey.so<br>
**/usr/lib/freeswitch/mod/mod_spidermonkey.so: undefined symbol: switch_core_session_locate**<br></p>
<p>Also when I try to execute a LUA script with the code freeswitch.Dbh(&quot;odbc://freeswitch&quot;) in a LUA file then I got the error </p>
<p>2013-05-07 23:05:46.915209 [ERR] switch_odbc.c:365 STATE: IM002 CODE 0 ERROR: [unixODBC][Driver Manager]Data source name not found, and no default driver specified<br>
2013-05-07 23:05:46.915209 [CRIT] switch_core_sqldb.c:504 Failure to connect to PGSQL odbc://freeswitch!<br></p>
<p>Any ideas what I am doing wrong? FYI - I am running on UBuntu</p>
<p>Help will be appreciated.</p>
<p>Regards<br>
Asif</p>