Retrieve call log history information.

Usage #

This API allows you to access the call log history of the device. You can specify the number of records to retrieve and the starting point for the query.

Arguments #

ArgumentTypeDescription
offsetIntegerOptional. The starting point for the query. Defaults to 0 (first record).
limitIntegerOptional. The maximum number of call log records to retrieve. Defaults to 50.

Example #

Retrieve the Last 10 Call Logs #

~/ $ termux-call-log --limit 10

Output:

[
  {
    "name": "John Doe",
    "phone_number": "+1234567890",
    "type": "INCOMING",
    "date": "2025-05-04 10:15:30",
    "duration": "00:02:45",
    "sim_id": "SIM1"
  },
  {
    "name": "UNKNOWN_CALLER",
    "phone_number": "+0987654321",
    "type": "MISSED",
    "date": "2025-05-03 18:45:00",
    "duration": "00:00:00",
    "sim_id": "SIM2"
  }
]

Retrieve Call Logs Starting at Offset 20 #

~/ $ termux-call-log --offset 20 --limit 10

Output:

[
  {
    "name": "Jane Smith",
    "phone_number": "+1122334455",
    "type": "OUTGOING",
    "date": "2025-05-02 14:30:00",
    "duration": "00:05:30",
    "sim_id": "SIM1"
  }
]

Output #

The API returns call log entries in JSON format. Each entry contains the following fields:

JSON KeyTypeDescription
nameStringThe name of the caller. If unavailable, defaults to UNKNOWN_CALLER.
phone_numberStringThe phone number of the call.
typeStringThe type of call (e.g., INCOMING, OUTGOING, MISSED, etc.).
dateStringThe date and time of the call in yyyy-MM-dd HH:mm:ss format.
durationStringThe call duration in hh:mm:ss format.
sim_idStringThe SIM card identifier (e.g., SIM1, SIM2).

Call Types #

Call TypeDescription
BLOCKEDThe call was blocked.
INCOMINGThe call was an incoming call.
MISSEDThe call was missed.
OUTGOINGThe call was an outgoing call.
REJECTEDThe call was rejected.
VOICEMAILThe call was a voicemail.
UNKNOWN_TYPEThe call type is unknown.