Skip to main content

Relay.Calling.SendDigitsResult

This object is returned by sendDigits method and represents the final result of a send digits action.

Methods​

getEvent​

Returns the last Relay Event arrived for this operation.

Parameters

None

Returns

Relay.Event - Last Relay Event.

Examples

Send some digits and then grab the last event occurred.

<?php

$call->sendDigits('1234')->done(function($result) {
$event = $result->getEvent();
// Inspect $event->payload ..
});

isSuccessful​

Return true if the operation has succeeded, false otherwise.

Parameters

None

Returns

boolean - Whether the operation has completed successfully.

Examples

Send some digits and then check if it has ended successfully.

<?php

$call->sendDigits('1234')->done(function($result) {
if ($result->isSuccessful()) {
// Do other things...
}
});