-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
callhistory_storedata.sql
40 lines (37 loc) · 1.17 KB
/
callhistory_storedata.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- IOS 8 \Home\Library\CallHistoryDB
-- References:
--
-- https://avi.alkalay.net/2011/12/iphone-call-history.html
-- https://books.google.gr/books?id=HodcDgAAQBAJ&pg=PA224&lpg=PA224&dq=zcalltype&source=bl&ots=AxN5C2eH2m&sig=ACfU3U0rLvkJ-gU-3HS9siXl54LrysrW4w&hl=en&sa=X&ved=2ahUKEwiE3p7O9e3iAhVBr6QKHT6LDTkQ6AEwEXoECAkQAQ#v=onepage&q=zcalltype&f=false
select
z_pk as 'zpk',
ZISO_COUNTRY_CODE as 'CC',
ZADDRESS as 'Address',
ZNAME as 'Name',
ZNUMBER_AVAILABILITY as 'Nr_Availability',
case ZORIGINATED
when 1 then 'Yes'
end as 'Originated',
case ZANSWERED
when 0 then 'No'
when 1 then 'Yes'
end as 'Answered',
case ZREAD
when 0 then 'No'
when 1 then 'Yes'
end as 'Read',
ZDISCONNECTED_CAUSE as'DisconnectedCause',
case ZCALLTYPE --
when 1 then 'Standard Call'
when 8 then 'Full AV Facetime Call'
when 16 then 'Facetime Audio only Call'
else ZCALLTYPE
end as 'CallType',
ZFACE_TIME_DATA as 'FacetimeData',
time(ZDURATION,'unixepoch') as 'Duration',
datetime('2001-01-01', zdate || ' seconds') as 'cdate',
ZDEVICE_ID as 'DeviceID',
ZUNIQUE_ID as 'UniqueID'
from zcallrecord
--where ZCALLTYPE = 8 filter by call type
order by cdate desc