<?php
session_start();
include_once '../config/connect.php';
require_once '../config/whatsapp.php';

header('Content-Type: application/json');

if (!isset($_SESSION['admin'])) {
    http_response_code(403);
    echo json_encode([
        'ok' => false,
        'message' => 'FORBIDDEN',
    ], JSON_UNESCAPED_SLASHES);
    exit;
}

echo json_encode(wa_fonnte_status($call), JSON_UNESCAPED_SLASHES);
