Hello all,
Well after may headaches and countless trial and error, I finally got openser to use the LCR module and force mediaproxy on all calls, thanks Iñaki and Raul for your help!
I also have installed and configure cdrtool, but I can't seem to make it work properly, as documentation is very bad I had to half-make it work in starts and fits. Now i got it to al least show the destination description as per the destination table which is linked to the rates table, but it doesn't assigns the rate or calculates the price for the call... this is very frustating... but hey, I'm learning here!
When I click the call on the cdr list it says the duration, app, destination, customer: gateway and increment 6s... but thats it... and this is what I got:
in profiles:
Id Trusted peer Domain Subscriber Profile Id Rate Id1 00-H1 Rate Id2 H1-H2 Rate Id3 H2-H3 Rate Id4 H3-24 1 1.2.3.4 1 1 23
destinations:
Id Trusted peer Domain Subscriber Destination Id Description 1 1 USA
rates:
Id Trusted peer Domain Subscriber Rate Id Destination Price App Connect 1 1 001 1000 audio 0
and that's it, it assigns correctly the USA destination, but rate is 0...
strange... any pointer would be gratly appreciated..
d
El Monday 16 June 2008 13:16:17 David Villasmil escribió:
I also have installed and configure cdrtool, but I can't seem to make it work properly, as documentation is very bad I had to half-make it work in starts and fits. Now i got it to al least show the destination description as per the destination table which is linked to the rates table, but it doesn't assigns the rate or calculates the price for the call... this is very frustating... but hey, I'm learning here!
Your tables are incorect. Let me put an example for Spain:
* Destinations table: - Destination ID: 34 (needed !!!) - Description: Spain
* Customers: - Domain: sip.yourdomain.com (the domain which clients authenticate). You can also set the source IP (Gateway) instead if all your clients come from the same source IP.
* Profiles: - Profile ID: Normal - Rate Id1: reducida - 00-H1: 8 - Rate Id2: cara - H1-H2: 22 - Rate Id3: reducida - H2-H3: 24
* Rates: - Rate Id: reducida - Destination: 34 - Price: 5 - App: audio ( NEEDED !!! ) - Conecct: 0 --------- - Rate Id: cara - Destination: 34 - Price: 20 - App: audio ( NEEDED !!! ) - Conecct: 0
Tis say that's what I have... except you don't expand on you Customers' table..
mysql> select * from destinations; select * from billing_customers; select * from billing_profiles;select * from billing_rates; +----+---------+--------+------------+---------+-----------+ | id | gateway | domain | subscriber | dest_id | dest_name | +----+---------+--------+------------+---------+-----------+ | 3 | | | | 1 | USA | +----+---------+--------+------------+---------+-----------+ 1 row in set (0.00 sec)
+----+----------------+--------+------------+---------------+-------------------+---------------+-------------------+---------------+-----------+--------------+--------------+ | 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 | | | 1 | 1 | 1 | 1 | America/Miami | 6 | 0 | | +----+----------------+--------+------------+---------------+-------------------+---------------+-------------------+---------------+-----------+--------------+--------------+ 1 row in set (0.00 sec)
+----+---------+--------+------------+--------+------------+-------+------------+-------+------------+-------+------------+-------+ | 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)
+----+---------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+ | id | gateway | domain | subscriber | name | destination | durationRate | trafficRate | application | connectCost | +----+---------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+ | 6 | | | | Normal | 001 | 5 | | audio | 0 | +----+---------+--------+------------+--------+-------------+--------------+-------------+-------------+-------------+ 1 row in set (0.00 sec)
mysql>
On Mon, Jun 16, 2008 at 2:37 PM, Iñaki Baz Castillo ibc@in.ilimit.es wrote:
El Monday 16 June 2008 13:16:17 David Villasmil escribió:
I also have installed and configure cdrtool, but I can't seem to make it work properly, as documentation is very bad I had to half-make it work in starts and fits. Now i got it to al least show the destination description as per the destination table which is linked to the rates table, but it doesn't assigns the rate or calculates the price for the call... this is very frustating... but hey, I'm learning here!
Your tables are incorect. Let me put an example for Spain:
- Destinations table:
- Destination ID: 34 (needed !!!)
- Description: Spain
- Customers:
- Domain: sip.yourdomain.com (the domain which clients authenticate).
You can also set the source IP (Gateway) instead if all your clients come
from
the same source IP.
- Profiles:
- Profile ID: Normal
- Rate Id1: reducida
- 00-H1: 8
- Rate Id2: cara
- H1-H2: 22
- Rate Id3: reducida
- H2-H3: 24
- Rates:
- Rate Id: reducida
- Destination: 34
- Price: 5
- App: audio ( NEEDED !!! )
- Conecct: 0
- Rate Id: cara
- Destination: 34
- Price: 20
- App: audio ( NEEDED !!! )
- Conecct: 0
-- Iñaki Baz Castillo ibc@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
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 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@82.144.106.187, billing party= opencall@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@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@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
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@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@82.144.106.187, billing party= opencall@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@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@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
El Monday 16 June 2008 17:44:56 David Villasmil escribió:
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:
What about if you don't use numeric values as Rate Id? I use Rate id with textual value ("Reducida", "Normal"...) and had not your problem.
Regards.
On Mon, Jun 16, 2008 at 5:55 PM, Iñaki Baz Castillo ibc@in.ilimit.es wrote:
El Monday 16 June 2008 17:44:56 David Villasmil escribió:
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:
What about if you don't use numeric values as Rate Id? I use Rate id with textual value ("Reducida", "Normal"...) and had not your problem.
At least in my case, it doesn't find the rate... Same thing, I had to create the table...
without creating the table:
Jun 16 12:02:30 rgi-sql CDRTool[15559]: Error: Cannot find rates for callid= 00808260004800068104000005E9@82.144.106.187, billing party=user@1.2.3.4, customer gateway=1.2.3.4, gateway=1.2.3.4, destination=1, profile=Normal, app=audio
and then, having created the billing_rates_reducida table:
Jun 16 12:03:16 rgi-sql CDRTool[21793]: ConnectFee=0.0000 Span=1 Duration=6 DestId=1 gateway=1.2.3.4 Profile=Normal Period=weekday Rate=reducida Interval=0-24 Cost=0.0500/60 Price=0.0050
strange... I gues our versions are not the same?
I'm using v 6.4.1, you?
El Monday 16 June 2008 18:06:08 David Villasmil escribió:
At least in my case, it doesn't find the rate... Same thing, I had to create the table...
without creating the table:
Jun 16 12:02:30 rgi-sql CDRTool[15559]: Error: Cannot find rates for callid= 00808260004800068104000005E9@82.144.106.187, billing party=user@1.2.3.4, customer gateway=1.2.3.4, gateway=1.2.3.4, destination=1, profile=Normal, app=audio
and then, having created the billing_rates_reducida table:
Jun 16 12:03:16 rgi-sql CDRTool[21793]: ConnectFee=0.0000 Span=1 Duration=6 DestId=1 gateway=1.2.3.4 Profile=Normal Period=weekday Rate=reducida Interval=0-24 Cost=0.0500/60 Price=0.0050
strange... I gues our versions are not the same?
very strange
I'm using v 6.4.1, you?
6.1.7
Really no idea :(
Well, in any case, now we both know how it works... ;)
thanks a lot!
d
On Mon, Jun 16, 2008 at 6:14 PM, Iñaki Baz Castillo ibc@in.ilimit.es wrote:
El Monday 16 June 2008 18:06:08 David Villasmil escribió:
At least in my case, it doesn't find the rate... Same thing, I had to create the table...
without creating the table:
Jun 16 12:02:30 rgi-sql CDRTool[15559]: Error: Cannot find rates for callid= 00808260004800068104000005E9@82.144.106.187, billing party=user@1.2.3.4, customer gateway=1.2.3.4, gateway=1.2.3.4, destination=1, profile=Normal, app=audio
and then, having created the billing_rates_reducida table:
Jun 16 12:03:16 rgi-sql CDRTool[21793]: ConnectFee=0.0000 Span=1
Duration=6
DestId=1 gateway=1.2.3.4 Profile=Normal Period=weekday Rate=reducida Interval=0-24 Cost=0.0500/60 Price=0.0050
strange... I gues our versions are not the same?
very strange
I'm using v 6.4.1, you?
6.1.7
Really no idea :(
Iñaki Baz Castillo ibc@in.ilimit.es
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
El Monday 16 June 2008 17:27:21 David Villasmil escribió:
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',duration Rate='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?
No, I don't have those tables. Those are the tables I have (starting by "billing_"):
billing_customers billing_enum_tlds billing_holidays billing_profiles billing_profilesNGN billing_rates billing_ratesNGN billing_rates_history