<div dir="ltr"><pre>Hi
I am getting the following error when giving load mod_lcr on the command
line.
~~
2014-07-04 06:55:57.829089 [INFO] mod_enum.c:880 ENUM Reloaded<br>2014-07-04 06:55:57.829089 [INFO] mod_nibblebill.c:222 odbc_dsn is mysql://hostaddr=127.0.0.1 dbname=tcapi user=root password=hammer<br>2014-07-04 06:55:57.829089 [DEBUG] mod_nibblebill.c:282 dsn is "mysql://hostaddr=127.0.0.1 dbname=tcapi user=root password=hammer"<br>
2014-07-04 06:55:57.829089 [INFO] switch_time.c:1369 Timezone reloaded 530 definitions<br>2014-07-04 06:55:57.829089 [ERR] switch_odbc.c:365 STATE: IM002 CODE 0 ERROR: [unixODBC][Driver Manager]Data source name not found, and no default driver specified<br>
<br>2014-07-04 06:55:57.829089 [CRIT] switch_core_sqldb.c:507 Failure to connect to ODBC mysql!<br>2014-07-04 06:55:57.829089 [CRIT] mod_nibblebill.c:287 Cannot Open ODBC Database!<br>2014-07-04 06:55:57.829089 [CONSOLE] switch_loadable_module.c:1466 Successfully Loaded [mod_nibblebill]<br>
2014-07-04 06:55:57.829089 [NOTICE] switch_loadable_module.c:269 Adding Application 'nibblebill'<br>2014-07-04 06:55:57.829089 [NOTICE] switch_loadable_module.c:315 Adding API Function 'nibblebill'<br>~~
I followed steps give on
<a href="http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core">http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core</a>
I am on Ubuntu 14.04 LTS and I installed unixodbc, unixodbc-dev, libmyodbc
packages by using apt-get. Then I did ./configure
--enable-core-odbc-support , make, make install on freeswitch and the
config.log shows that unixodbc got recognized and compiled.
I configured the ini files and my odbc works with MySQL
# cat /etc/odbc.ini
[freeswitch]<br>Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so<br>SERVER = localhost<br>PORT = 3306<br>DATABASE = tcapi<br>OPTION = 67108864<br>USER = root<br>PASSWORD = password
# cat /etc/odbcinst.ini
[MySQL]<br>Description = MySQL driver<br>Driver = /usr/lib/i386-linux-gnu/odbc/libmyodbc.so<br>Setup = /usr/lib/i386-linux-gnu/odbc/libodbcmyS.so<br>UsageCount = 1<br>FileUsage = 1<br>Threading = 0<br>
<br>
# isql -v freeswitch
+---------------------------------------+
|<i> Connected! |
</i>|<i> |
</i>|<i> sql-statement |
</i>|<i> help [tablename] |
</i>|<i> quit |
</i>|<i> |
</i>+---------------------------------------+
SQL>
My conf/autoload_configs/switch.conf.xml has the line
<param name="core-db-dsn" value="mysql://hostaddr=127.0.0.1 dbname=tcapi user=root password='password' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /><br>
<param name="core-db-dsn" value="dsn:tcapi:password" />
<br>My conf/autoload_configs/nibblebill.conf.xml has the lines
<settings>
param name="odbc-dsn" value="mysql://hostaddr=127.0.0.1 dbname=tcapi user=root password=hammer"/><br><br> <!-- The database table where your CASH column is located --><br> <param name="db_table" value="accounts"/><br>
<br> <!-- The column name where we store the value of the account --><br> <param name="db_column_cash" value="cash"/><br><br> <!-- The column name for the unique ID identifying the account --><br>
<param name="db_column_account" value="name"/><br>
</settings><br><br><br></pre><pre>Can anybody please tell me where i am doing something wrong.<br><br></pre><pre>Thanks <br></pre></div>