Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

SQL query in ART database for incoming calls

This is the sql statement I am using to pull records from ART database below. After looking at the data pulled I am not getting incoming calls. What colum do I need to include.

select user_id, orig_party_number, orig_called_party_number, final_destination, connect_date, disconnect_date, (disconnect_date - connect_date) as duration, call_type, call_classification from Tbl_Billing_Data where orig_party_number = '50656' and timestamp > '2006-01-03' and timestamp < '2006-01-31'

1 REPLY
Blue

Re: SQL query in ART database for incoming calls

Query the CDR DB directly instead of ART and use this query for inbound:

PARAMETERS [Called Number] Text ( 255 ), [Start Date] DateTime, [End Date] DateTime;

SELECT DateAdd("s",[dateTimeOrigination],"31-Dec-1969 19:00:00") AS [Origin DateTime], IIf(dateTimeConnect<>0,DateAdd("s",[dateTimeConnect],"31-Dec-1969 19:00:00"),DateAdd("s",[dateTimeDisconnect],"31-Dec-1969 19:00:00")) AS ConnectDateTime, DateAdd("s",[dateTimeDisconnect],"31-Dec-1969 19:00:00") AS DisconectDateTime, dbo_CallDetailRecord.callingPartyNumber, dbo_CallDetailRecord.finalCalledPartyNumber, dbo_CallDetailRecord.duration AS Duration

FROM dbo_CallDetailRecord

WHERE (((dbo_CallDetailRecord.callingPartyNumber)<>"") And ((dbo_CallDetailRecord.finalCalledPartyNumber)=[Called Number]) And ((dbo_CallDetailRecord.dateTimeOrigination)>=DateDiff("s",#31/12/1969 19:0:0#,[Start Date]) And (dbo_CallDetailRecord.dateTimeOrigination)<=DateDiff("s",#31/12/1969 19:0:0#,[End Date])));

adignan - berbee

133
Views
0
Helpful
1
Replies