Start audio detection on the call. Detects answering machines, fax tones, or
DTMF digits. Returns a DetectAction
that resolves on the first detection result or when the operation finishes.
The DetectAction resolves on the first detection result, not when the
detect operation finishes. This means await action.wait() returns as soon as
a result is available.
This method emits calling.call.detect events. See Call Events for payload details.
Detection configuration object.
Detection type. Valid values:
"machine" — answering machine detection (AMD)"fax" — fax tone detection (CNG/CED)"digit" — DTMF digit detectionType-specific detection parameters.
Maximum seconds to run the detector before stopping.
Custom control ID. Auto-generated if not provided.
Callback invoked when detection completes.
Promise<DetectAction> — An action handle with
stop() and wait() methods.