0

I am using twilio task router to a great effect implementing a call center functionality. When a task reservation is created, I am issuing a "call" instruction as I need to create a call leg to the worker, something very similar to as shown in the example

{
  "instruction": "call",
  "to": "+15645455534",
  "from": "+15558675309",
  "url": "http://example.com/agent_answer",   
  "status_callback_url":
    "http://example.com/agent_answer_status_callback"
}

At this point, I would also like to detect Answering Machine. I can see providing MachineDetection: Enable option would result in an additional parameter AnsweredBy in the url callback.

But I am failing to see the support of those parameters with the call instruction. Is this something I can use and would work? If not, are there any other ways to achieve the goal?

Edit:

Tested by passing MachineDetection: Enable with the call instruction. The Url callback didn't receive AnsweredBy field. Checking into twilio call logs, it didn't use the parameter while starting an outbound call.

enter image description here

Any help would be deeply appreciated.

Gautam Kumar Samal
  • 758
  • 1
  • 7
  • 23

1 Answers1

0

The call instruction itself does not support AMD. However, instead of using call, you can use redirect which will redirect the call to a new TwiML document. In that new TwiML document, you can specify the machineDetection attribute which is part of the <Number> or <Sip> noun within the <Dial> verb. This feature has been supported since October, 2022.

Daniel O.
  • 583
  • 5
  • 15