mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-27 07:49:27 +00:00
Can get information about an existing call
This commit is contained in:
parent
d1be731fb4
commit
10b50d4664
@ -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
|
* Get the next pending call
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user