[Spce-user] CDR Question / Clarification

Jon Bonilla (Manwe) jbonilla at sipwise.com
Mon Feb 25 04:11:58 EST 2013


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;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20130225/510109da/attachment-0001.asc>


More information about the Spce-user mailing list