<?php
    require_once('call_flow_functions.php');
    header('Content-Type: application/xml; charset=UTF-8');
    $call_id = isset($_REQUEST['call_id']) ? (int)$_REQUEST['call_id'] : 0;
    $base_url = htmlspecialchars(base_url(), ENT_QUOTES, 'UTF-8');
    echo '<?xml version="1.0" encoding="UTF-8"?>';
                
    echo "<Response>
            <Dial> 
                <Conference maxParticipants='4' startConferenceOnEnter='true'
                    endConferenceOnExit='true' beep='false' statusCallback='" . $base_url . "/signalwire_call/conference_connect.php?call_id=$call_id' statusCallbackEvent='start end join leave' waitUrl='" . $base_url . "/signalwire_call/wait_call.php'>
                    MyConference_$call_id
                </Conference>
            </Dial>
         </Response>";
                
?>
