Relay.Calling.AnswerResult

View as Markdown

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.

1<?php
2
3$call->answer()->done(function($result) {
4 $event = $result->getEvent();
5 // Inspect $event->payload ..
6});

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.

1<?php
2
3$call->answer()->done(function($result) {
4 if ($result->isSuccessful()) {
5 // $call is now active...
6 }
7});