<a href="http://jira.freeswitch.org/browse/FS-5100">http://jira.freeswitch.org/browse/FS-5100</a><div><br><br><div class="gmail_quote">On 13 February 2013 17:40, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Specifically it's introduced by commit 5c176e8 which was resolving FS-4810, which is indeed adding support for the the generalised DSN interface.<div>
<br></div><div><div><a href="http://fisheye.freeswitch.org/changelog/freeswitch.git?showid=5c176e889d8cc2da7efb18a89782407ee5524a74" target="_blank">http://fisheye.freeswitch.org/changelog/freeswitch.git?showid=5c176e889d8cc2da7efb18a89782407ee5524a74</a></div>
<div><a href="http://jira.freeswitch.org/browse/FS-4810" target="_blank">http://jira.freeswitch.org/browse/FS-4810</a></div><div><br></div><div>-Steve</div><div><div class="h5"><div><br></div><div><br><br><div class="gmail_quote">
On 13 February 2013 17:37, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Looks like this difference is brought in by the modifications to support the generalised DSN interface. odbc-dsn would be consistent with all other modules, so I guess that's why it's happened.<div>
<br></div><div>But...</div>
<div>The HEAD of v1.2.stable understands db_dsn but not odbc-dsn.</div><div>The HEAD of master understands odbc-dsn but not db_dsn.</div><div><br></div><div>This is a configuration breaking behaviour, which doesn't seem to have been documented!</div>
<div><br></div><div>At the very least it'd make sense for the master branch to understand both odbc-dsn and db_dsn for backwards compatibility. I'll file a Jira with a patch (it's a trivial fix) in a moment.</div>
<div><br></div><div>-Steve<div><div><br><div><br></div><div><br><div><br></div><div><br><br><div class="gmail_quote">On 13 February 2013 17:33, Steven Ayre <span dir="ltr"><<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">How are you setting the DSN?<div><br></div><div>The param name mentioned earlier is wrong. Reading the source the correct parameter is "odbc-dsn". Looks like the wiki documentation is incorrect.</div>
<div><br></div>
<div>-Steve</div><div><div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">On 13 February 2013 15:33, David Villasmil <span dir="ltr"><<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.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">hello Avi,<div><br></div><div>that's right, but nevermind that, that's the output when I was trying something else:</div>
<div><br></div><div><div>2013-02-12 19:32:07.784156 [INFO] mod_nibblebill.c:498 Beginning new billing on 58e6762b-c049-470e-84f7-519a815ab6f0</div>
<div>2013-02-12 19:32:07.784156 [CRIT] mod_nibblebill.c:535 Failed to log to database!</div><div>2013-02-12 19:32:07.784156 [ERR] mod_nibblebill.c:380 Error running this query: [SELECT balance AS nibble_balance FROM sip_users WHERE id='1']</div>
</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 12:58 PM, Avi Marcus <span dir="ltr"><<a href="mailto:avi@avimarcus.net" target="_blank">avi@avimarcus.net</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">Your logs showed the queries run were:<div><br></div><div><div><div style="color:rgb(34,34,34);font-size:12.571428298950195px;font-family:arial,sans-serif">
UPDATE sip_users SET balance=balance-0.018983 WHERE ='1'</div>
</div><div><div style="color:rgb(34,34,34);font-size:12.571428298950195px;font-family:arial,sans-serif">SELECT balance AS nibble_balance FROM sip_users WHERE ='1'</div></div></div><div><br></div>
<div>
You just tried now.. "WHERE <b>id</b>='1' " -- they are not the same query...</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888"><div>
<div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi</span></div>
</div></font></span><div><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small"><br></span></div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small"><br>
</span></div>
<br><div class="gmail_quote">On Wed, Feb 13, 2013 at 12:48 PM, David Villasmil <span dir="ltr"><<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.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"><font face="courier new, monospace">Hello Rupa,</font><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">the query if ok, the user is there:</font></div>
<div><font face="courier new, monospace"><br></font></div><div><div><font face="courier new, monospace">mysql> select * from sip_users;</font></div><div><font face="courier new, monospace">+----+----------+----------+----------------+------------+--------------+--------------+</font></div>
<div><font face="courier new, monospace">| id | username | password | rateplan | balance | domain | max_channels |</font></div><div><font face="courier new, monospace">+----+----------+----------+----------------+------------+--------------+--------------+</font></div>
<div><font face="courier new, monospace">| 1 | 1002 | 1234 | retail_default | 100.000000 | 192.168.1.44 | 1 |</font></div><div><font face="courier new, monospace">+----+----------+----------+----------------+------------+--------------+--------------+</font></div>
<div><font face="courier new, monospace">1 row in set (0.00 sec)</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace">and the actual sql executed by nibblebill:</font></div>
<div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><div>mysql> SELECT balance AS nibble_balance FROM sip_users WHERE id='1';</div><div>+----------------+</div>
<div>| nibble_balance |</div><div>+----------------+</div><div>| 100.000000 |</div><div>+----------------+</div><div>1 row in set (0.00 sec)</div><div><br></div><div><br></div><div>so that's ok..</div><div>
<br></div><div><br></div><div>any othe ideas?</div><div><br></div><div>Thanks a lot for your help!</div><span><font color="#888888"><div><br></div><div><br></div><div>David</div></font></span></font></div>
<div><font face="courier new, monospace"><br>
</font></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Feb 13, 2013 at 3:35 AM, Rupa Schomaker <span dir="ltr"><<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.com</a>></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"><div class="gmail_extra"><div><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 5:26 PM, David Villasmil <span dir="ltr"><<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>call goes out fine... no billing though:</div><div><br></div><div><br></div><div><div>2013-02-12 19:21:49.844277 [DEBUG] mod_nibblebill.c:504 22 seconds passed since last bill time of 2013-02-12 19:21:27</div>
<div>2013-02-12 19:21:49.844277 [DEBUG] mod_nibblebill.c:521 Billing $0.018983 to 1 (Call: d442dc6b-a3a7-423a-8450-598d17ca43b3 / 0.000000 so far)</div><div>2013-02-12 19:21:49.844277 [DEBUG] mod_nibblebill.c:351 Doing update query</div>
<div>[UPDATE sip_users SET balance=balance-0.018983 WHERE ='1']</div><div>2013-02-12 19:21:49.844277 [CRIT] mod_nibblebill.c:535 Failed to log to database!</div><div>2013-02-12 19:21:49.844277 [DEBUG] mod_nibblebill.c:378 Doing lookup query</div>
<div>[SELECT balance AS nibble_balance FROM sip_users WHERE ='1']</div><div>2013-02-12 19:21:49.844277 [ERR] mod_nibblebill.c:380 Error running this query: [SELECT balance AS nibble_balance FROM sip_users WHERE ='1']</div>
<div><br></div><div><br></div><div>the select go fine if executed "by hand"</div></div></blockquote></div><br></div>None of those SQL statements are valid. (hint: WHERE = '1' is no good). Been a while since I hacked/worked with nibblebill, but I'm pretty sure the 'id' field isn't not being filled in the sql for some reason. <span><font color="#888888"><br>
<br clear="all"><div><br></div>-- <br>-Rupa
</font></span></div></div>
<br></div></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></div></blockquote></div><br></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>
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></div></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>
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>
</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>
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>
</div></div></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>