- Модуль: voximplant
- Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_rest.php
- Класс: CVoxImplantRestService
- Вызов: CVoxImplantRestService::sendReady
static function sendReady($params, $n, $server)
{
if ($server->getAuthType() !== BitrixRestSessionAuthAuth::AUTH_TYPE)
{
throw new BitrixRestRestException("This method is only available for internal usage.", "WRONG_AUTH_TYPE", CRestServer::STATUS_FORBIDDEN);
}
$call = BitrixVoximplantModelCallTable::getByCallId($params['CALL_ID']);
if ($call)
{
BitrixVoximplantModelCallTable::update($call['ID'], [
'STATUS' => BitrixVoximplantModelCallTable::STATUS_CONNECTING
]);
}
CVoxImplantIncoming::SendCommand([
'CALL_ID' => $params['CALL_ID'],
'COMMAND' => CVoxImplantIncoming::RULE_USER,
'USER_ID' => static::getCurrentUserId()
]);
}