Human Detection After the Machine in Twilio

25 Views Asked by At

My scenario is I am calling the a company number.It ask for pin code that I pass using DTMF.Using my pin code system search a person and connect my call with relevant person (according to my pin code).

$call = $twilio->calls    
  ->create($backupNumber, // to
    $callerNumber, // from
    [ 
      "sendDigits" => $dtmfDigits,
      "machineDetection" => "Enable",
      "asyncAmd"=>true,
      "asyncAmdStatusCallback"=>"[[URL]]",
      "asyncAmdStatusCallbackMethod"=>"POST",
      "twiml" => "<Response>
        <Dial>
          <Conference startConferenceOnEnter=\"true\" endConferenceOnExit=\"true\">{$callCode}</Conference>
        </Dial>
      </Response>",
    ]
  );

During search there a music/machine after some time call connected with relevant person. I am able to detect [AnsweredBy] => machine_start in asyncAmdStatusCallback. But when human picked the call asyncAmdStatusCallback is not calling. I want to detect when human picked up the call after the music.

0

There are 0 best solutions below