SendDigits - Amazon Chime SDK

SendDigits

Send up to 50 dual tone multi-frequency (DTMF) digits on any leg of a call. The signals can include the following:

  • Numbers 0 thru 9

  • Special characters star (*) and pound (#)

  • Network control signals A, B, C, D

  • The comma character (,). This signal adds a 0.5 second delay between the previous and next signals.

Using the SendDigits action

The following example shows a typical SendDigits action:

{ "SchemaVersion": "1.0", "Actions":[ { "Type": "SendDigits", "Parameters": { "CallId": "call-id-1", // required "Digits": ",,*1234,56,7890ABCD#", // required "ToneDurationInMilliseconds": 100 // optional } } ] }
CallId

Description – The CallId of a participant in the CallDetails of the AWS Lambda function invocation

Allowed values – A valid call ID

Required – Yes

Default value – None

Digits

Description – The digits to be sent on the call leg that corresponds to the CallId

Allowed values – 0-9, *, #, A, B, C, D, comma (,)

Required – Yes

Default value – None

ToneDurationInMilliseconds

Description – The amount of time allowed, in milliseconds, to transmit each digit.

Allowed values – Any integer between 50 and 24000

Required – No

Default value – 250

Handling ACTION_SUCCESSFUL events

The following example shows a typical ACTION_SUCCESSFUL event for the SendDigits action.

{ "SchemaVersion": "1.0", "Sequence": 3, "InvocationEventType": "ACTION_SUCCESSFUL", "ActionData": { "Type": "SendDigits", "Parameters": { "Digits": "1,2A#", "ToneDurationInMilliseconds": 100, "CallId": "call-id-1" }, "CallDetails": { ... } } }

Handling ACTION_FAILED events

The following example shows a typical ACTION_FAILED event for the SendDigits action.

{ "SchemaVersion": "1.0", "Sequence": 3, "InvocationEventType": "ACTION_FAILED", "ActionData": { "Type": "SendDigits", "Parameters": { "Digits": "1,2A#", "ToneDurationInMilliseconds": 20000000, "CallId": "call-id-1" }, "ErrorType": "InvalidActionParameter", "ErrorMessage": "ToneDuration parameter value is invalid." }, "CallDetails": { ... } } }

Call flow

The following diagram shows the program flow for sending digits from a caller to a callee.

Diagram showing the program flow of the SendDigits action.