Latest Legacy

Stop all audio Streams

This method stops all the audio streaming of the given call.

API Endpoint

DELETEhttps://api.plivo.com/v1/Account/{auth_id}/Call/{call_uuid}/Stream/

Arguments

No arguments need to be passed.

Response

HTTP Status Code: 204

Error

HTTP status code: 400

{
"api_id": "79cf3765-0f65-11ee-809f-0242ac110003",
"error": "No active stream found"
}

Example Request

1
2
3
import plivo
client = plivo.RestClient('<auth_id>','<auth_token>')
client.calls.delete_all_streams('ebe4ab56-9b72-4c3e-9870-5f4262847407')
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.calls.stop_all_streams("c533f310-10af-428c-8f3d-b45a01606229")
  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
// Stop all audio streams on a call

'use strict';

var plivo = require('plivo');

(function main() {
    var client = new plivo.Client(<auth_id>, <auth_token>);
    client.calls.stopAllStream(<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
/**
 * Stop all audio streams on a call
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");
try {
    
    $client->calls->stopStream(
        "62993d16-7e42-4bae-9ac7-55015e35c788"
    );
    
}
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
24
25
26
27
28
29
30
31
32
33
34
35
package com.plivo.examples.audioStream;

import java.io.IOException;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.exceptions.PlivoValidationException;
import com.plivo.api.models.base.ListResponse;
import com.plivo.api.models.call.Call;
import com.plivo.api.models.call.CallCreateResponse;
import com.plivo.api.models.call.actions.CallStreamCreateResponse;
import com.plivo.api.models.call.actions.CallStreamCreator;
import com.plivo.api.models.call.actions.CallStreamGetSpecificResponse;

/**
 * Stop all audio streams on a call
 */
class stopAllAudioStreaming {

  public static void main(String [] args) throws PlivoRestException, PlivoValidationException, IOException {

    Plivo.init("<auth_id>","<auth_token>");

    try {

      Call.streamStopper("eba53b9e-8fbd-45c1-9444-696d2172fbc8").stop();

    } 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
21
22
23
24
25
26
27
/**
 * Stop all audio streams on a call
 */
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.StopAllStreams("b1c42cfa-2144-4749-b785-3230cf2cbfdd");
                Console.Write(response);
            }
            catch (PlivoRestException e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
    }
}
1
2
 curl -i --user AUTH_ID:AUTH_TOKEN -X DELETE \
    https://api.plivo.com/v1/Account/{auth_id}/Call/{call_uuid}/Stream/
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 Audio_Streaming

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

// Stop all audio streams on a call
//package main

func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}

err = client.Calls.StopAllStreams("4f48bad1-2dff-401c-9e30-56dbcbb7c7bd")

if err != nil {
fmt.Print("Error", err.Error())
return
}

}