<?php

require_once "./plivo.php";
# Set te caller ID using Dial XML
$r = new Response();
// Generate a Dial XML ans set the caller ID
$params = array('callerId' => '1111111111');
$d = $r->addDial($params);
$number = '2222222222';
$r->addNumber($number);
Header('Content-type: text/xml');
echo $r->toXML();
/*
Sample successful output
<Response>
    <Dial callerId="1111111111">
        <Number>2222222222</Number>
    </Dial>
</Response>
*/
# Set the caller ID using Call API
$auth_id = "Your AUTH_ID";
$auth_token = "Your AUTH_TOKEN";
$p = new RestAPI($auth_id, $auth_token);
$params = array('to' => '14155069431', 'from' => '18583650866', 'answer_url' => "https://glacial-harbor-8656.herokuapp.com/testing.php/detect", 'answer_method' => "GET");
$response = $p->make_call($params);
print_r($response);
/* Sample Output
( 
    [status] => 201 
    [response] => Array (