I finally got it work, I'd like to explain here what the problem was and how
I fixed it:
To start with, after installing cdrtool, and adding some info my tables
ended like this:
select * from destinations;
+----+----------------+--------+------------+---------+-----------+
| id | gateway | domain | subscriber | dest_id | dest_name |
+----+----------------+--------+------------+---------+-----------+
| 3 | 1.2.3.4 | | | 1 | USA |
+----+----------------+--------+------------+---------+-----------+
1 row in set (0.00 sec)
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 | 1.2.3.4 | | | Normal |
Normal | Normal | Normal | America/Miami
| 6 | 0 | |
+----+----------------+--------+------------+---------------+-------------------+---------------+-------------------+---------------+-----------+--------------+--------------+
1 row in set (0.00 sec)
select * from billing_profiles;
+----+---------+--------+------------+--------+------------+-------+------------+-------+------------+-------+------------+-------+
| id | gateway | domain | subscriber | name | rate_name1 | hour1 |
rate_name2 | hour2 | rate_name3 | hour3 | rate_name4 | hour4 |
+----+---------+--------+------------+--------+------------+-------+------------+-------+------------+-------+------------+-------+
| 3 | | | | Normal | 1 | 24
| | 0 | | 0 | | 0 |
+----+---------+--------+------------+--------+------------+-------+------------+-------+------------+-------+------------+-------+
1 row in set (0.00 sec)
select * from billing_rates;
+----+----------------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+
| id | gateway | domain | subscriber | name | destination |
durationRate | trafficRate | application | connectCost |
+----+----------------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+
| 7 | 1.2.3.4 | | | 1 | 001 |
100 | | audio | 0 |
+----+----------------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+
But as it happens, when you specify a profile like I did: billing profile is
NORMAL, but RATE NAME is 1, then you MUST CREATE A TABLE CALLED
"BILLING_RATES_1", I don't know if cdrtool is supposed to create it but
didn't do it for me. I had to manually create the table:
select * from
billing_rates_1;
+----+----------------+--------+------------+------+-------------+--------------+-------------+-------------+-------------+
| id | gateway | domain | subscriber | name | destination |
durationRate | trafficRate | application | connectCost |
+----+----------------+--------+------------+------+-------------+--------------+-------------+-------------+-------------+
| 8 | 1.2.3.4 | | | 1 | 1 |
5 | 10 | audio | 10 |
+----+----------------+--------+------------+------+-------------+--------------+-------------+-------------+-------------+
and voilá! It started working...
I hope my struggle helps someone!
David
On Mon, Jun 16, 2008 at 5:27 PM, David Villasmil <
david.villasmil.work(a)gmail.com> wrote:
I just found two errors... something noone ever said
(at least to me) aobut
cdrtool, i got this on the syslog:
Jun 16 11:18:37 rgi-sql ^\$V^H[15556]: Database error for query update
billing_rates_Normal set
gateway='82.144.106.187',domain='',subscriber='',destination='001',durationRate='5',application='audio',connectCost='0'
where id = '6' and (1=1) : Table 'cdrtool.billing_rates_Normal'
doesn't
exist (1146)
there IS no table by that name, Is cdrtool supposed to create it? DO you
have only billing_rates and billing_ratesNGN? or do you have many others?
each by the name of a profile?
I say this error too.. :S
Jun 16 11:24:15 rgi-sql CDRTool[15558]: Error: Cannot find rates for
callid=0080826000480002A49500000FAB(a)82.144.106.187, billing party=
opencall(a)82.144.106.187, customer gateway=82.144.106.187, gateway=
82.144.106.187, destination=1, profile=Normal, app=audio
Time to read again!
thanks anyway!
On Mon, Jun 16, 2008 at 5:20 PM, Iñaki Baz Castillo <ibc(a)in.ilimit.es>
wrote:
El Monday 16 June 2008 16:53:37 David Villasmil
escribió:
Tis say that's what I have... except you
don't expand on you Customers'
table..
Yes sorry, in your first mail it cost to me to understand the tables.
Sincerelly the only advice I caould give to you is readin gslowly some
times
the README.txt file about accounting in CDRTool. Ok, it's not very easy
but
the fact is that it explains all. Re-read again, I had to read it several
times after get it working (same problem as you XD).
Regards.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users