<?php
    require_once('call_flow_functions.php');
    header("Content-Type: application/xml");
    
    $from_number = format_number($_REQUEST['From']);
    $to_number = format_number($_REQUEST['To']);
    
    $body = $_REQUEST['Body'];

    // Respond with an XML response
    echo '<?xml version="1.0" encoding="UTF-8"?>';
    echo "<Response></Response>";
    
    if(strtoupper($body) == "STOP"){
    	block_active_number($from_number, $to_number, $body, $_REQUEST['From']);
    }
    else if(strtoupper($body) == "ACTIVE"){
    	block_active_number($from_number, $to_number, $body, $_REQUEST['From']);
    }
    // else{
    //     send_device_meessage($from_number, $to_number, $body);
    // }


    
?>