Relay.Calling.DetectAction

View as Markdown

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:

1import asyncio # to use sleep
2
3action = await call.detect_answering_machine_async()
4# For demonstration purposes only..
5await asyncio.sleep(5)
6await action.stop()