Hi Dan,

I made a fix for this, please test the last version 6.7.7

Adrian

On Apr 8, 2009, at 9:26 PM, Dan-Cristian Bogos wrote:

More on the subject ...

Just to be sure that I am not doing any mistake, the log of mysql for
the same command (ShowPrice             From=sip:[email protected]
To=sip:[email protected] Gateway=10.0.0.1 Duration=59) shows the
gateway parameter queried as suspected, faked:

090408 21:17:22     314 Init DB     cdrtool
                    314 Query       select * from billing_customers
       where subscriber = '[email protected]'
       or domain        = 'example2.com'
       or gateway       = '0.0.0.0'
       or (subscriber = '' and domain = '' and gateway = '')
       order by subscriber desc, domain desc, gateway desc limit 1


Ta,
DanB

On Wed, 2009-04-08 at 17:34 +0200, Dan-Cristian Bogos wrote:
Guys,

some strange thing I noticed in the last versions of CDRTool related to usage of the Gateway parameter in ShowPrice. Based on logs it looks like the gateway parameter is somehow faked (or perhaps wrongly converted).

1. On ShowPrice commands:

* Using default dataset, I have replaced the default entry (gateway,
domain, subscriber empty) with (gateway=10.0.0.1 , subscriber and domain
empty). Reloaded the cdrtool from console and executed:
ShowPrice             From=sip:[email protected]
To=sip:[email protected] Gateway=10.0.0.1 Duration=59

The answer was:
0

In the syslog I could find:
Apr  8 17:12:54 DellLaptop cdrtool[11081]: ShowPrice
From=sip:[email protected] To=sip:[email protected]
Gateway=10.0.0.1 Duration=59
Apr 8 17:12:54 DellLaptop cdrtool[11081]: Error: no customer found in
billing_customers table for billing [email protected],
domain=example2.com, gateway=0.0.0.0

In the mysql table I have:

mysql> select * from billing_customers;
+----+----------+-------------+-------------------+--------------- +-------------------+---------------+------------------- +------------------+-----------+--------------+--------------+
| id | gateway  | domain      | subscriber        | profile_name1 |
profile_name1_alt | profile_name2 | profile_name2_alt | timezone
| increment | min_duration | country_code |
+----+----------+-------------+-------------------+--------------- +-------------------+---------------+------------------- +------------------+-----------+--------------+--------------+
|  4 | 10.0.0.1 |             |                   | 441           |
| 442           |                   | Europe/Amsterdam |         0 |
0 |              |
|  5 |          | example.com |                   | 441           |
| 442           |                   | Europe/Amsterdam |         0 |
0 |              |
|  6 |          |             | [email protected] | 441           |
| 442           |                   | Europe/Amsterdam |         0 |
0 |              |
+----+----------+-------------+-------------------+--------------- +-------------------+---------------+------------------- +------------------+-----------+--------------+--------------+
3 rows in set (0.01 sec)


Ta,
DanB


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to