Help Center> Live> User Guide> Stream Configurations> Configuring Stream Status Notifications

Configuring Stream Status Notifications

You can add a callback URL for receiving notifications on starting or ending stream push on the Live console. The system sends a POST request to your server through an HTTP API. The server returns a status code 200. Then you will be notified whether stream pushing has started or ended.

Prerequisites

  • Domain names have been added.
  • CNMAE records have been added to your domains' DNS records.

Adding a Notification URL

  1. Log in to the Live console.
  2. In the navigation pane, choose Domains.
  3. Click Settings in the row containing the target ingest domain name.
  4. In the navigation pane, choose Template Settings > Stream Status Notifications.
  5. Click Add. On the page displayed, add a notification URL, as shown in Figure 1.

    Only HTTP and HTTPS URLs are supported.

    Figure 1 Adding a notification URL

  6. Click OK.

    When you start pushing a stream or end stream pushing, you will receive a callback message. For details, see Callback Example.

Managing Notification URLs

You can perform the following operations as needed:

  • Modify the notification URL.

    Click Edit in the Operation column.

    Figure 2 Modifying the notification URL
  • Delete the notification URL.

    Click Delete in the Operation column.

    Figure 3 Deleting the notification URL

Callback Example

The following is an example of a stream start or end message. Table 1 describes the fields in a callback message body.

{
    "domain":"push.example.com",
    "app":"live",
    "stream":"example_stream",
    "user_args":"auth_info=yz1TG0PVN/5isfyrGrRj10gKPCWqSS2X02t6QsRrocH+mEq0gQ0g8k6KhalS84sQ+kDprFyqI0yajbYiFmUO8e45B7ryaS+MpJBlYkhwnuFLnRiKK/IXG7.33436b625354564f6e4d4d434f55&cdn=hw",
    "client_ip":"100.125.58.90",
    "node_ip":"112.12.196.218",
    "publish_timestamp":"1587954134,",
    "event":"PUBLISH"
}
Table 1 Message body

Field

Description

domain

Ingest domain name

app

Application name

stream

Stream name

user_args

Stream pushing parameter

client_ip

IP address of the streaming device

node_ip

IP address of the node that receives the stream

publish_timestamp

Unix timestamp. One single timestamp is generated for each stream pushing event.

event

Stream pushing or stream disconnection.

Possible values are:

  • PUBLISH: Stream pushing starts.
  • PUBLISH_DONE: Stream pushing ends.