import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.conferences.record(
    conference_name='testing', )
print(response)
{
"api_id": "2867b6e2-58c3-11e1-86da-adf28403fe48",
"message": "conference recording started",
"recording_id": "93bc7c6a-3b2b-11e3",
"url": "https://media.plivo.com/v1/Account/<Auth_ID>/Recording/93bc7c6a-3b2b-11e3.mp3",
}

This API lets you start recording an ongoing conference after the conference is initiated. Alternatively, you can record a conference by using the recording capabilities of the Conference XML element.

API Endpoint

POST
https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Record/

The member_id attribute that’s passed in the URL can be a member_id, a comma-separated list of member IDs on which this operation will be performed, or the string all. In the latter case, the play audio action is performed on all members of the conference.

Attributes

AttributesDescription
file_formatThe file format for the recording.
Allowed values: mp3, wav.
Defaults to mp3.
transcription_typeauto: Transcription is automated; the turnaround time is under 5 minutes and increases linearly with call duration.
Transcription charges and details are available on our pricing page.
NoteTranscription service is available only in English, and limited to calls with a duration greater than 500 milliseconds and less than 4 hours, with a recording file size smaller than 2GB.
transcription_url [Callback-retry configurable]The URL to which the transcription should be posted.
NoteThe transcription information will be sent to this URL via an HTTP POST callback.
callback_url [Callback-retry configurable]The URL invoked when the recording ends. The parameters to be posted to the URL are documented in the table below.
callback_methodThe HTTP verb used to invoke the callback_url.
Defaults to POST.

List of parameters sent to the callback URL

These details are posted when the callback URL is invoked after the recording ends.

  
api_idThe API ID that was returned by the conference record API.
record_urlThe URL where the recorded file can be accessed.
recording_idThe recording ID associated with the recording file.
conference_nameThe name of the conference recorded.
recording_durationThe recording duration in seconds.
recording_duration_msThe recording duration in milliseconds.
recording_start_msThe start time of the recording since epoch in milliseconds.
recording_end_msThe end time of the recording since epoch in milliseconds.

List of parameters sent to the transcription URL

  
transcription_chargeThe credit deducted for the transcription.
transcriptionThe transcribed text of the recording.
durationThe duration in seconds of the recording.
call_uuidThe call UUID of the call that was transcribed.
transcription_rateThe rate of the transcription per minute.
recording_idRecording ID of the transcribed recording.
errorMay be Recording duration too long for transcription or Recording file size too large for transcription. Empty if transcription is successful.

.mp3 files are smaller in size than .wav files. Consider changing the recording file format to .mp3 if you see this error.

Returns

If successful, returns an acknowledgement that conference recording has started along with a URL to access the recording.

import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.conferences.record(
    conference_name='testing', )
print(response)
{
"api_id": "2867b6e2-58c3-11e1-86da-adf28403fe48",
"message": "conference recording started",
"recording_id": "93bc7c6a-3b2b-11e3",
"url": "https://media.plivo.com/v1/Account/<Auth_ID>/Recording/93bc7c6a-3b2b-11e3.mp3",
}