REST ClientLogsVoice Logs

get

View as MarkdownOpen in Claude

Retrieve a specific voice call log entry.

Path parameters

idstringRequiredformat: "uuid"
Unique ID of the log. This is the segment_id you can find in Relay call details in your Dashboard UI or in return objects when using the SDK.

Response

Call LogobjectRequired
Voice log for Compatibility and Relay call types. Returned when `type` is `laml_call`, `relay_pstn_call`, `relay_sip_call`, or `relay_webrtc_call`.
OR
Video Room Audio Leg LogobjectRequired
Voice log for audio legs in a Video Room. Returned when `type` is `video_room_pstn_leg` or `video_room_sip_leg`.
OR
Dialogflow LogobjectRequired
Voice log for Dialogflow call types. Returned when `type` is `dialogflow_call`.
OR
Fabric Device LogobjectRequired
Voice log for Fabric Subscriber Device call types. Returned when `type` is `fabric_subscriber_device_leg`.
OR
Deleted LogobjectRequired
A discarded/deleted voice log entry. Returned when the log has been deleted. Only present when `include_deleted` is `true`.

Response Example

Response
1{
2 "id": "b7182dc2-00f3-40e4-a5ce-20f164b329df",
3 "from": "+12065551212",
4 "to": "+12065553434",
5 "source": "realtime_api",
6 "charge": 0.01,
7 "charge_details": [],
8 "created_at": "2024-05-06T12:20:00Z",
9 "type": "relay_sip_call",
10 "url": null,
11 "direction": "inbound",
12 "status": "completed",
13 "duration": 9,
14 "duration_ms": 9638,
15 "billing_ms": 60000,
16 "parent_id": null
17}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9call = client.logs.voice.get("voice-log-id")
10print(call.get("from"), "->", call.get("to"), call.get("duration"))