Latest Legacy

Asynchronous machine detection

You can take action on detecting an answering machine during a call by setting the machine_detection_url parameter when firing an outbound call API. Plivo will detect an answering machine in the background and invoke the machine_detection_url with these parameters.

Parameters sent to machine_detection_url

From string

The from number used to initiate the call.

Machine boolean

Set to true if a machine is detected.

To string

The destination of the call.

RequestUUID string

An identifier that can uniquely identify a call.

ALegRequestUUID string

Identifies the first leg of the call in case there are multiple legs.

CallUUID string

The identifier used to identify the call.

IfMachine string

This parameter can be either continue or hangup depending on the machine_detection parameter set while initiating the call.

Direction string

The direction of the call. This will be “outbound” since we support machine detection only on outbound calls.

ALegUUID string

An unique identifier for the A leg of the call

Event string

The event that triggered this notification. This will have the value “MachineDetection”.

CallStatus string

The status of the call. This will have the value “in-progress”.

Returns

If successful, this endpoint returns a unique identifier that can be used to identify the call.

Response

HTTP Status Code: 200

Response for a successful call

{
  "message": "call fired",
  "request_uuid": "9834029e-58b6-11e1-b8b7-a5bd0e4e126f",
  "api_id": "97ceeb52-58b6-11e1-86da-77300b68f8bb"
}

Response for a queued call

{
  "message": "call queued",
  "request_uuid": "9834029e-58b6-11e1-b8b7-a5bd0e4e126f",
  "api_id": "97ceeb52-58b6-11e1-86da-77300b68f8bb"
}