[Freeswitch-users] ODBC spidermonkey
mashudi
mashudiflexi at telkom.co.id
Thu Aug 28 21:41:59 EDT 2008
it is already
use("ODBC");
var DSN = "DB";
var DB_USER = "conce";
var DB_PASS = "password";
var line = "====================================\n";
var db = new ODBC(DSN, DB_USER, DB_PASS);
db.connect();
var sql;
var dtmf = new Object();
var replay = 1;
function mycb (session, type, data, arg) {
if (type == "dtmf") {
arg.digits += data.digit;
if (arg.digits.length >= 1) {
return false;
}
}
}
function get_route(digits)
{
sql = "select count(*) as count from conferences where pin = \""
+ digits +"\";";
var line = "====================================\n";
console_log("notice", "Menu Option Entered: " + digits +" \n sql
statment [" + sql + "]\n");
console_log("notice", line);
db.exec(sql);
while(db.nextRow()) {
var row = db.getData();
if (row["count"] >= 1) {
console_log("notice", "Found Conf Pin=[" +
digits + "]\n");
return digits;
} else {
and the odbc already running :
mashudi:/usr/local/freeswitch/scripts# isql -v DB
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
Jonas Gauffin wrote:
> First you have to add
>
> use("ODBC");
>
> in your javascript.
>
>
> On Thu, Aug 28, 2008 at 9:06 AM, mashudi <mashudiflexi at telkom.co.id> wrote:
>
>> Hi folks,
>> i try javascripts example for conference application and get this error,
>>
>> 2008-08-28 20:59:55 [ERR] mod_spidermonkey.c:3303 js_api_use() Error
>> loading ODBC
>> 2008-08-28 20:59:55 [ERR] conference.js:10 mod_spidermonkey()
>> ReferenceError: ODBC is not defined
>>
>> i have follow the instruction as documented on
>> http://wiki.freeswitch.org/wiki/Mod_spidermonkey_odbc.
>>
>> please help.
>>
>> *****************************************
>> Flexi-Gratis bicara sepanjang waktu se-Jawa Barat,
>> Banten dan DKI Jakarta.
>>
>> Speedy-Gratis Internetan unlimited dari Pkl. 20.00
>> s/d 8.00 se- Jabodetabek, Banten, Karawang dan
>> Purwakarta
>> *****************************************
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
> *****************************************
> Flexi-Gratis bicara sepanjang waktu se-Jawa Barat,
> Banten dan DKI Jakarta.
>
> Speedy-Gratis Internetan unlimited dari Pkl. 20.00
> s/d 8.00 se- Jabodetabek, Banten, Karawang dan
> Purwakarta
> *****************************************
>
>
*****************************************
Flexi-Gratis bicara sepanjang waktu se-Jawa Barat,
Banten dan DKI Jakarta.
Speedy-Gratis Internetan unlimited dari Pkl. 20.00
s/d 8.00 se- Jabodetabek, Banten, Karawang dan
Purwakarta
*****************************************
More information about the Freeswitch-users
mailing list