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
Property | Type | Description |
---|---|---|
result | Relay.Calling.DetectResult | Final detector result. |
completed | boolean | Whether the action has finished. |
payload | dict | Payload sent to Relay to start this detector. |
control_id | string | UUID 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()