import plivo

client = plivo.RestClient(auth_id='<auth_id>', auth_token='<auth_token>')
response = client.masking_sessions.delete_masking_session("session_uuid")
print(response)

Session recording callback

Configure the “recording callback URL” to receive recording-related callback events

Attributes

NameTypeDescription
SessionRecordingInitiatedeventTriggered when the first party and the second party are connected via the virtual phone number and the recording begins.
SessionRecordingCompletedeventTriggered when one of the parties disconnects the call.
SessionRecordingFailedeventTriggered when the record attribute is set to true for a masking session but the recording could not be started.

Recording callback attributes

For each event, the below attributes will be posted to your web server.
NameTypeDescription
EventNamestringEvent that triggered this callback. This parameter will have one of the values from the list of events above.
EventTimestampstringTimestamp at which the event occurred.
FromstringActual from number used to interact with the virtual number.
RecordingDurationstringDuration of recording in seconds.
RecordingEndTimestringUTC Timestamp at which the recording ended.
RecordingFormatstringFormat of the recording. Possible values: .mp3, .wav.
RecordingResourceURLstringComplete URL path to the recording resource URL.
RecordingStartTimestringUTC Timestamp at which the recording started.
RecordingURLstringActual media URL path of the recording.
RecordingUUIDstringUnique identifier of the recording file.
SequenceNumberstringIndicates the sequence of the callback. It’s helpful to sort the callback events posted to the recording_callback_url.
SessionUUIDstringUnique ID of the masking session.
TostringActual to number dialing out from the virtual number.
VirtualNumberstringThe virtual number used in the session.
import plivo

client = plivo.RestClient(auth_id='<auth_id>', auth_token='<auth_token>')
response = client.masking_sessions.delete_masking_session("session_uuid")
print(response)