Skip to main content

Relay::Calling::DetectAction

This object returned from the asynchronous detect! methods that represents a running detector on the call.

Properties

PropertyTypeDescription
resultRelay::Calling::DetectResultFinal detector result.
completedbooleanWhether the action has finished.
payloadobjectPayload sent to Relay to start this detector.
controlIdstringUUID to identify the detector.

Methods

stop

Stop the action immediately.

Parameters

None

Returns

Relay::Calling::StopResult - A StopResult object with a successful property.

Examples

Detect a machine on the current call. Stop the action after 5 seconds.

action = call.detect!(type: :machine)
sleep 5
action.stop