• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_rest.php
  • Класс: CVoxImplantRestService
  • Вызов: CVoxImplantRestService::lineOutgoingSipSet
static function lineOutgoingSipSet($arParams)
{
	$permissions = SecurityPermissions::createWithCurrentUser();
	if (!$permissions->canPerform(SecurityPermissions::ENTITY_LINE, SecurityPermissions::ACTION_MODIFY))
	{
		throw new BitrixRestAccessException();
	}

	$arParams = array_change_key_case($arParams, CASE_UPPER);
	$arParams['CONFIG_ID'] ??= null;

	$result = CVoxImplantConfig::SetPortalNumberByConfigId($arParams['CONFIG_ID']);
	if (!$result)
	{
		throw new BitrixRestRestException('Specified CONFIG_ID is not found', BitrixRestRestException::ERROR_ARGUMENT, CRestServer::STATUS_WRONG_REQUEST);
	}

	return 1;
}