<p dir="ltr">As far as I remember do next</p>
<p dir="ltr">1. Same odbc.ini on both servers<br>
2. Be sure mysql user has permitions</p>
<p dir="ltr">LD</p>
<div class="gmail_quote">On Feb 23, 2015 11:55 AM, "Chris Martineau" <<a href="mailto:chris@ghosttelecom.com">chris@ghosttelecom.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,<br>
</p>
<p>Thanks for responding.<br>
</p>
<p><br>
</p>
<p>Tried that. I assume you are looking for traffic arriving at the db server?<br>
</p>
<p>Either way, this filter shows nothing at the source end and and nothing at the destination either when completing a call.<br>
</p>
<p>I have added some log entries to track what was happening.<br>
</p>
<p><br>
</p>
<p>Here are the errors with the dsn set up as normal...<br>
</p>
<p>Loading...<br>
</p>
<div>2015-02-23 16:32:21.693244 [CONSOLE] switch_loadable_module.c:1935 Stopping: mod_nibblebill</div>
<div>2015-02-23 16:32:21.693244 [CONSOLE] switch_loadable_module.c:1955 mod_nibblebill unloaded.</div>
<div>2015-02-23 16:32:21.693244 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch:opensips:opensipsrw] Global: [freeswitch:opensips:opensipsrw]</div>
<div>2015-02-23 16:32:21.693244 [CRIT] switch_core_sqldb.c:482 Failure! ODBC NOT AVAILABLE! Can't connect to DSN freeswitch</div>
<div>2015-02-23 16:32:21.693244 [CRIT] mod_nibblebill.c:294 Cannot Open ODBC Database!</div>
<div>2015-02-23 16:32:21.693244 [CONSOLE] switch_loadable_module.c:1465 Successfully Loaded [mod_nibblebill]</div>
<div>Call end...<br>
</div>
<div>
<div>2015-02-23 16:45:38.933258 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch:opensips:opensipsrw] Global: [freeswitch:opensips:opensipsrw]</div>
<div>2015-02-23 16:45:38.933258 [CRIT] switch_core_sqldb.c:482 Failure! ODBC NOT AVAILABLE! Can't connect to DSN freeswitch</div>
<div>2015-02-23 16:45:38.933258 [ERR] mod_nibblebill.c:202 Unable to retrieve handle2: [freeswitch:opensips:opensipsrw]</div>
<div>2015-02-23 16:45:38.933258 [CRIT] mod_nibblebill.c:584 Failed to log to database!</div>
<div>2015-02-23 16:45:38.933258 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch:opensips:opensipsrw] Global: [freeswitch:opensips:opensipsrw]</div>
<div>2015-02-23 16:45:38.933258 [CRIT] switch_core_sqldb.c:482 Failure! ODBC NOT AVAILABLE! Can't connect to DSN freeswitch</div>
<div>2015-02-23 16:45:38.933258 [ERR] mod_nibblebill.c:183 Unable to retrieve handle1: [freeswitch:opensips:opensipsrw]</div>
<div>2015-02-23 16:45:38.933258 [ERR] mod_nibblebill.c:429 Error running this query: [SELECT balance AS nibble_balance FROM accounts WHERE billingid='1204' and plan='0']</div>
<div><br>
<br>
</div>
<br>
</div>
<div>And just with the dsn name...<br>
</div>
<div>Loading...<br>
</div>
<div>
<div>2015-02-23 16:33:37.473239 [CONSOLE] switch_loadable_module.c:1935 Stopping: mod_nibblebill</div>
<div>2015-02-23 16:33:37.473239 [CONSOLE] switch_loadable_module.c:1955 mod_nibblebill unloaded.</div>
<div>2015-02-23 16:33:37.473239 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch] Global: [freeswitch]</div>
<div>2015-02-23 16:33:37.473239 [CONSOLE] switch_loadable_module.c:1465 Successfully Loaded [mod_nibblebill]</div>
<div>Call end...<br>
</div>
<div>
<div> 2015-02-23 16:34:10.793251 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch] Global: [freeswitch]</div>
<div>2015-02-23 16:34:10.793251 [ERR] mod_nibblebill.c:195 Reached here okay2: [freeswitch]</div>
<div>2015-02-23 16:34:10.793251 [ERR] switch_core_sqldb.c:586 NATIVE SQL ERR [no such table: accounts]</div>
<div>UPDATE accounts SET balance=balance-round(0.030000+0.0004,3) WHERE billingid='1204' and plan='0'</div>
<div>2015-02-23 16:34:10.793251 [CRIT] mod_nibblebill.c:584 Failed to log to database!</div>
<div>2015-02-23 16:34:10.793251 [ERR] mod_nibblebill.c:147 Handle using: [freeswitch] Global: [freeswitch]</div>
<div>2015-02-23 16:34:10.793251 [ERR] mod_nibblebill.c:176 Reached here okay1: [freeswitch]</div>
<div>2015-02-23 16:34:10.793251 [ERR] switch_core_sqldb.c:1196 SQL ERR: [SELECT balance AS nibble_balance FROM accounts WHERE billingid='1204' and plan='0'] no such table: accounts</div>
<div>2015-02-23 16:34:10.793251 [ERR] mod_nibblebill.c:429 Error running this query: [SELECT balance AS nibble_balance FROM accounts WHERE billingid='1204' and plan='0']</div>
<div><br>
<br>
</div>
<br>
Here is the isql output.<br>
</div>
<div><br>
</div>
<div>This is with USER and PASSWORD set in odbc.ini but the above errors are the same whether they are set or not in the ini file.<br>
</div>
<div><br>
</div>
<div>[root@GC007MS ~]# isql freeswitch</div>
<div>+---------------------------------------+<br>
</div>
<div>| Connected! |<br>
</div>
<div>| |</div>
<div>| sql-statement |</div>
<div>| help [tablename] |</div>
<div>| quit |</div>
<div>| |</div>
<div>+---------------------------------------+</div>
<div>SQL> ^C</div>
<div><br>
<br>
</div>
Regards</div>
<div><br>
</div>
<div>Chris<br>
<br>
</div>
<p><br>
</p>
<div><br>
</div>
<p><br>
</p>
<div style="color:rgb(33,33,33)">
<hr style="display:inline-block;width:98%">
<div dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> <<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>> on behalf of Sergey Safarov <<a href="mailto:s.safarov@gmail.com" target="_blank">s.safarov@gmail.com</a>><br>
<b>Sent:</b> 23 February 2015 16:00<br>
<b>To:</b> FreeSWITCH Users Help<br>
<b>Subject:</b> Re: [Freeswitch-users] Nibblebill issues on centos 6?</font>
<div> </div>
</div>
<div>
<div dir="ltr">Can you save tcpdump of mysql connection and parce it in wireshark?
<div>tcpdump -ni eth0 port 3306 -s 65535 -w /tmp/mysql.pcap</div>
<div><br>
</div>
<div>I think FS has compiled with version of mysql lib is different then used server on CentOS 5</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Feb 23, 2015 at 1:48 PM, Chris Martineau <span dir="ltr">
<<a href="mailto:chris@ghosttelecom.com" target="_blank">chris@ghosttelecom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi,<br>
</p>
<p><br>
</p>
<p>Anyone come across any issues using nibblebill on centos 6 to a remote Mysql DB on Centos 5?<br>
</p>
<p><br>
</p>
<p>Doesn't matter what version of Freeswitch I am using, if I deploy it on our existing centos 5 servers to a mysql db deployed also on a centos 5 server it works fine.<br>
</p>
<p>If I deploy on a centos 6 platform I get strange issues with the odbc interface.<br>
</p>
<p>ISQL connection works fine but when I plug the details into the dsn in the nibblebill configuration it doesn't work?<br>
</p>
<p>If I try dsn freeswitch:user:passwd then the module fails to initialise the database and complains that it cannot connect to odbc.<br>
</p>
<p>The only combination that works is just setting dsn to freeswitch which seems to get by the db handle code but then fails with a 'cannot find table' error.<br>
</p>
<p><br>
</p>
<p>The first configuration works fine on centos 5 with the same software and config and to the same remote db.<br>
</p>
<p><br>
</p>
<p>The only difference I can see is the odbc drivers which are later versions on centos6. </p>
<p><br>
</p>
<p>Could this be something to do with new passwords formats on mysql? The versions of mysql being used are using the old format but setting the old_passwords entry in my.cnf makes no difference, set or unset.<br>
</p>
<p><br>
</p>
<p>Any ideas?<br>
</p>
<p><br>
</p>
<p>Regards<span><font color="#888888"><br>
</font></span></p>
<span><font color="#888888">
<p><br>
</p>
<p>Chris<br>
</p>
</font></span></div>
</div>
<br>
_________________________________________________________________________<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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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>
</blockquote>
</div>
<br>
</div>
</div>
</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>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.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></blockquote></div>