<div dir="ltr"><font face="courier new, monospace">Hello Rupa,</font><div><font face="courier new, monospace"><br></font></div><div style><font face="courier new, monospace">the query if ok, the user is there:</font></div>

<div style><font face="courier new, monospace"><br></font></div><div style><div><font face="courier new, monospace">mysql&gt; 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 style><font face="courier new, monospace">and the actual sql executed by nibblebill:</font></div>

<div style><font face="courier new, monospace"><br></font></div><div style><font face="courier new, monospace"><div>mysql&gt; SELECT balance AS nibble_balance FROM sip_users WHERE id=&#39;1&#39;;</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 style>so that&#39;s ok..</div><div style>

<br></div><div style><br></div><div style>any othe ideas?</div><div style><br></div><div style>Thanks a lot for your help!</div><div style><br></div><div style><br></div><div style>David</div></font></div><div style><font face="courier new, monospace"><br>

</font></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 3:35 AM, Rupa Schomaker <span dir="ltr">&lt;<a href="mailto:rupa@rupa.com" target="_blank">rupa@rupa.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"><div class="gmail_extra"><div class="im"><br><div class="gmail_quote">On Tue, Feb 12, 2013 at 5:26 PM, David Villasmil <span dir="ltr">&lt;<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@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>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 =&#39;1&#39;]</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 =&#39;1&#39;]</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 =&#39;1&#39;]</div>




<div><br></div><div><br></div><div>the select go fine if executed &quot;by hand&quot;</div></div></blockquote></div><br></div>None of those SQL statements are valid.  (hint: WHERE = &#39;1&#39; is no good).    Been a while since I hacked/worked with nibblebill, but I&#39;m pretty sure the &#39;id&#39; field isn&#39;t not being filled in the sql for some reason.  <span class="HOEnZb"><font color="#888888"><br>


<br clear="all"><div><br></div>-- <br>-Rupa
</font></span></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>