Can get information about an existing call

This commit is contained in:
Pierre HUBERT 2019-01-25 09:46:03 +01:00
parent d1be731fb4
commit 10b50d4664

View File

@ -68,6 +68,27 @@ class CallsController {
}
/**
* Get information about a single call
*
* @url POST /calls/getInfo
*/
public function getInfo(){
user_login_required();
//Get target call ID
$call_id = $this->GetSafeCallIDFromRequest("call_id");
//Get information about the call
$call = components()->calls->get($call_id, true);
if(!$call->isValid())
Rest_fatal_error(500, "Could not get information about the call!");
return self::CallInformationToAPI($call);
}
/**
* Get the next pending call
*