[Spce-user] CDR Question / Clarification
Kevin Masse
kmasse at questblue.com
Mon Feb 25 08:05:17 EST 2013
Good morning Jon, thank you for clearing this up for me.
Before I posted the question I had spend hours going over the Table 3. CDR export file body line format in the manual. I completely missed it or I was too tired.
Thank you,
We can consider this answered in full and closed out.
Regards,
Kevin
-----Original Message-----
From: spce-user-bounces at lists.sipwise.com [mailto:spce-user-bounces at lists.sipwise.com] On Behalf Of Jon Bonilla (Manwe)
Sent: Monday, February 25, 2013 4:12 AM
To: spce-user at lists.sipwise.com
Subject: Re: [Spce-user] CDR Question / Clarification
El Fri, 22 Feb 2013 20:01:12 -0500
"Kevin Masse" <kmasse at questblue.com> escribió:
> Good evening list users:
>
>
>
>
>
> I have a question relating to where the call detail records are stored?
> I would like clarification on the call records for inbound verses
> outbound calls.
>
>
They are stored in accounting.cdr table in the database.
>
>
>
> In the database if I query select * from cdr WHERE source_domain =
> 'IPADDRESS-OF-SIP-ACCOUNT'; I can see calls made from the account.
>
I wouldn't trust that query. Different subscribers might have different source_domain fields. Why not use 'WHERE source_account_id=$ID'? That will show you for sure all the calls made by that account.
>
>
> If I query the database with mysql> select SUM(duration) from cdr
> WHERE source_domain = 'IPADDRESS-OF-SIP-ACCOUNT';
>
>
> The seconds in this query are only for calls made outbound from the
> PBX to SIPWISE and onto the public network.
>
>
>
> Where can I find the inbound calls. In the WebGUI for this account if
> I click on CDR I do see the inbound calls but I do not see outbound calls.
> That is what I find odd. The query in the WebGUI has to be pulling
> these records from somewhere.
>
try with 'destination_account_id' if you're looking for the account. You can also search for a particular subscriber in that account.
>
>
> Here I see the inbound but no outbound. I don't care to have this CDR
> tab working in the GUI I am only stating that I see the inbound call
> here and not in the CDR.
>
>
>
> I am not suggesting something is /broke/ as I may be simply looking in
> the wrong place.
>
My guess is that you're not using the right fields for your search. Take a look to the cdr fields.
>
> What would the query require to ask the database for the sum of all
> calls inbound and outbound total of seconds / minutes etc.?
>
>
Of every call of every subscriber?
select SUM(duration) from cdr;
More information about the Spce-user
mailing list