Skip to main content

Relay.Calling.AnswerResult

This object returned from the answer method.

Methods

getEvent

Returns the last Relay Event arrived for this operation.

Available In:

Parameters

None

Returns

Relay.Event - Last Relay Event.

Examples

Start recording in stereo mode and grab the result when it's completed.
<?php

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

isSuccessful

Return true if the call was answered without errors, false otherwise.

Available In:

Parameters

None

Returns

boolean - Whether the call has been answered successfully.

Examples

Start the recording and then check if it has ended successfully.
<?php

$call->answer()->done(function($result) {
if ($result->isSuccessful()) {
// $call is now active...
}
});