<html dir="ltr"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaTempEditStyle"></style><style title="owaParaStyle"><!--P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
--></style>
</head>
<body ocsi="x">
<div style="FONT-FAMILY: Tahoma; DIRECTION: ltr; COLOR: #000000; FONT-SIZE: 13px">
<p><font size="2">Hi guys,</font></p>
<p><font size="2" face="tahoma"></font> </p>
<p><font size="2" face="tahoma">At the moment I'm doing some testing with mod_cidlookup. My intention is to match the incoming numbers against a local database. Right now im trying to set it up with SQLite.
</font></p>
<p><font size="2" face="tahoma">I've installed SQLite, unixODBC and created a DSN (freeswitch is also compiled with odbc support). When testing the connection to the SQLite database with the isql utility everything works:</font></p>
<p><font size="2" face="tahoma"></font> </p>
<p><font size="2" face="Courier New">+---------------------------------------+<br>
| Connected! |<br>
| |<br>
| sql-statement |<br>
| help [tablename] |<br>
| quit |<br>
| |<br>
+---------------------------------------+<br>
SQL></font><font face="Courier New"><font size="2"></p>
</font></font>
<p><font size="2"></font> </p>
<p><font size="2" face="tahoma"></font> </p>
<p><font size="2">Unfortunately when starting freeswitch I get this error in the console:</font></p>
<p><font size="2" face="tahoma"></font> </p>
<p><font size="2" face="Courier New">2011-02-20 19:28:44.203665 [ERR] switch_odbc.c:365 STATE: HY000 CODE 21 ERROR: [unixODBC][SQLite]connect failed</font></p>
<p><font size="2" face="Courier New">2011-02-20 19:28:44.203672 [CRIT] switch_core_sqldb.c:386 Failure!<br>
2011-02-20 19:28:44.203677 [CRIT] mod_cidlookup.c:137 Cannot Open ODBC Database!</font></p>
<p><font size="2"><font face="tahoma"></font></font> </p>
<p><font size="2" face="tahoma"></font> </p>
<p><font size="2"><font face="tahoma">Here's my config from /conf/autoload_configs/cidlookup.conf.xml:</font></font></p>
<p><font size="2"><font face="tahoma"></font></font> </p>
<p><font size="2" face="Courier New"><configuration name="cidlookup.conf" description="cidlookup Configuration"><br>
<settings><br>
<param name="cache" value="false"/><br>
<!-- expire is in seconds --><br>
<param name="cache-expire" value="86400"/><br>
<param name="odbc-dsn" value="mysqlitedb"/></font></p>
<p><font size="2"><font face="Courier New"> <!-- comment out sql to not setup a database (directory) lookup --><br>
<param name="sql" value="<br>
SELECT name||' ('||type||')' AS name<br>
FROM phonebook p JOIN numbers n ON p.id = n.phonebook_id<br>
WHERE n.number='${caller_id_number}'<br>
LIMIT 1<br>
"/><br>
</settings><br>
</configuration><br>
</font></p>
<p><br>
</p>
</font>
<div></div>
<div dir="ltr"><font color="#000000" size="2" face="Tahoma">I someone could point me into the right direction that would be great.</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">Kind regards,</font></div>
<div dir="ltr"><font size="2" face="tahoma"></font> </div>
<div dir="ltr"><font size="2" face="tahoma">Erik Dekkers (wvds-nl)</font></div>
</div>
</body>
</html>