<?php
require_once 'controllers/TwilioCallController.php';

$twilioCallController = new TwilioCallController();

//voiceOutgoing
if ($method === 'POST' && $uri === '/voice-outgoing') {
    $twilioCallController->voiceOutgoing();
    // exit;
}

if ($method === 'POST' && $uri === '/calls-twiml') {
    $response = $twilioCallController->twiml($_GET);
    // exit;
}

// Call status updates
if ($method === 'POST' && $uri === '/calls-status') {
    $twilioCallController->callStatus($_POST);
    exit;
}

// Recording status updates
if ($method === 'POST' && $uri === '/recording-status') {
    $twilioCallController->recordingStatus($_POST);
    exit;
}
