Call and SMS history
The history of calls and messages are stored in a MySQL database. For safety reasons (i.e. to not modify the database itself), we make a copy of it and look into it:
1
$ cp .local/share/history-service/history.sqlite ~
Copied!
1
$ sqlite3 history.sqlite
2
SQLite version 3.8.5 2014-06-04 14:06:34
3
Enter ".help" for usage hints.
4
5
sqlite> .schema voice_events
6
CREATE TABLE voice_events (
7
accountId varchar(255),
8
threadId varchar(255),
9
eventId varchar(255),
10
senderId varchar(255),
11
timestamp datetime,
12
newEvent bool,
13
duration int,
14
missed bool,
15
remoteParticipant varchar(255));
16
...
17
18
sqlite> .schema text_events
19
CREATE TABLE text_events (
20
accountId varchar(255),
21
threadId varchar(255),
22
eventId varchar(255),
23
senderId varchar(255),
24
timestamp datetime,
25
newEvent bool,
26
message varchar(512),
27
messageType tinyint,
28
messageStatus tinyint,
29
readTimestamp datetime,
30
subject varchar(256)
31
);
32
...
33
34
sqlite> .output messages.txt
35
sqlite> select * from text_events ;
36
sqlite> .output calls.txt
37
sqlite> select * from voice_events ;
38
sqlite> .quit
Copied!
1
$ cat messages.txt
2
...
3
ofono/ofono/account0|+49160xxxxxxx|2015-04-18T19:10:23+0200-1|+49160xxxxxxx|2015-04-18T17:10:29.000|0|amor|0|0|2015-04-18T17:11:12.160|
4
5
$ cat calls.txt
6
...
7
ofono/ofono/account0|089xxxxxxxx|089xxxxxxxx:mié. abr. 22 20:17:35 2015|self|2015-04-22T18:17:35.645|0|0|0|+4989xxxxxxxx
Copied!
Another easy way to look for something particular is just grep from a .dump output:
1
$ sqlite3 history.sqlite .dump | fgrep 'Willkommen in '
2
INSERT INTO "text_events" VALUES('ofono/ofono/account0','FONIC','2015-08-31T10:04:20+0200-1','FONIC','2015-08-31T08:04:24.000',0,'Willkommen in Italien! In Ihrem Tarif zahlen Sie für Gespräche in der EU 0,22 €/min.; eingehende Anrufe 0,05 €/min., SMS 0,07 €. Notruf 112 kostenlos, Info +4917688864243',0,0,'2015-08-31T10:06:25.017','');
3
INSERT INTO "text_events" VALUES('ofono/ofono/account0','FONIC','2015-09-12T13:14:14+0200-1','FONIC','2015-09-12T11:15:26.000',1,'Willkommen in Österreich! In Ihrem Tarif zahlen Sie für Gespräche in der EU 0,22 €/min.; eingehende Anrufe 0,05 €/min., SMS 0,07€. Jetzt EU-Paket 100 Minuten (ein- und ausgehend/4,95€/7 Tage) buchen: Start FonicEU100Min per SMS an 36642.. Notruf 112 kostenlos, Info +4917688864243',0,0,NULL,NULL);
Copied!
Note: The column accountId (here: "ofono/ofono/account0") is the reference to the used SIM1 or SIM2 during the call. It can be probed which SIM is which account with:
1
$ mc-tool dump
2
...
3
Account: ofono/ofono/account0
4
Display Name: SIM 1
5
Normalized: +49176xxxxxxxx
6
Enabled: enabled
7
Icon: im-ofono
8
Connects: automatically
9
Nickname: +49176xxxxxxxx
10
Service: ofono
11
12
Presences:
13
Automatic: available (2) ""
14
Current: registered (2) "FONIC"
15
Requested: available (2) ""
16
Changing: no
17
18
(string) modem-objpath = /ril_0
Copied!
Last updated: Fri Nov 6 13:46:34 CET 2015
Last modified 1yr ago
Copy link