使用 Amazon Chime 软件开发工具包实现自动化 EventBridge - Amazon Chime SDK

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 Amazon Chime 软件开发工具包实现自动化 EventBridge

Amazon EventBridge 允许您实现 AWS 服务自动化,并自动响应系统事件,例如应用程序可用性问题或资源更改。有关会议活动的更多信息,请参阅 Amazon Chime SDK 开发人员指南中的会议活动

当 Amazon Chime SDK 生成事件时,它会将事件发送到以 EventBridge 尽最大努力交付,这意味着 Amazon Chime SDK 会尝试将所有事件发送 EventBridge到,但在极少数情况下,事件可能无法传送。有关更多信息,请参阅 Amazon EventBridge 用户指南中的来自 AWS 服务的事件

注意

如需加密数据,则必须使用 Amazon S3 托管密钥。我们不支持使用存储在密钥管理服务中的客户主密钥进行服务器端加密。 AWS

使用 Amazon Chime SDK 语音连接器实现自动化 EventBridge

可以为 Amazon Chime SDK 语音连接器自动触发的操作包括以下内容:

  • 调用函数 AWS Lambda

  • 启动 Amazon Elastic Container Service 任务

  • 将事件中继到 Amazon Kinesis Video Streams

  • 激活 AWS Step Functions 状态机

  • 通知 Amazon SNS 主题或 Amazon SQS 队列

EventBridge 与 Amazon Chime SDK 语音连接器配合使用的一些示例包括:

  • 激活 Lambda 函数,在结束调用后下载相关音频。

  • 启动 Amazon ECS 任务,在开始调用后启用实时转录。

有关更多信息,请参阅 Amazon EventBridge 用户指南

Amazon Chime SDK Voice Connector 直播事件

Amazon Chime SDK 语音连接器支持将事件发送到本节讨论的事件发生 EventBridge 时。

当 Kinesis Video Streams 开始直播媒体时,Amazon Chime SDK 语音连接器会发送此事件。

例 事件数据

以下是此事件的示例数据。

{ "version": "0", "id": "12345678-1234-1234-1234-111122223333", "detail-type": "Chime VoiceConnector Streaming Status", "source": "aws.chime", "account": "111122223333", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [], "detail": { "callId": "1112-2222-4333", "direction": "Outbound", "fromNumber": "+12065550100", "inviteHeaders": { "from": "\"John\" <sip:+12065550100@10.24.34.0>;tag=abcdefg", "to": "<sip:+13605550199@abcdef1ghij2klmno3pqr4M.voiceconnector.chime.aws:5060>", "call-id": "1112-2222-4333", "cseq": "101 INVITE", "contact": "<sip:user@10.24.34.0:6090>;", "content-type": "application/sdp", "content-length": "246" }, "isCaller": false, "mediaType": "audio/L16", "sdp": { "mediaIndex": 0, "mediaLabel": "1" }, "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>;\r\n<recording xmlns='urn:ietf:params:xml:ns:recording:1'>", "startFragmentNumber": "1234567899444", "startTime": "yyyy-mm-ddThh:mm:ssZ", "streamArn": "arn:aws:kinesisvideo:us-east-1:123456M:stream/ChimeVoiceConnector-abcdef1ghij2klmno3pqr4-111aaa-22bb-33cc-44dd-111222/111122223333", "toNumber": "+13605550199", "transactionId": "12345678-1234-1234", "voiceConnectorId": "abcdef1ghij2klmno3pqr4", "streamingStatus": "STARTED", "version": "0" } }

当 Kinesis Video Streams 的媒体直播结束时,Amazon Chime SDK 语音连接器会发送此事件。

例 事件数据

以下是此事件的示例数据。

{ "version": "0", "id": "12345678-1234-1234-1234-111122223333", "detail-type": "Chime VoiceConnector Streaming Status", "source": "aws.chime", "account": "111122223333", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [], "detail": { "streamingStatus": "ENDED", "voiceConnectorId": "abcdef1ghij2klmno3pqr4", "transactionId": "12345678-1234-1234", "callId": "1112-2222-4333", "direction": "Inbound", "fromNumber": "+12065550100", "inviteHeaders": { "from": "\"John\" <sip:+12065550100@10.24.34.0>;tag=abcdefg", "to": "<sip:+13605550199@abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws:5060>", "call-id": "1112-2222-4333", "cseq": "101 INVITE", "contact": "<sip:user@10.24.34.0:6090>", "content-type": "application/sdp", "content-length": "246" }, "isCaller": false, "mediaType": "audio/L16", "sdp": { "mediaIndex": 0, "mediaLabel": "1" }, "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>\r\n<recording xmlns='urn:ietf:params:xml:ns:recording:1'>", "startFragmentNumber": "1234567899444", "startTime": "yyyy-mm-ddThh:mm:ssZ", "endTime": "yyyy-mm-ddThh:mm:ssZ", "streamArn": "arn:aws:kinesisvideo:us-east-1:123456:stream/ChimeVoiceConnector-abcdef1ghij2klmno3pqr4-111aaa-22bb-33cc-44dd-111222/111122223333", "toNumber": "+13605550199", "version": "0" } }

更新到 Kinesis Video Streams 的媒体直播时,Amazon Chime SDK 语音连接器会发送此事件。

例 事件数据

以下是此事件的示例数据。

{ "version": "0", "id": "12345678-1234-1234-1234-111122223333", "detail-type": "Chime VoiceConnector Streaming Status", "source": "aws.chime", "account": "111122223333", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [], "detail": { "callId": "1112-2222-4333", "updateHeaders": { "from": "\"John\" <sip:+12065550100@10.24.34.0>;;tag=abcdefg", "to": "<sip:+13605550199@abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws:5060>", "call-id": "1112-2222-4333", "cseq": "101 INVITE", "contact": "<sip:user@10.24.34.0:6090>", "content-type": "application/sdp", "content-length": "246" }, "siprecMetadata": "<&xml version=\"1.0\" encoding=\"UTF-8\"&>\r\n<recording xmlns='urn:ietf:params:xml:ns:recording:1'>", "streamingStatus": "UPDATED", "transactionId": "12345678-1234-1234", "version": "0", "voiceConnectorId": "abcdef1ghij2klmno3pqr4" } }

当流向 Kinesis Video Streams 的媒体失败时,Amazon Chime SDK 语音连接器会发送此事件。

例 事件数据

以下是此事件的示例数据。

{ "version": "0", "id": "12345678-1234-1234-1234-111122223333", "detail-type": "Chime VoiceConnector Streaming Status", "source": "aws.chime", "account": "111122223333", "time": "yyyy-mm-ddThh:mm:ssZ", "region": "us-east-1", "resources": [], "detail": { "streamingStatus":"FAILED", "voiceConnectorId":"abcdefghi", "transactionId":"12345678-1234-1234", "callId":"1112-2222-4333", "direction":"Inbound", "failTime":"yyyy-mm-ddThh:mm:ssZ", "failureReason": "Internal failure", "version":"0" } }