*** id: a05a07a0-58b9-4a11-a564-1457a1f9f813 title: Relay.Calling.SendDigitsAction slug: /php/reference/calling/actions/send-digits description: The SendDigitsAction object is returned when sending digits to the call. max-toc-depth: 3 ---------------- [call]: /docs/server-sdk/v2/php/reference/calling/call#senddigitsasync [relay-calling-senddigitsresult]: /docs/server-sdk/v2/php/reference/calling/results/send-digits This object is returned by [`sendDigitsAsync`][call] method that represents a *send digits* operation currently active on a call. ## Methods ### getControlId Return the UUID to identify the operation. **Parameters** *None* **Returns** `string` - UUID to identify the action. **Examples** Send some digits and print the controlId. ```php sendDigitsAsync('1234')->done(function($action) { echo $action->getControlId(); }); ``` ### getPayload Return the payload sent to Relay to initiate the request. Useful to inspect what you sent to perform this action. **Parameters** *None* **Returns** `Object` - Payload sent to Relay. **Examples** Send some digits and print out the payload. ```php sendDigitsAsync('1234')->done(function($action) { print_r($action->getPayload()); }); ``` ### getResult Returns the final result of the send digits operation. **Parameters** *None* **Returns** [`Relay.Calling.SendDigitsResult`][relay-calling-senddigitsresult] - Final result of the operation. **Examples** Send some digits and grab the result when it's completed. ```php sendDigitsAsync('1234')->done(function($action) { // .. later in the code since it's an async method if ($action->isCompleted()) { $sendDigitsResult = $action->getResult(); } }); ``` ### getState Return the current state of the operation. **Parameters** *None* **Returns** `string` - Current operation's state. **Examples** Send some digits and print the state. ```php sendDigitsAsync('1234')->done(function($action) { echo $action->getState(); }); ``` ### isCompleted Return `true` if the operation has finished, `false` otherwise. **Parameters** *None* **Returns** `Boolean` - True/False accordingly to the state. **Examples** Send some digits and check if it has finished. ```php sendDigitsAsync('1234')->done(function($action) { if ($action->isCompleted()) { } }); ```