<div dir="ltr">Sorry for my late reply.I read it somewhere on some blog but could not track it now.<br>I will search it again and correct the mistakes.<br><br>Thanks a lot for you help and time.It works like charm. <br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 4 July 2014 19:23, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">SeeĀ <a href="http://wiki.freeswitch.org/wiki/DSN#DSN_only" target="_blank">http://wiki.freeswitch.org/wiki/DSN#DSN_only</a><div><br></div><div>Where did you get the example that showed a ODBC DSN could be just &quot;freeswitch&quot;? It would have worked on very old versions (pre-1.2), so if it came from some documentation / sample configs please point us to them so they can be updated.</div>


</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 4 July 2014 15:20, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Use odbc://freeswitch as the dsn, the syntax you&#39;re using is a sqlite filename.</div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On 4 July 2014 14:00, Aqs Younas <span dir="ltr">&lt;<a href="mailto:aqsyounas@gmail.com" target="_blank">aqsyounas@gmail.com</a>&gt;</span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><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>
<br></div></div>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>