Relay.Calling.AnswerResult
This object returned from the answer method.
Methods
getEvent
Returns the last Relay Event arrived for this operation.
Returns
Relay.Event - Last Relay Event.
Examples
Answer a call and grab the result event.
<?php
$call->answer()->done(function($result) {
$event = $result->getEvent();
// Inspect $event->payload ..
});
isSuccessful
Return true if the call was answered without errors, false otherwise.
Returns
boolean - Whether the call has been answered successfully.
Examples
Answer a call and check if it was successful.
<?php
$call->answer()->done(function($result) {
if ($result->isSuccessful()) {
// $call is now active...
}
});