Start streaming
curl --request POST \
--url https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data '
{
"namespace": "siprec",
"guid": "0867617078-0032318833-2221801472-0002236962",
"customerId": "customerId",
"agentId": "agentId",
"autotranscribeParams": {
"language": "en-US"
},
"siprecParams": {
"mediaLineOrder": "CUSTOMER_FIRST"
}
}
'import requests
url = "https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming"
payload = {
"namespace": "siprec",
"guid": "0867617078-0032318833-2221801472-0002236962",
"customerId": "customerId",
"agentId": "agentId",
"autotranscribeParams": { "language": "en-US" },
"siprecParams": { "mediaLineOrder": "CUSTOMER_FIRST" }
}
headers = {
"asapp-api-id": "<api-key>",
"asapp-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'asapp-api-id': '<api-key>',
'asapp-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
namespace: 'siprec',
guid: '0867617078-0032318833-2221801472-0002236962',
customerId: 'customerId',
agentId: 'agentId',
autotranscribeParams: {language: 'en-US'},
siprecParams: {mediaLineOrder: 'CUSTOMER_FIRST'}
})
};
fetch('https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming', 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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming",
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([
'namespace' => 'siprec',
'guid' => '0867617078-0032318833-2221801472-0002236962',
'customerId' => 'customerId',
'agentId' => 'agentId',
'autotranscribeParams' => [
'language' => 'en-US'
],
'siprecParams' => [
'mediaLineOrder' => 'CUSTOMER_FIRST'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"asapp-api-id: <api-key>",
"asapp-api-secret: <api-key>"
],
]);
$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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming"
payload := strings.NewReader("{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("asapp-api-id", "<api-key>")
req.Header.Add("asapp-api-secret", "<api-key>")
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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming")
.header("asapp-api-id", "<api-key>")
.header("asapp-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["asapp-api-id"] = '<api-key>'
request["asapp-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}"
response = http.request(request)
puts response.read_body{
"isOk": true,
"autotranscribeResponse": {
"customer": {
"streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
"status": {
"code": 1000,
"description": "OK"
}
},
"agent": {
"streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
"status": {
"code": 1000,
"description": "OK"
}
}
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "400-01",
"message": "Bad request"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "401-01",
"message": "Unauthorized"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "403-01",
"message": "Forbidden Response"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "404-01",
"message": "Not Found"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "409-01",
"message": "Conflict"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "413-01",
"message": "Request Entity Too Large"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "422-01",
"message": "Unprocessable Entity"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "429-01",
"message": "Too Many Requests"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "503-01",
"message": "Service Unavailable"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "500-01",
"message": "Internal server error"
}
}Media Gateway
Start streaming
This starts the transcription of the audio stream.
Use in conjunction with the stop-streaming endpoint to control when transcription occurs for a given call. This allow you to prevent transcription of sensitive parts of a conversation, such as entering PCI data.
POST
/
mg-autotranscribe
/
v1
/
start-streaming
Start streaming
curl --request POST \
--url https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data '
{
"namespace": "siprec",
"guid": "0867617078-0032318833-2221801472-0002236962",
"customerId": "customerId",
"agentId": "agentId",
"autotranscribeParams": {
"language": "en-US"
},
"siprecParams": {
"mediaLineOrder": "CUSTOMER_FIRST"
}
}
'import requests
url = "https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming"
payload = {
"namespace": "siprec",
"guid": "0867617078-0032318833-2221801472-0002236962",
"customerId": "customerId",
"agentId": "agentId",
"autotranscribeParams": { "language": "en-US" },
"siprecParams": { "mediaLineOrder": "CUSTOMER_FIRST" }
}
headers = {
"asapp-api-id": "<api-key>",
"asapp-api-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'asapp-api-id': '<api-key>',
'asapp-api-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
namespace: 'siprec',
guid: '0867617078-0032318833-2221801472-0002236962',
customerId: 'customerId',
agentId: 'agentId',
autotranscribeParams: {language: 'en-US'},
siprecParams: {mediaLineOrder: 'CUSTOMER_FIRST'}
})
};
fetch('https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming', 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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming",
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([
'namespace' => 'siprec',
'guid' => '0867617078-0032318833-2221801472-0002236962',
'customerId' => 'customerId',
'agentId' => 'agentId',
'autotranscribeParams' => [
'language' => 'en-US'
],
'siprecParams' => [
'mediaLineOrder' => 'CUSTOMER_FIRST'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"asapp-api-id: <api-key>",
"asapp-api-secret: <api-key>"
],
]);
$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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming"
payload := strings.NewReader("{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("asapp-api-id", "<api-key>")
req.Header.Add("asapp-api-secret", "<api-key>")
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://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming")
.header("asapp-api-id", "<api-key>")
.header("asapp-api-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.asapp.com/mg-autotranscribe/v1/start-streaming")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["asapp-api-id"] = '<api-key>'
request["asapp-api-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"namespace\": \"siprec\",\n \"guid\": \"0867617078-0032318833-2221801472-0002236962\",\n \"customerId\": \"customerId\",\n \"agentId\": \"agentId\",\n \"autotranscribeParams\": {\n \"language\": \"en-US\"\n },\n \"siprecParams\": {\n \"mediaLineOrder\": \"CUSTOMER_FIRST\"\n }\n}"
response = http.request(request)
puts response.read_body{
"isOk": true,
"autotranscribeResponse": {
"customer": {
"streamId": "5ce2b755-3f38-11ed-b755-7aed4b5c38d5",
"status": {
"code": 1000,
"description": "OK"
}
},
"agent": {
"streamId": "cf31116-3f38-11ed-9116-7a0a36c763f1",
"status": {
"code": 1000,
"description": "OK"
}
}
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "400-01",
"message": "Bad request"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "401-01",
"message": "Unauthorized"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "403-01",
"message": "Forbidden Response"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "404-01",
"message": "Not Found"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "409-01",
"message": "Conflict"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "413-01",
"message": "Request Entity Too Large"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "422-01",
"message": "Unprocessable Entity"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "429-01",
"message": "Too Many Requests"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "503-01",
"message": "Service Unavailable"
}
}{
"error": {
"requestId": "8e033668-9f1a-11ec-b909-0242ac120002",
"code": "500-01",
"message": "Internal server error"
}
}Body
application/json
The media gateway platform or protocol you are using.
Available options:
siprec, twilio, amazonconnect, genesysaudiohook The globally unique Id for the call, also sometimes called Unique Call Id (UCID). Must be in decimal form.
Id of the customer on the call. Usually taken from Call Center CTI information.
The Id of the agent on the call. Usually taken from Call Center CTI information.
Show child attributes
Show child attributes
Example:
{
"language": "en-US",
"detailedToken": false,
"audioRecordingAllowed": false,
"redactionOutput": "redacted"
}Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{
"trackMap": {
"inbound": "customer",
"outbound": "agent"
}
}Show child attributes
Show child attributes
Example:
{
"streamArn": "arn:aws:kinesisvideo:us-east-1:000000000000:stream/streamtest-connect-asappconnect-contact-1117e864-690f-4e1e-9dcf-6fbfcc288e41/1654194145007",
"startSelectorType": "FRAGMENT_NUMBER",
"afterFragmentNumber": "91343852333181476958523476930058290730435475343"
}Was this page helpful?
⌘I