Stop playing audio on a MPC call
This endpoint lets you stop an already playing audio file during an active call.
API Endpoint
DELETE
https://api.plivo.com/v1/DELETE/Account/{auth_id}/MultiPartyCall/{[name|uuid]_[<name|uuid>]}/Member/{member_id}/Play/
The member_id
attribute that’s passed in the URL can be a member_id
, a comma-separated list of member IDs on which this operation will be performed, or the string all
. In the latter case, the audio stops playing for all members of the conference.
Note: Use either member_id
or all
the same way you did to start playing audio to a member. If you initiated the play using member_id
, calling the stop API with all
will not stop the audio.
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_id>' , auth_token = '<auth_token>' )
response = client . multi_party_calls . stop_play_audio ( 'participant_id' ,
friendly_name = 'mpc_name' )
print ( response )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require 'plivo'
include Plivo
include Plivo :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
begin
response = api . multipartycalls . stop_play_audio (
"friendly_name" :"mpc_name" ,
"member_id" :"memberid" )
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e . message
end
1
2
3
4
5
6
7
8
9
10
11
12
var plivo = require ( ' plivo ' );
( function main () {
' use strict ' ;
var client = new plivo . Client ( ' <auth_id> ' , ' <auth_token> ' );
client . multiPartyCalls . stopPlayAudio ( memberid ,{ ' friendlyName ' : ' testmpc ' }). 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
19
20
21
22
23
24
25
<?php
require 'vendor/autoload.php' ;
use Plivo\RestClient ;
use Plivo\Exceptions\PlivoRestException ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
try {
$response = $client -> multiPartyCalls -> stopPlayAudio
(
"member_id" ,
[
"friendly_name" => "mpc_name"
]
);
print_r ( $response );
}
catch ( PlivoRestException $ex )
{
print_r ( $ex );
}
print_r ( $response );
?>
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
package com.plivo.examples.multipartycall ;
import com.plivo.api.Plivo ;
import com.plivo.api.exceptions.PlivoRestException ;
import com.plivo.api.exceptions.PlivoValidationException ;
import com.plivo.api.models.multipartycall.* ;
import com.plivo.api.util.Utils ;
import java.io.IOException ;
public class UpdateParticipant {
public static void main ( String [] args ) throws IOException , PlivoRestException , PlivoValidationException {
Plivo . init ( "<auth_id>" , "<auth_token>" );
try
{
MultiPartyCall . stopPlayAudio ( MultiPartyCallUtils . friendlyName ( "mpc_name" ), "member_id" ). delete ();
}
catch ( Exception e )
{
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>" );
var response = api . MultiPartyCall . StopPlayAudio (
participantId : "member_id" ,
friendlyName : "mpc_name"
);
Console . WriteLine ( response );
}
}
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN -X DELETE \
https://api.plivo.com/v1/Account/{ auth_id} /MultiPartyCall/name_{ mpc_name} /Member/{ member_id} /Play/
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 {
panic ( err )
}
var mutePointer = true
response , err := client . MultiPartyCall . StopPlayAudio ( plivo . MultiPartyCallParticipantParams { FriendlyName : "mpc_name" , ParticipantId : "member_id" })
if err != nil {
panic ( err )
}
fmt . Printf ( "Response: %#v \n " , response )
}
Example Request
1
2
3
4
5
6
import plivo
client = plivo . RestClient ( auth_id = '<auth_id>' , auth_token = '<auth_token>' )
response = client . multi_party_calls . stop_play_audio ( 'participant_id' ,
friendly_name = 'mpc_name' )
print ( response )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require 'plivo'
include Plivo
include Plivo :: Exceptions
api = RestClient . new ( "<auth_id>" , "<auth_token>" )
begin
response = api . multipartycalls . stop_play_audio (
"friendly_name" :"mpc_name" ,
"member_id" :"memberid" )
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e . message
end
1
2
3
4
5
6
7
8
9
10
11
12
var plivo = require ( ' plivo ' );
( function main () {
' use strict ' ;
var client = new plivo . Client ( ' <auth_id> ' , ' <auth_token> ' );
client . multiPartyCalls . stopPlayAudio ( memberid ,{ ' friendlyName ' : ' testmpc ' }). 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
19
20
21
22
23
24
25
<?php
require 'vendor/autoload.php' ;
use Plivo\RestClient ;
use Plivo\Exceptions\PlivoRestException ;
$client = new RestClient ( "<auth_id>" , "<auth_token>" );
try {
$response = $client -> multiPartyCalls -> stopPlayAudio
(
"member_id" ,
[
"friendly_name" => "mpc_name"
]
);
print_r ( $response );
}
catch ( PlivoRestException $ex )
{
print_r ( $ex );
}
print_r ( $response );
?>
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
package com.plivo.examples.multipartycall ;
import com.plivo.api.Plivo ;
import com.plivo.api.exceptions.PlivoRestException ;
import com.plivo.api.exceptions.PlivoValidationException ;
import com.plivo.api.models.multipartycall.* ;
import com.plivo.api.util.Utils ;
import java.io.IOException ;
public class UpdateParticipant {
public static void main ( String [] args ) throws IOException , PlivoRestException , PlivoValidationException {
Plivo . init ( "<auth_id>" , "<auth_token>" );
try
{
MultiPartyCall . stopPlayAudio ( MultiPartyCallUtils . friendlyName ( "mpc_name" ), "member_id" ). delete ();
}
catch ( Exception e )
{
e . printStackTrace ();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>" );
var response = api . MultiPartyCall . StopPlayAudio (
participantId : "member_id" ,
friendlyName : "mpc_name"
);
Console . WriteLine ( response );
}
}
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN -X DELETE \
https://api.plivo.com/v1/Account/{ auth_id} /MultiPartyCall/name_{ mpc_name} /Member/{ member_id} /Play/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 {
panic ( err )
}
var mutePointer = true
response , err := client . MultiPartyCall . StopPlayAudio ( plivo . MultiPartyCallParticipantParams { FriendlyName : "mpc_name" , ParticipantId : "member_id" })
if err != nil {
panic ( err )
}
fmt . Printf ( "Response: %#v \n " , response )
}
🥳 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!
Thank you for your feedback!