import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.start_recording(friendly_name='mpc_name', file_format='wav', recording_callback_url='https://plivo.com/status')
print(response)
{
  "api_id": "e05b5263-45dc-11eb-9014-0242ac110003",
  "message": "MPC: test_mpc_1 record started",
  "recording_id": "e06ac332-45dc-11eb-94fe-06dd7f581a50",
  "recording_url": "https://media.plivo.com/v1/Account/MAOTE1OWE0MDK0MTLHYW/Recording/e06ac332-45dc-11eb-94fe-06dd7f581a50.mp3"
}

This endpoint starts recording a Multiparty Call.

POST
https://api.plivo.com/v1/Account/{auth_id}/MultiPartyCall/name_{mpc_name}/Record/

Arguments

ParameterDescription
file_formatFormat of the recording.
- Allowed values: mp3, wav.
- Defaults to mp3.
recording_callback_urlURL to which status update events for this recording should be posted.
recording_callback_methodHTTP verb used to invoke the URL configured as status_callback_url.
- Allowed values: GET, POST.
- Defaults to POST.

A Supervisor’s voice will be recorded regardless of the coach_mode setting.

List of events and parameters sent to the recording_callback_url

These events are generated:

  • MPCRecordingInitiated
  • MPCRecordingPaused
  • MPCRecordingResumed
  • MPCRecordingCompleted
  • MPCRecordingFailed

This information is sent to the URL when an event is triggered:

  
EventName stringEvent that triggered this notification. This parameter will have one of the values from the list of events above.
EventTimestamp stringTimestamp at which the event occurred.
Format: YYYY-MM-DD HH:mm:ss+-hh:mm
MPCName stringFriendly name provided during the creation of the MPC.
MPCUUID stringUnique ID of the Multiparty call.
RecordingDuration stringDuration of recording in seconds.
RecordingEndTime stringTimestamp at which the recording ended.
Format: YYYY-MM-DD HH:mm:ss+-hh:mm
RecordingFormat stringFormat of the recording.
RecordingResourceURL stringResource URL of the recording file. You can use this URL to fetch the recording details later.
RecordingStartTime stringTimestamp at which the recording started.
Format: YYYY-MM-DD HH:mm:ss+-hh:mm
RecordingURL stringComplete path to the recorded file URL.
RecordingUUID stringUnique identifier to identify the file.
SequenceNumber stringIndicates the sequence of the callback. Helpful to sort the callback events posted to the recording_callback_url.

Returns

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

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="<auth_token>")

response = client.multi_party_calls.start_recording(friendly_name='mpc_name', file_format='wav', recording_callback_url='https://plivo.com/status')
print(response)
{
  "api_id": "e05b5263-45dc-11eb-9014-0242ac110003",
  "message": "MPC: test_mpc_1 record started",
  "recording_id": "e06ac332-45dc-11eb-94fe-06dd7f581a50",
  "recording_url": "https://media.plivo.com/v1/Account/MAOTE1OWE0MDK0MTLHYW/Recording/e06ac332-45dc-11eb-94fe-06dd7f581a50.mp3"
}