Hi,<br><br>I configured freeswitch to execute this script whenever a call is made from one number to another.<br><br>function init() {<br>&nbsp;use(&quot;ODBC&quot;);<br>&nbsp;var db = new ODBC(&quot;test&quot;, &quot;testuser&quot;, &quot;testpwd&quot;);
<br>&nbsp;var path = &quot;test.mp3&quot;;<br>&nbsp;if(db.connect()) {<br>&nbsp; var tn =&nbsp; session.getVariable(&quot;destination_number&quot;);<br>&nbsp; var sql = &quot;select path from sounds where tn = &quot; +tn;<br>&nbsp; db.exec(sql);<br>&nbsp;&nbsp;&nbsp; if(
db.nextRow()) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data = db.getData();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; console_log(&quot;**********Playing back &quot; + data[&quot;path&quot;] + &quot;**********&quot;);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; path = data[&quot;path&quot;];<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;}<br>&nbsp;else {
<br>&nbsp; console_log(&quot;Connection to database failed!&quot;);<br>&nbsp;}<br>&nbsp;db = null;<br>&nbsp;bridgeCall(path);<br>}<br>init();<br><br>This script executes fine when the call is initiated for the first time. For subsequent calls, the script may execute or freeswitch might crash with a segmentation fault. It usually crashes when the second call is made but it is not always the same.
<br><br>The last three lines output in the console before crashing is - <br><br>2008-01-22 07:22:45 [DEBUG] mod_spidermonkey.c:3202 js_api_use() Loading ODBC<br>2008-01-22 07:22:45 [DEBUG] switch_odbc.c:145 switch_odbc_handle_connect() Connecting test
<br>Segmentation fault (core dumped)<br>________________________________<br><br>OS: RHEL 4.<br>Freeswitch Version: Latest svn checkout (22nd jan 2008 11 AM)<br><br>Kindly help me in resolving this issue.<br><br>Thanks in Advance,
<br><br>B Karthik<br><br>