Latest Legacy

Stop a specific audio Stream

This method stops streaming of a specific audio stream.

API Endpoint

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

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_specific_stream('ebe4ab56-9b72-4c3e-9870-5f4262847407','f6efd24d-e592-4db5-baf9-6ad36ac54728')
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_stream("c533f310-10af-428c-8f3d-b45a01606229","bc3e82f1-a2d0-4c96-9620-adf97d2ba3ce")
  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
// Stop a specific audio stream on a call

'use strict';

var plivo = require('plivo');

(function main() {
    var client = new plivo.Client(<auth_id>, <auth_token>);
    client.calls.stopStream(<call_uuid>,
        <stream_id>
    ).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
<?php
/**
 * Stop a specific audio stream on a call
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");
try {
    
     $response = $client->calls->stopSpecificStream(
        "62993d16-7e42-4bae-9ac7-55015e35c788",
        "dc110403-bbc9-4d94-a564-d2939348f703"
    );
    
}
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
36
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 a specific audio stream on a call
 */
class stopSpecificAudioStreaming {

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

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

    try {

      Call.streamStopSpecific("eba53b9e-8fbd-45c1-9444-696d2172fbc8", "stream-id")
        .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 a specific audio stream 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
            {
                 api.Call.StopStream("eff5f2da-58a9-4447-b484-bee21870638c","{stream_uuid}");
                
            }
            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/{Stream_uuid}/
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 a specific audio stream 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.StopSpecificStream("61fa0825-3018-4508-9a3a-922247b1052d", "f60342d1-eb0a-42b0-974b-2fd900b07ed1")

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

}