<div dir="ltr">Hi
<br>I am getting the following error after call is hangup on the command
line.

<br><br><br>~~ <br>2014-07-04 08:36:50.428532 [DEBUG] mod_nibblebill.c:488 Attempting to bill at $0.03 per minute to account 1010<br>2014-07-04 08:36:50.428532 [INFO] mod_nibblebill.c:540 Beginning new billing on d71d9966-0377-11e4-a114-2972d0b41bbc<br>
2014-07-04 08:36:50.428532 [DEBUG] mod_nibblebill.c:546 13 seconds passed since last bill time of 2014-07-04 08:36:37<br>2014-07-04 08:36:50.428532 [DEBUG] mod_nibblebill.c:563 Billing $0.006550 to 1010 (Call: d71d9966-0377-11e4-a114-2972d0b41bbc / 0.000000 so far)<br>
2014-07-04 08:36:50.428532 [DEBUG] mod_nibblebill.c:393 Doing update query<br>[UPDATE accounts SET cash=cash-0.006550 WHERE name=&#39;1010&#39;]<br>2014-07-04 08:36:50.428532 [ERR] switch_core_sqldb.c:586 NATIVE SQL ERR [no such table: accounts]<br>
UPDATE accounts SET cash=cash-0.006550 WHERE name=&#39;1010&#39;<br>2014-07-04 08:36:50.428532 [CRIT] mod_nibblebill.c:577 Failed to log to database!<br>2014-07-04 08:36:50.428532 [DEBUG] mod_nibblebill.c:420 Doing lookup query<br>
[SELECT cash AS nibble_balance FROM accounts WHERE name=&#39;1010&#39;]<br>2014-07-04 08:36:50.428532 [ERR] switch_core_sqldb.c:1196 SQL ERR: [SELECT cash AS nibble_balance FROM accounts WHERE name=&#39;1010&#39;] no such table: accounts<br>
2014-07-04 08:36:50.428532 [ERR] mod_nibblebill.c:422 Error running this query: [SELECT cash AS nibble_balance FROM accounts WHERE name=&#39;1010&#39;]<br><br><pre>~~

I followed steps give on
<a href="http://wiki.freeswitch.org/wiki/Using_ODBC_in_the_core" target="_blank">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&gt;

My conf/autoload_configs/nibblebill.conf.xml has the lines

&lt;settings&gt;
   param name=&quot;odbc-dsn&quot; value=&quot;freeswitch&quot;/&gt;<br>   &lt;param name=&quot;db_table&quot; value=&quot;accounts&quot;/&gt;<br>   &lt;param name=&quot;db_column_cash&quot; value=&quot;cash&quot;/&gt;<br>
   &lt;param name=&quot;db_column_account&quot; value=&quot;name&quot;/&gt;<br>&lt;/settings&gt;<br><br></pre><pre>Mysql database structure.<br><br>mysql&gt; use tcapi;<br>Database changed<br>mysql&gt; desc accounts;<br>+-------+--------------+------+-----+---------+-------+<br>
| Field | Type         | Null | Key | Default | Extra |<br>+-------+--------------+------+-----+---------+-------+<br>| id    | int(11)      | NO   | PRI | NULL    |       |<br>| name  | varchar(255) | YES  |     | NULL    |       |<br>
| cash  | double       | NO   |     | NULL    |       |<br>+-------+--------------+------+-----+---------+-------+<br>3 rows in set (0.01 sec)<br><br>mysql&gt; select * from accounts;<br>+------+------+------------+<br>| id   | name | cash       |<br>
+------+------+------------+<br>|    0 | 1000 |       7777 |<br>| 1010 | 1010 | 8887.98792 |<br>+------+------+------------+<br>2 rows in set (0.00 sec)<br><br></pre><pre>Though the table exit.But freeswitch is unable to find it. <br>
Any help in this regard would be much appreciated.<br><br></pre><pre>Thanks<br></pre></div>