I read the following Twilio PHP API docs and it was successful
I continued reading about ringless voice mail stackoverflow and that it is based on calling a number, then immediately calling the number from the same number again, followed by dropping the initial call, which sends the second call straight to voice mail
How can I do that within the following try catch:
try {
// Initiate a new outbound call
$call = $client->account->calls->create(
// Step 4: Change the 'To' number below to whatever number you'd like
// to call.
"+15558675309",
// Step 5: Change the 'From' number below to be a valid Twilio number
// that you've purchased or verified with Twilio.
"+15017250604",
// Step 6: Set the URL Twilio will request when the call is answered.
array("url" => "http://demo.twilio.com/welcome/voice/")
);
echo "Started call: " . $call->sid;
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
I have tried to throw an exception - throw new Exception('something');
I have tried adding goto secondCall; after the $call->sid; followed by secondCall: with the try catch once again