

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# EventBridge를 사용하여 Amazon Chime SDK 자동화
<a name="automating-chime-with-cloudwatch-events"></a>

Amazon EventBridge를 사용하면 AWS 서비스를 자동화하고 애플리케이션 가용성 문제 또는 리소스 변경과 같은 시스템 이벤트에 자동으로 대응할 수 있습니다. 회의 이벤트에 대한 자세한 내용은 *Amazon Chime SDK 개발자 안내서*의 [회의 이벤트를](https://docs.aws.amazon.com/chime/latest/dg/using-events.html) 참조하세요.

Amazon Chime SDK는 이벤트를 생성할 때 *최선의 전송을* 위해 EventBridge로 전송합니다. 즉, Amazon Chime SDK는 모든 이벤트를 EventBridge로 전송하려고 시도하지만 드문 경우 이벤트가 전송되지 않을 수 있습니다. 자세한 내용은 *Amazon EventBridge 사용 설명서*의 [AWS 서비스의 이벤트](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html)를 참조하세요.

**참고**  
데이터를 암호화해야 하는 경우 Amazon S3 관리형 키를 사용해야 합니다. Key AWS Management Service에 저장된 고객 마스터 키를 사용한 서버 측 암호화는 지원되지 않습니다.

## EventBridge를 사용하여 Amazon Chime SDK 음성 커넥터 자동화
<a name="events-cvc"></a>

Amazon Chime SDK 음성 커넥터에 대해 자동으로 트리거할 수 있는 작업은 다음과 같습니다.
+  AWS Lambda 함수 호출
+ Amazon Elastic Container Service 태스크 시작
+ Amazon Kinesis Video Streams로 이벤트 릴레이
+  AWS Step Functions 상태 시스템 활성화
+ SNS 주제 또는 Amazon SQS 대기열 알림

Amazon Chime SDK 음성 커넥터와 함께 EventBridge를 사용하는 몇 가지 예는 다음과 같습니다.
+ Lambda 함수를 활성화하여 통화 종료 후 통화 오디오를 다운로드합니다.
+ Amazon ECS 태스크를 시작하여 통화 시작 후 실시간 트랜스크립션을 활성화합니다.

자세한 내용은 [Amazon EventBridge 사용 설명서](https://docs.aws.amazon.com/eventbridge/latest/userguide/)를 참조하세요.

## Amazon Chime SDK 음성 커넥터 스트리밍 이벤트
<a name="stream-events-cvc"></a>

Amazon Chime SDK 음성 커넥터는이 섹션에서 설명하는 이벤트가 발생할 때 EventBridge로 이벤트 전송을 지원합니다.

### Amazon Chime SDK 음성 커넥터 스트리밍 시작
<a name="stream-start-cvc"></a>

Amazon Chime SDK 음성 커넥터는 Kinesis Video Streams로 미디어 스트리밍이 시작될 때이 이벤트를 전송합니다.

**Example 이벤트 데이터**  
다음은 이 이벤트의 예제 데이터입니다.  

```
{
    "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"
    }
}
```

### Amazon Chime SDK 음성 커넥터 스트리밍 종료
<a name="stream-end-cvc"></a>

Amazon Chime SDK 음성 커넥터는 Kinesis Video Streams로의 미디어 스트리밍이 종료될 때이 이벤트를 전송합니다.

**Example 이벤트 데이터**  
다음은 이 이벤트의 예제 데이터입니다.  

```
{
    "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"
    }
}
```

### Amazon Chime SDK Voice Connector 스트리밍 업데이트
<a name="stream-update-cvc"></a>

Amazon Chime SDK 음성 커넥터는 Kinesis Video Streams로의 미디어 스트리밍이 업데이트될 때이 이벤트를 전송합니다.

**Example 이벤트 데이터**  
다음은 이 이벤트의 예제 데이터입니다.  

```
{
    "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}}"
    }
}
```

### Amazon Chime SDK 음성 커넥터 스트리밍 실패
<a name="stream-fail-cvc"></a>

Amazon Chime SDK 음성 커넥터는 Kinesis Video Streams로의 미디어 스트리밍이 실패할 때이 이벤트를 전송합니다.

**Example 이벤트 데이터**  
다음은 이 이벤트의 예제 데이터입니다.  

```
{
  "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"
  }
}
```