RTSP Audio
You can configure a device to stream audio to an RTSP server.
The RTSP audio API consists of three operations:
Request a Stream
Send the device the URL of the RTSP server to which it should stream audio.
Ping
Ping the device to keep the stream active.
Stop
Send a stop command to end the stream.
Request
Request that a device stream audio to a specified RTSP server.
Topic
Publish to: api_client/<client_name>/<location_id>/<device_id>/stream/rtsp/audio/out
Payload
{
"host": "example.com",
"path": "stream/f3e2c1d4-5b6a-7c8d-9e0f-1a2b3c4d5e6f",
"port": 443,
"username": "myuser",
"password": "mypassword"
}host: The hostname of the RTSP server to which the device will stream audio.path: The path on the RTSP server to which the device will stream audio.port: The port to use for the RTSP connection.username: The username to use for basic authentication with the RTSP server, optional.password: The password to use for basic authentication with the RTSP server, optional.
Sending this payload starts a one-way audio stream from the device to the specified RTSP server using the rtsps:// protocol and the Opus audio codec.
Ping
Ping the device to keep the RTSP stream active. The device stops streaming if it does not receive a ping for 60 seconds.
Topic
Publish to: api_client/<client_name>/<location_id>/<device_id>/stream/rtsp/audio/out/ping
Payload
{
"host": "example.com",
"path": "stream/f3e2c1d4-5b6a-7c8d-9e0f-1a2b3c4d5e6f",
"port": 443
}Stop
Stop the RTSP stream.
Topic
Publish to: api_client/<client_name>/<location_id>/<device_id>/stream/rtsp/audio/out/stop
Payload
{
"host": "example.com",
"path": "stream/f3e2c1d4-5b6a-7c8d-9e0f-1a2b3c4d5e6f",
"port": 443
}