2

So im doing a ringless voicemail and have everything working except for the initial call is not hanging up. I've added a timeout of 5 seconds to it which ends the call but sometimes i still get a ring or a number called on my phone. Ive tried to hang up 2 ways.

$message = $this->client->calls($_REQUEST['CallSid'])->update(
    array(
        'url' => 'twilioxmlHangup.xml',
        "method" => "POST"
    )
);


<?xml version="1.0" ?>
<Response>
<Say voice="alice">.</Say>
<Hangup/>
</Response>

I also tried

$message = $this->client->calls($_REQUEST['CallSid'])->update(array("status" => "completed"));

Im trying to cancel the call after i make my 2nd call and it doesn't seem to do anything. I found this which is similar but don't understand what needs to be done. Twilio hangup call through REST API not working?

Thank you

Sami Ahmed Siddiqui
  • 2,328
  • 1
  • 16
  • 29
user1054513
  • 605
  • 3
  • 13
  • 24
  • Could it be that the you can't actually `` a call that is not answered yet? Have you tried with ``? – djboris Jul 17 '19 at 13:00

0 Answers0