Latest Legacy

Session recording callback

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

SessionRecordingInitiated

Triggered when the first party and the second party are connected via the virtual phone number and the recording begins.

SessionRecordingCompleted

Triggered when one of the parties disconnects the call.

SessionRecordingFailed

Triggered 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.

EventName (string)

Event that triggered this callback. This parameter will have one of the values from the list of events above.

EventTimestamp (string)

Timestamp at which the event occurred.

From (string)

Actual from number used to interact with the virtual number.

RecordingDuration (string)

Duration of recording in seconds.

RecordingEndTime (string)

UTC Timestamp at which the recording ended.

RecordingFormat (string)

Format of the recording.
Possible values: .mp3, .wav

RecordingResourceURL (string)

Complete URL path to the recording resource URL.

RecordingStartTime (string)

UTC Timestamp at which the recording started.

RecordingURL (string)

Actual media URL path of the recording.

RecordingUUID (string)

Unique identifier of the recording file.

SequenceNumber (string)

Indicates the sequence of the callback. It’s helpful to sort the callback events posted to the recording_callback_url.

SessionUUID (string)

Unique ID of the masking session.

To (string)

Actual to number dialing out from the virtual number.

VirtualNumber (string)

The virtual number used in the session.

Example Request

1
2
3
4
5
import plivo

client = plivo.RestClient(auth_id='<auth_id>', auth_token='<auth_token>')
response = client.masking_sessions.delete_masking_session("session_uuid")
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
var plivo = require('plivo');

(function main() {
    'use strict';

    var client = new plivo.Client("<auth_id>", "<auth_token>");
    client.maskingSession.deleteMaskingSession("SessionUUID"
    ).then(function (response) {
        console.log(response);
    }, function (err) {
        console.error(err);
    });
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * Example for Delete Session
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>", "<auth_token>");
try {
    $response = $client->maskingSessions->deleteMaskingSession(
        'SessionUUID'
    );

    print_r($response);
}
catch (PlivoRestException $ex) {
    print_r($ex);
}
1
2
curl -X DELETE "https://api.plivo.com/v1/Account/{Auth ID}/Masking/Session/{session_uuid}" \
-H "Content-Type: application/json" \
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package main

import (
       "fmt"
       "github.com/plivo/plivo-go/v7"
)

func main() {
       client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
       if err != nil {
               fmt.Print("Error", err.Error())
               return
       }
       response, err := client.MaskingSession.DeleteMaskingSession("SessionUUID")
       if err != nil {
               fmt.Print("Error", err.Error())
               return
       }
       fmt.Printf("Response: %#v\n", response)
}