import plivo

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

response = client.multi_party_calls.start_participant_recording(memberid,uuid='uuid',file_format='mp3')
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 lets you start recording for a particular participant.

POST
https://api.plivo.com/v1/Account/{auth_id}/MultiPartyCall/{mpc_name/UUID}/Participant/{Member_Id}/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 recording_callback_url.
• Allowed values: GET, POST.
• Defaults to POST.
record_track_type (string)Indicates if the recording track is at the participant level or includes all channels.
Possible values: participant / all / both
• participant: Initiates single-track or participant-level recording for the provided member_id.
• all: Initiates multi-channel recording for the specified participant.
• both: Initiates both single-track/participant-level and all-channel recordings.
Default: all

List of events and parameters sent to the recording_callback_url

These events are generated:

  • ParticipantRecordingInitiated
  • ParticipantRecordingPaused
  • ParticipantRecordingResumed
  • ParticipantRecordingCompleted
  • ParticipantRecordingFailed

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

ParameterDescription
EventName (string)Event that triggered this notification. This parameter will have one of the values from the list of events above.
EventTimestamp (string)Timestamp at which the event occurred.
Format: YYYY-MM-DD HH:mm:ss+|-hh:mm
MemberID (string)The ID of the participant in the MPC. This ID is unique for each participant.
RecordingDuration (string)Duration of recording in seconds.
RecordingEndTime (string)Timestamp at which the recording ended.
Format: YYYY-MM-DD HH:mm:ss+|-hh:mm
RecordingFormat (string)Format of the recording.
RecordingResourceURL (string)Resource URL of the recording file. You can use this URL to fetch the recording details later.
RecordingStartTime (string)Timestamp at which the recording started.
Format: YYYY-MM-DD HH:mm:ss+|-hh:mm
RecordingURL (string)Complete path to the recorded file URL.
RecordingUUID (string)Unique identifier to identify the file.
SequenceNumber (string)Indicates 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_participant_recording(memberid,uuid='uuid',file_format='mp3')
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"
}