*** id: 5b24bb64-6a01-4c20-b049-9e417d0bb2fc slug: /php/reference/calling/results/hangup description: The HangupResult object is returned after a hangup operation is completed. max-toc-depth: 3 ---------------- [call]: /docs/server-sdk/v2/php/reference/calling/call#hangup [relay-event]: /docs/server-sdk/v2/php/reference/event # Relay.Calling.HangupResult This object returned from [`hangup`][call] method. ## Methods ### getEvent Returns the last Relay Event arrived for this operation. **Parameters** *None* **Returns** [`Relay.Event`][relay-event] - Last Relay Event. **Examples** > Hangup the call and inspect the retrieve the last Relay event. ```php hangup()->done(function($result) { $event = $result->getEvent(); // Inspect $event->payload .. }); ``` ### getReason Returns the reason why the call has ended. **Parameters** *None* **Returns** `string` - Possible values: `hangup`, `cancel`, `busy`, `noAnswer`, `decline`, `error` **Examples** ```php hangup()->done(function($result) { $reason = $result->getReason(); }); ``` ### isSuccessful Return `true` if the call was answered without errors, `false` otherwise. **Parameters** *None* **Returns** `boolean` - Whether the call has been answered successfully. **Examples** > Hangup the call and check if the operation succeeded. ```php hangup()->done(function($result) { if ($result->isSuccessful()) { // $call has been hung up successfully! } }); ```