• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_rest.php
  • Класс: CVoxImplantRestService
  • Вызов: CVoxImplantRestService::initCall
static function initCall($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);
	}

	$voxMain = new CVoxImplantMain(static::getCurrentUserId());
	$result = $voxMain->GetDialogInfo($_POST['NUMBER']);
	if (!$result)
	{
		throw new BitrixRestRestException($voxMain->GetError()->msg, $voxMain->GetError()->code);
	}

	return $result;
}