選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

接收 Amazon Chime SDK PSTN 音訊服務的呼叫者輸入

焦點模式
接收 Amazon Chime SDK PSTN 音訊服務的呼叫者輸入 - Amazon Chime SDK

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

您可以使用 ReceiveDigits動作來收集傳入 DTMF 數字,並將其與規則表達式比對。當 SIP 媒體應用程式收到符合規則表達式的數字時,它會呼叫具有 ACTION_SUCCESSFUL事件的 AWS Lambda 函數。收集的數字會出現在 ActionData 物件中的ReceivedDigits值中。

例如:

{ "SchemaVersion": "1.0", "Sequence": 4, "InvocationEventType": "ACTION_SUCCESSFUL", "ActionData": { "ReceivedDigits": "", "Type": "ReceiveDigits", "Parameters": { "CallId": "call-id-1", "InputDigitsRegex": "^\d{2}#$", "InBetweenDigitsDurationInMilliseconds": 5000, "FlushDigitsDurationInMilliseconds": 10000 } }, "CallDetails": { "TransactionId": "transaction-id", "AwsAccountId": "aws-account-id", "AwsRegion": "us-east-1", "SipRuleId": "sip-rule-id", "SipApplicationId": "sip-application-id", "Participants": [ { "CallId": "call-id-1", "ParticipantTag": "LEG-A", "To": "+12065551212", "From": "+15105550101", "Direction": "Inbound", "StartTimeInMilliseconds": "159700958834234", "Status": "Connected" } ] } }

呼叫者輸入符合您一般表達式模式的數字後,SIP 媒體應用程式會叫用 AWS Lambda 函數,傳回下列類型的承載:

{ "SchemaVersion": "1.0", "Sequence": 5, "InvocationEventType": "DIGITS_RECEIVED", "ActionData": { "ReceivedDigits": "11#", "Type": "ReceiveDigits", "Parameters": { "CallId": "call-id-1", "InputDigitsRegex": "^\d{2}#$", "InBetweenDigitsDurationInMilliseconds": 5000, "FlushDigitsDurationInMilliseconds": 10000 } }, "CallDetails": { "TransactionId": "transaction-id", "AwsAccountId": "aws-account-id", "AwsRegion": "us-east-1", "SipRuleId": "sip-rule-id", "SipApplicationId": "sip-application-id", "Participants": [ { "CallId": "call-id-1", "ParticipantTag": "LEG-A", "To": "+12065551212", "From": "+15105550101", "Direction": "Inbound", "StartTimeInMilliseconds": "159700958834234", "Status": "Connected" } ] } }

請參閱 GitHub 上的工作範例:https://https://github.com/aws-samples/amazon-chime-sma-on-demand-recording

隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。