Callback server
SSR provides a callback mechanism to notify you when a recording job is complete. This allows you to take action on the recording once it is complete.
Set up a callback server
- To set up a callback server, you need to create a server that can receive a POST request from the SSR API. The request will contain a JSON payload with the job's status.
- SSR makes a request to any URL in the
callbackUri
field of the request. If you specify acallbackKey
Vivox includes this in the header of the request underAuthorization
.
Callback payload
The payload of the callback contains the following fields:
{
"job_status": "string",
"job_id": "string",
"code": "string",
"metadata": "object"
}
job_status
will either becomplete
,fail
, orpartial
.- When a job is
partial
, this means that not all of the audio recorded or decoded successfully.
- When a job is
job_id
is the ID of the job. It corresponds tojob_id
in the response of the original request.code
is the error code if the job failed. Refer to error codes for more information.metadata
is any metadata you passed in the original request. If you did not set anymetadata
this field will be omitted from the request.
Error codes
Code | Description |
---|---|
2001 | Service is not enabled. |
2002 | Internal service error. |
2003 | No audio was found for the channel requested. |
2004 | Invalid Storage. |
2005 | Internal service error. |
2006 | No audio decoded due to filterUri parameters. |
2103 | Unsupported audio format. |
2107 | AWS bucket is throttled. |