*** id: 13810840-8c67-49fe-9085-793ffd32a9df slug: /php/reference/calling/results/tap hide\_title: true max-toc-depth: 3 ---------------- [call]: /docs/server-sdk/v2/php/reference/calling/call#tap [relay-event]: /docs/server-sdk/v2/php/reference/event # Relay.Calling.TapResult This object returned from [`tap`][call] method that represents the final result of a tapping. ## Methods ### getDestinationDevice Returns the `destination` device receiving media. **Parameters** *None* **Returns** `Object` - The destination device. **Examples** > Tapping audio from the call and then inspect the destination device. ```php 'rtp', 'target_addr' => '192.168.1.1', 'target_port' => 1234 ]; $call->tap($tap)->done(function($result) { if ($result->isSuccessful()) { $destination = $result->getDestinationDevice(); } }); ``` ### getEvent Returns the last Relay Event arrived for this operation. **Parameters** *None* **Returns** [`Relay.Event`][relay-event] - Last Relay Event. **Examples** > Tapping audio from the call and grab the result when it's completed. ```php 'rtp', 'target_addr' => '192.168.1.1', 'target_port' => 1234 ]; $call->tap($tap)->done(function($result) { $event = $result->getEvent(); // Inspect $event->payload .. }); ``` ### getSourceDevice Returns the `source` device sending media. **Parameters** *None* **Returns** `Object` - The source device. **Examples** > Tapping audio from the call and then inspect the source device. ```php 'rtp', 'target_addr' => '192.168.1.1', 'target_port' => 1234 ]; $call->tap($tap)->done(function($result) { if ($result->isSuccessful()) { $source = $result->getSourceDevice(); } }); ``` ### getTap Returns the payload for this `tap` action. **Parameters** *None* **Returns** `Object` - Payload used to start tapping. **Examples** > Tapping audio from the call and then inspect the `tap` payload. ```php 'rtp', 'target_addr' => '192.168.1.1', 'target_port' => 1234 ]; $call->tap($tap)->done(function($result) { if ($result->isSuccessful()) { $tap = $result->getTap(); } }); ``` ### isSuccessful Return `true` if the tapping succeeded, `false` otherwise. **Parameters** *None* **Returns** `Boolean` - True/False accordingly to the state. **Examples** > Tapping audio from the call and then check if it has ended successfully. ```php 'rtp', 'target_addr' => '192.168.1.1', 'target_port' => 1234 ]; $call->tap($tap)->done(function($result) { if ($result->isSuccessful()) { } }); ```