[OpenSIPS-Users] CDRTool - ShowPrice -> No match for gateway parameter
Dan-Cristian Bogos
danb at sms4sip.com
Wed Apr 8 21:26:54 CEST 2009
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:123 at example2.com
To=sip:0031650222333 at example.com 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 = '123 at example2.com'
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:123 at example2.com
> To=sip:0031650222333 at example.com 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:123 at example2.com To=sip:0031650222333 at example.com
> 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 party=123 at example2.com,
> 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 | | | alice at example.com | 441 |
> | 442 | | Europe/Amsterdam | 0 |
> 0 | |
> +----+----------+-------------+-------------------+---------------+-------------------+---------------+-------------------+------------------+-----------+--------------+--------------+
> 3 rows in set (0.01 sec)
>
>
> Ta,
> DanB
More information about the Users
mailing list