Pause/Unpause Audio Stream
curl --request POST \
--url https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause \
--header 'Content-Type: application/json' \
--data '{
"paused": true
}'import requests
url = "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause"
payload = { "paused": True }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({paused: true})
};
fetch('https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paused' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause"
payload := strings.NewReader("{\n \"paused\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause")
.header("Content-Type", "application/json")
.body("{\n \"paused\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paused\": true\n}"
response = http.request(request)
puts response.read_body{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}Realtime Calls
Pause/Unpause Audio Stream
Pause or unpause playback of a live or recorded audio stream. While paused, silence is injected to keep the RTMP stream alive and the playback offset is frozen. On unpause, playback resumes from the frozen position.
POST
/
realtime
/
v1
/
call
/
{id}
/
audio
/
stream
/
{streamId}
/
pause
Pause/Unpause Audio Stream
curl --request POST \
--url https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause \
--header 'Content-Type: application/json' \
--data '{
"paused": true
}'import requests
url = "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause"
payload = { "paused": True }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({paused: true})
};
fetch('https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paused' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause"
payload := strings.NewReader("{\n \"paused\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause")
.header("Content-Type", "application/json")
.body("{\n \"paused\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://realtime.govworx.net/realtime/v1/call/{id}/audio/stream/{streamId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"paused\": true\n}"
response = http.request(request)
puts response.read_body{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}{
"streamId": "<string>",
"paused": true,
"positionSeconds": 123,
"mode": "live",
"bufferDurationSeconds": 123,
"pauseExpiresAtEpochSecond": 123
}Body
application/json
Response
Pause state applied successfully
Playback mode. 'live' = at the live playhead; 'replay' = the call is still live but playback is offset behind the live playhead; 'recorded' = playing back a completed call recording.
Available options:
live, replay, recorded Epoch second when the pause will expire and the session will be closed. Null when the stream is not paused or when pause timeout is disabled. Re-sending the pause request resets this timer (heartbeat).
⌘I

