Skip to main content

Relay.Calling.DetectAction

Relay.Calling.DetectAction

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

Properties

PropertyTypeDescription
resultRelay.Calling.DetectResultFinal detector result.
completedbooleanWhether the action has finished.
payloaddictPayload sent to Relay to start this detector.
control_idstringUUID to identify the detector.

Methods

stop

Stop the action immediately.

Parameters

None

Returns

coroutine - Coroutine that will return a Relay.Calling.StopResult object.

Examples

Trying to detect a machine and stop the action after 5 seconds:

import asyncio # to use sleep

action = await call.detect_answering_machine_async()
# For demonstration purposes only..
await asyncio.sleep(5)
await action.stop()