Stop playing audio on a call
This endpoint lets you stop an already playing audio file during an active call.
API Endpoint
DELETE
https://api.plivo.com/v1/Account/{auth_id}/Call/{call_uuid}/Play/
Arguments
No arguments need to be passed.
Response
HTTP Status Code: 204
Example Request
1
2
3
4
5
6
import plivo
client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.calls.play_stop(
call_uuid='bc480f62-6d99-469e-b80e-090e620de824', )
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Example for Call Play Delete
#
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions
api = RestClient.new("<auth_id>","<auth_token>")
begin
response = api.calls.stop_play(
'eba53b9e-8fbd-45c1-9444-696d2172fbc8',
)
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Example for Call Play delete
var plivo = require('plivo');
(function main() {
'use strict';
// If auth id and auth token are not specified, Plivo will fetch them from the environment variables.
var client = new plivo.Client("<auth_id>","<auth_token>");
client.calls.stopPlayingMusic(
"eba53b9e-8fbd-45c1-9444-696d2172fbc8", // call uuid
).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 Call Play delete
*/
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");
try {
$response = $client->calls->stopPlaying(
'eba53b9e-8fbd-45c1-9444-696d2172fbc8'
);
print_r($response);
}
catch (PlivoRestException $ex) {
print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.plivo.api.samples.call.play;
import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.call.Call;
/**
* Example for Call Play delete
*/
class PlayDelete {
public static void main(String [] args) {
Plivo.init("<auth_id>","<auth_token>");
try {
Call.playStopper("eba53b9e-8fbd-45c1-9444-696d2172fbc8")
.playStop();
System.out.println("Deleted successfully.");
} catch (PlivoRestException | IOException e) {
e.printStackTrace();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Example for Call Play Delete
*/
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;
namespace PlivoExamples
{
internal class Program
{
public static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>","<auth_token>");
try
{
var response = api.Call.StopPlaying(
callUuid:"10c94053-73b4-46fe-b74a-12159d1d3d60"
);
Console.WriteLine(response);
}
catch (PlivoRestException e)
{
Console.WriteLine("Exception: " + e.Message);
}
}
}
}
1
2
curl -X DELETE --user AUTH_ID:AUTH_TOKEN \
https://api.plivo.com/v1/Account/{auth_id}/Call/{call_uuid}/Play/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Example for Call Play delete
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
}
err = client.Calls.StopPlaying(
"eba53b9e-8fbd-45c1-9444-696d2172fbc8",
)
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Println("Deleted successfully.")
}
Rate this page
🥳 Thank you! It means a lot to us!
×
Help Us Improve
Thank you so much for rating the page, we would like to get your input for further improvements!
Subscribe to Updates
Thank you for your feedback!