Bulvak Bulvak - 11 months ago 46
PHP Question

twilio and php Dial verb Question

I am using the dial verb and after a while of calling it sends me to the voice message of that person but instead I want it to call a separate number if the first did not work. I am aware of the fact that I can set time out but I dont know how to format the line of code with a set of parameters. By the I mean where or how am I suppose to put the parameters?
My Goal or aim is to make a sequential dialling program.
Meaning in the following code where would you put the parameters ? Generally in programming you have function (parameter1, parameter2, parameter3) But this seems different.

<Dial> 416-794-8543</Dial>
<Say>Hello Monkey <?php echo $tryME ?></Say>

My current code if you would like to see is below:

require "twilio.php";

// initiate response library
$response = new Response();

header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";

$PhoneNumbers= array('4167841543','6478704858');


if(($_REQUEST['DialStatus'] == "busy" || $_REQUEST['DialCallStatus'] == "no-answer" || $_REQUEST['DialCallStatus'] == "failed" || $_REQUEST['DialCallStatus'] == "canceled")) {




<Dial> <?php echo $variableToCall ?> </Dial>



The response should look like this TwiML:

    <Dial timeout="45"><?php echo $variableToCall ?></Dial>