updated vodia identity
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user