<?php 
    require 'common.php';
    $r = new response();
    if(check_call_end($r) === false)
    {
        $current_exit_menu = $_SESSION["selected_exit_menu"];
        $_SESSION['returning_back_to_main_menu'] = 1;
        if($current_exit_menu == $MAIN_MENU) 
        {
            $r->addGoto($APP_BASE_URL."/menu.php");
        }
        else if($current_exit_menu == $REQUEST_CALL_BACK)
        {
            submit_request_callback();
            play_message($r,$REQUEST_CALL_BACK);
            add_step($REQUEST_CALL_BACK);
            $r->addGoto($APP_BASE_URL."/menu.php");
        }
        else if($current_exit_menu == $OFFICE_ADDRESS) 
        {
            play_message($r,$OFFICE_ADDRESS);
            add_step($OFFICE_ADDRESS);
            $r->addGoto($APP_BASE_URL."/menu.php");
        }
        $r->send();
    }

    function submit_request_callback()
    {
        error_log("request callback initiated");
    }

?>