<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Dan,<div><br></div><div>I made a fix for this, please test the last version 6.7.7</div><div><br></div><div>Adrian</div><div><br><div><div>On Apr 8, 2009, at 9:26 PM, Dan-Cristian Bogos wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>More on the subject ...<br><br>Just to be sure that I am not doing any mistake, the log of mysql for<br>the same command (ShowPrice From=<a href="sip:123@example2.com">sip:123@example2.com</a><br>To=<a href="sip:0031650222333@example.com">sip:0031650222333@example.com</a> Gateway=10.0.0.1 Duration=59) shows the<br>gateway parameter queried as suspected, faked:<br><br>090408 21:17:22<span class="Apple-tab-span" style="white-space:pre">        </span> 314 Init DB cdrtool<br><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> 314 Query select * from billing_customers<br> where subscriber = <a href="mailto:'123@example2.com">'123@example2.com</a>'<br> or domain = 'example2.com'<br> or gateway = '0.0.0.0'<br> or (subscriber = '' and domain = '' and gateway = '')<br> order by subscriber desc, domain desc, gateway desc limit 1<br><br><br>Ta,<br>DanB<br><br>On Wed, 2009-04-08 at 17:34 +0200, Dan-Cristian Bogos wrote:<br><blockquote type="cite">Guys,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">some strange thing I noticed in the last versions of CDRTool related to<br></blockquote><blockquote type="cite">usage of the Gateway parameter in ShowPrice. Based on logs it looks like<br></blockquote><blockquote type="cite">the gateway parameter is somehow faked (or perhaps wrongly converted).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">1. On ShowPrice commands:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> * Using default dataset, I have replaced the default entry (gateway,<br></blockquote><blockquote type="cite">domain, subscriber empty) with (gateway=10.0.0.1 , subscriber and domain<br></blockquote><blockquote type="cite">empty). Reloaded the cdrtool from console and executed:<br></blockquote><blockquote type="cite">ShowPrice From=<a href="sip:123@example2.com">sip:123@example2.com</a><br></blockquote><blockquote type="cite">To=<a href="sip:0031650222333@example.com">sip:0031650222333@example.com</a> Gateway=10.0.0.1 Duration=59<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The answer was: <br></blockquote><blockquote type="cite">0<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In the syslog I could find: <br></blockquote><blockquote type="cite"> Apr 8 17:12:54 DellLaptop cdrtool[11081]: ShowPrice<br></blockquote><blockquote type="cite">From=<a href="sip:123@example2.com">sip:123@example2.com</a> To=<a href="sip:0031650222333@example.com">sip:0031650222333@example.com</a><br></blockquote><blockquote type="cite">Gateway=10.0.0.1 Duration=59<br></blockquote><blockquote type="cite">Apr 8 17:12:54 DellLaptop cdrtool[11081]: Error: no customer found in<br></blockquote><blockquote type="cite">billing_customers table for billing <a href="mailto:party=123@example2.com">party=123@example2.com</a>,<br></blockquote><blockquote type="cite">domain=example2.com, gateway=0.0.0.0<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">In the mysql table I have:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">mysql> select * from billing_customers;<br></blockquote><blockquote type="cite">+----+----------+-------------+-------------------+---------------+-------------------+---------------+-------------------+------------------+-----------+--------------+--------------+<br></blockquote><blockquote type="cite">| id | gateway | domain | subscriber | profile_name1 |<br></blockquote><blockquote type="cite">profile_name1_alt | profile_name2 | profile_name2_alt | timezone<br></blockquote><blockquote type="cite">| increment | min_duration | country_code |<br></blockquote><blockquote type="cite">+----+----------+-------------+-------------------+---------------+-------------------+---------------+-------------------+------------------+-----------+--------------+--------------+<br></blockquote><blockquote type="cite">| 4 | 10.0.0.1 | | | 441 |<br></blockquote><blockquote type="cite">| 442 | | Europe/Amsterdam | 0 |<br></blockquote><blockquote type="cite">0 | | <br></blockquote><blockquote type="cite">| 5 | | example.com | | 441 |<br></blockquote><blockquote type="cite">| 442 | | Europe/Amsterdam | 0 |<br></blockquote><blockquote type="cite">0 | | <br></blockquote><blockquote type="cite">| 6 | | | <a href="mailto:alice@example.com">alice@example.com</a> | 441 |<br></blockquote><blockquote type="cite">| 442 | | Europe/Amsterdam | 0 |<br></blockquote><blockquote type="cite">0 | | <br></blockquote><blockquote type="cite">+----+----------+-------------+-------------------+---------------+-------------------+---------------+-------------------+------------------+-----------+--------------+--------------+<br></blockquote><blockquote type="cite">3 rows in set (0.01 sec)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Ta,<br></blockquote><blockquote type="cite">DanB<br></blockquote><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div></blockquote></div><br></div></body></html>