Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

ReceiveDigits

Focus mode
ReceiveDigits - Amazon Chime SDK

When a user enters digits that match the regular expression pattern specified in this action, the SIP media application invokes the AWS Lambda function.

{ "Type": "ReceiveDigits", "Parameters": { "CallId": "call-id-1", "ParticipantTag": "LEG-A", "InputDigitsRegex": "^\d{2}#$", "InBetweenDigitsDurationInMilliseconds": 1000, "FlushDigitsDurationInMilliseconds": 10000 } }
CallId

DescriptionCallId of participant in the CallDetails of the AWS Lambda function invocation

Allowed values – A valid call ID

Required – No

Default value – None

ParticipantTag

DescriptionParticipantTag of one of the connected participants in the CallDetails

Allowed valuesLEG-A or LEG-B

Required – No

Default valueParticipantTag of the invoked callLeg Ignored if you specify CallId

InputDigitsRegex

Description – A regular expression pattern

Allowed values – A valid regular expression pattern

Required – Yes

Default value – None

InBetweenDigitsDurationInMilliseconds

Description – Interval between digits before checking to see if the input matches the regular expression pattern

Allowed values – Duration in milliseconds

Required – Yes

Default value – None

FlushDigitsDurationInMilliseconds

Description – Interval after which received DTMF digits are flushed and sent to the AWS Lambda function. If the SIP media application receives a new digit after the interval ends, the timer starts again.

Allowed valuesInBetweenDigitsDurationInMilliseconds

Required – Yes

Default value – None

The SIP media application discards DTMF digits for the duration of a call until it receives a new ReceiveDigits action. The FlushDigitsDurationInMilliseconds interval starts when the SIP media application receives the first DTMF digit. If the user enters the correct digits before the interval expires, the SIP media application invokes the AWS Lambda function described in Receiving caller input for the Amazon Chime SDK PSTN audio service.

If the user input doesn't match the regular expression pattern, the SIP media application repeats the "failure" audio file message until the application exhausts the repeat count or the user inputs valid digits.

See working examples on GitHub:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.