Skip to navigation
REST ClientLogsVoice Logs

list

View as MarkdownOpen in Claude

List voice call log entries.

Query parameters

created_beforestringOptional
Return logs created at or before this time. Accepts a date (`YYYY-MM-DD`), an ISO 8601 timestamp, or Unix time in seconds. A date is read as midnight UTC at the start of that day, so logs from that day are left out. A timestamp without `Z` or a UTC offset is read as UTC.
created_onstringOptional
Return logs created during this UTC day. Accepts the same formats as `created_before`. A timestamp selects the whole UTC day that contains it.
created_afterstringOptional
Return logs created at or after this time. Accepts the same formats as `created_before`. A date is read as midnight UTC at the start of that day, so logs from that day are included.
page_numberintegerOptional>=0Defaults to 0
The page index, starting at `0`. Any value above `0` also requires `page_token`.
page_sizeintegerOptional1-1000Defaults to 50
The number of results per page. The default is `50` and the maximum is `1000`.
page_tokenstringOptional
The cursor for any page after the first. Take it from the `links.next` or `links.prev` URL of the previous response.

Response

datalist of objectsRequired
Array of voice log entries

Response Example

Response
{
"links": {
"self": "https://example.signalwire.com/api/voice/logs?page_number=0&page_size=50",
"first": "https://example.signalwire.com/api/voice/logs?page_size=50"
},
"data": [
{
"audio_in_dtmf_packet_count": 0,
"audio_in_flush_packet_count": 2,
"audio_in_jitter_max": 8.5,
"audio_in_jitter_min": 0.25,
"audio_in_largest_jb_size": 0,
"audio_in_mean_interval": 20.03,
"audio_in_media_packet_count": 1842,
"audio_in_mos": "4.5",
"audio_in_skip_packet_count": 1,
"audio_out_dtmf_packet_count": 0,
"audio_out_jitter_avg": 0.56,
"audio_out_jitter_max": 2.5,
"audio_out_jitter_min": 0,
"audio_out_lost": 1,
"audio_out_media_packet_count": 1840,
"audio_out_packet_count": null,
"audio_rtt_avg": 40,
"audio_rtt_max": 50,
"audio_rtt_min": 30,
"billing_ms": 60000,
"charge": 0.01,
"charge_details": [],
"created_at": "2024-05-06T12:20:00Z",
"direction": "inbound",
"duration": 37,
"duration_ms": 37000,
"from": "+12065551212",
"id": "3f9a2c41-8d7e-4b6a-9c15-0e2d4f6a8b70",
"parent_id": null,
"source": "laml",
"status": "completed",
"to": "+12065553434",
"type": "laml_call",
"url": "https://example.signalwire.com/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/Calls/3f9a2c41-8d7e-4b6a-9c15-0e2d4f6a8b70"
}
]
}

Example

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
calls = client.logs.voice.list(page_size=20)
for call in calls.get("data", []):
print(call.get("from"), "->", call.get("to"), call.get("duration"))