<?php
header("Content-Type: text/xml");
// file_put_contents("test.txt", print_r($_POST, true));

// Get the destination number
$to = htmlspecialchars($_POST['To']);
$callerId = htmlspecialchars($_POST['CallerId']);

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
  <Dial record="record-from-answer-dual" callerId="<?php echo $callerId; ?>">
    <Number 
      statusCallbackEvent="completed"
      statusCallback="https://havenclean.me/haven/Anil_changes/events.php"
      statusCallbackMethod="POST">
      <?php echo $to; ?>
    </Number>
  </Dial>
</Response>
