updated vodia identity

This commit is contained in:
Luca Haid
2025-08-07 13:05:07 +00:00
parent fed87a236c
commit 4313cf70c0
4 changed files with 139 additions and 11 deletions

View File

@@ -145,4 +145,32 @@ class Vodia_Api {
return $user_settings;
}
public function getActiveCalls($domain, $user) {
if(!$this->session_id) {
$this->_authenticate($domain);
}
$url = $this->baseurl.VODIA_API_EP_GET_USER_CALLS;
$url = str_replace("{DOMAIN}", $domain, $url);
$url = str_replace("{EXT}", $user, $url);
$ctx_options = [
"http" => [
"ignore_errors" => true,
"method" => "GET",
"header" => [
"Cookie: session=".$this->session_id,
"Accept: application/json",
"Content-Type: application/json",
],
]
];
$ctx = stream_context_create($ctx_options);
$output = file_get_contents($url, false, $ctx);
return json_decode($output, true);
}
}