Histórico de llamadas y SMS

El historial de llamadas y SMS están grabados en una pequeña base de datos de tipo MySQL. Por razones de seguridad, antes de entrar en MySQL hacemos una copia de seguridad (por si cambiamos algún dato):


$ cp .local/share/history-service/history.sqlite ~

$ sqlite3 history.sqlite 
SQLite version 3.8.5 2014-06-04 14:06:34
Enter ".help" for usage hints.

sqlite> .schema voice_events
CREATE TABLE voice_events (
  accountId varchar(255),
  threadId varchar(255),
  eventId varchar(255),
  senderId varchar(255),
  timestamp datetime,
  newEvent bool,
  duration int,
  missed bool,
  remoteParticipant varchar(255));
  ...

sqlite> .schema text_events
  CREATE TABLE text_events (
  accountId varchar(255),
  threadId varchar(255),
  eventId varchar(255),
  senderId varchar(255),
  timestamp datetime,
  newEvent bool,
  message varchar(512),
  messageType tinyint,
  messageStatus tinyint,
  readTimestamp datetime,
  subject varchar(256)
  );
  ...

sqlite> .output messages.txt
sqlite> select * from text_events ;
sqlite> .output calls.txt
sqlite> select * from voice_events ;
sqlite> .quit
$ cat messages.txt
...
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|

$ cat calls.txt
...
ofono/ofono/account0|089xxxxxxxx|089xxxxxxxx:mié. abr. 22 20:17:35 2015|self|2015-04-22T18:17:35.645|0|0|0|+4989xxxxxxxx

Nota: La columna accountId(en el caso de arriba "ofono/ofono/account0")es la referencia a la tarjeta de SIM usada en la llamada o el servicio de SMS. Lo puedes comprobar con:

$ mc-tool dump
...
 Account: ofono/ofono/account0
Display Name: SIM 1
  Normalized: +49176xxxxxxxx
 Enabled: enabled
    Icon: im-ofono
Connects: automatically
Nickname: +49176xxxxxxxx
 Service: ofono

Presences:
   Automatic: available (2) ""
 Current: registered (2) "FONIC"
   Requested: available (2) ""
Changing: no

  (string) modem-objpath = /ril_0

Última actualización: jueves, 19 de noviembre de 2015, 20:44:29 CET

Last updated