- What's New
- Service Overview
-
Billing
- Billing Items
- Basic Service Billing
- Value-added Service Billing
- Billing Modes
- Changing the Billing Option
- Bills
- Arrears
- Billing Termination
-
Billing FAQs
-
Common Cases
- What Do I Need to Pay?
- Do I Need to Buy the CDN Service Before Using Live?
- How Do I Change the Billing Option?
- Do I Need to Delete Resources If I Don't Want to Use Live Any More?
- How Do I View the Usage and Expenditure of Pay-per-Use Live Resources?
- Is Downstream Traffic or Upstream Traffic Billed?
- Will I Be Billed for URL Validation?
- How Is Transcoding Billed?
- Does the Daily Peak Bandwidth Mean the Upstream Bandwidth or Downstream Bandwidth?
- Why Is a Recording Fee Deducted on the First Day of Each Month?
- Arrears
-
Common Cases
- Cloud Live
-
Media Live
- Overview
- Scenarios
- Functions
- Product Advantages
- Constraints
- Getting Started
-
Console Operations
- Prerequisites
- Functions
- Permissions Management
- Domain Name Management
- Channels
- Live Transcoding
- Service Monitoring
- Cloud Resource Authorization
- Tools
- Best Practices
-
Cloud Live API Reference
- Before You Start
- API Overview
- Calling APIs
- Examples
-
Domain Name Management
- Creating a Domain Name
- Deleting a Domain Name
- Modifying a Domain Name
- Querying a Domain Name
- Mapping Domain Names
- Deleting a Domain Name Mapping
- Configuring the Domain Name IPv6 Function
- Querying IP Address Information
- Modifying the Streaming Domain Name Delay
- Querying the Streaming Domain Name Delay
- Modifying the HLS Configuration of a Domain Name
- Querying HLS Configurations of Domain Names
- Modifying Origin Pull Settings
- Querying Origin Pull Settings
- Notification Management
-
Authentication Management
- Configuring a Referer Validation ACL
- Deleting a Referer Validation ACL
- Querying Referer Validation ACLs
- Querying IP Address ACLs
- Modifying an IP Address ACL
- Generating a Signed URL
- Querying Supported Areas of a Streaming Domain Name
- Modifying Supported Areas of a Streaming Domain Name
- Querying the URL Validation Configuration of a Specified Domain Name
- Modifying the URL Validation Configuration of a Specified Domain Name
- Deleting the URL Validation Configuration of a Specified Domain Name
- Snapshot Management
- Recording Management
- Recording Callback Management
- HTTPS Certificate Management
- OBS Bucket Management
- Transcoding Template Management
- Stream Management
-
Statistics Analysis
- Querying Peak Bandwidth
- Querying Total Traffic
- Querying HTTP Status Codes for Pulling Live Streams
- Querying the Duration of Transcoded Outputs
- Querying Recording Channels
- Querying the Number of Snapshots
- Querying Upstream Bandwidth
- Querying the Number of Stream Channels
- Querying the Historical Stream List
- Querying the Playback Profile
- Querying the Distribution of Live Streaming Metrics by Region
- Stream Analytics
- Appendix
- Change History
-
Media Live API Reference
- Before You Start
- API Overview
- Calling APIs
- Examples
-
OTT Channel Management
- Creating an OTT Channel
- Querying Channel Information
- Deleting Channel Information
- Modifying Channel Packaging Information
- Modifying Channel Input Stream Information
- Modifying Channel Recording Information
- Modifying General Channel Information
- Changing the Channel Status
- Modifying Channel Transcoding Template Information
- Appendix
- Change History
- Cloud Live Server SDK Reference
- Low Latency Live Client SDK Reference
- Troubleshooting
Stream Status Notifications
You can add a URL on the Live console for receiving messages when stream push starts or ends. The messages are sent as POST requests to your server through an HTTP API. Then your server returns the status code 200 to confirm that the messages have been received.
Notes
After stream status notifications are enabled, you will receive a message each time when a live stream is pushed or disconnected. However, when a stream is disconnected soon after it was pushed, the server may receive the message on stream disconnection before receiving the message on stream pushing due to network transmission latency. In this case, you need to check the Unix timestamp parameter publish_timestamp in the message to check whether the stream pushing and stream disconnection are in the same stream pushing event. The timestamps generated in the stream pushing and stream disconnection of the same stream pushing event are the same.
Prerequisites
- You have added an ingest domain name.
- You have configured CNAME records at your domain names' DNS provider.
Adding a Notification URL
- Log in to the Live console.
- In the navigation pane, choose Domains.
- Click Manage in the Operation column of the desired ingest domain name.
- In the navigation pane, choose Template > Stream Status Notifications.
- Click Add. On the displayed dialog box, add a notification URL, as shown in Figure 1.
NOTE:
Only HTTP and HTTPS URLs are supported.
Authentication Key: authentication key. You need to configure this parameter only when notification authentication is required.- A key contains 32 to 128 characters.
- A key can also be automatically generated.
- Click OK.
When stream pushing starts or ends, you will receive a notification message. For details about the notification message body, see Callback Example.
Managing Notification URLs
You can also perform the following operations:
Callback Example
The following is an example of stream pushing and stream disconnection messages. Table 1 describes the fields in a 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.111.*.*", "node_ip":"112.11.*.*", "publish_timestamp":"1587954134", "event":"PUBLISH", "auth_timestamp":1587954140, "auth_sign":"ff3b2bxxx5cfd56e76d72bed4c4aa2dxxxca8c2e46467d205a6417d4fc" }
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 receiver |
publish_timestamp |
Unix timestamp. One single timestamp is generated for each stream pushing event. |
event |
Stream pushing or stream disconnection. Options:
|
auth_timestamp |
UNIX timestamp when the event notification signature expires. This parameter is carried when an authentication key is configured. The value is a decimal UNIX timestamp, that is, the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT). Example: 1592639100 (June 20, 2020 15:45) |
auth_sign |
Event notification signature. This parameter is carried when an authentication key is configured. auth_sign = HmacSHA256 (event + domain + app + stream + auth_timestamp, key) key indicates the key used for authentication. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.