curl --request GET \
--url https://api.example.com/api/v1/voice/recordings/{recording_id}{
"recording_id": "<string>",
"status": "<string>",
"duration": 123,
"recording_url": "<string>",
"created_at": "<string>",
"processed_at": "<string>"
}Retrieve the status and details of a voice recording
curl --request GET \
--url https://api.example.com/api/v1/voice/recordings/{recording_id}{
"recording_id": "<string>",
"status": "<string>",
"duration": 123,
"recording_url": "<string>",
"created_at": "<string>",
"processed_at": "<string>"
}recording, completed, processing, or failedcurl http://localhost:8000/api/v1/voice/recordings/conf_1234567890
{
"recording_id": "conf_1234567890",
"status": "completed",
"duration": 342,
"recording_url": "https://voice.africastalking.com/recording/abc123def456",
"created_at": "2024-01-15T10:00:00.000Z",
"processed_at": "2024-01-15T10:05:42.000Z"
}
{
"recording_id": "conf_1234567890",
"status": "recording",
"duration": null,
"recording_url": null,
"created_at": "2024-01-15T10:00:00.000Z",
"processed_at": null
}
{
"detail": "Recording not found"
}
200 - Recording found and status returned404 - Recording ID not found500 - Failed to query recording status| Status | Description |
|---|---|
recording | Conference call is active and being recorded |
processing | Recording complete, processing audio |
completed | Recording processed and available |
failed | Recording or processing failed |
async function waitForRecording(recordingId) {
const maxAttempts = 30;
const pollInterval = 2000; // 2 seconds
for (let i = 0; i < maxAttempts; i++) {
const response = await fetch(
`http://localhost:8000/api/v1/voice/recordings/${recordingId}`
);
const data = await response.json();
if (data.status === 'completed' && data.recording_url) {
return data;
}
if (data.status === 'failed') {
throw new Error('Recording failed');
}
await new Promise(resolve => setTimeout(resolve, pollInterval));
}
throw new Error('Recording timeout');
}
voice_recordings table to retrieve recording metadata. The recording status and URL are updated by the voice webhook when Africa’s Talking sends the callback.
Source: voice.py:261-289