• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_rest.php
  • Класс: CVoxImplantRestService
  • Вызов: CVoxImplantRestService::getExternalLines
static function getExternalLines($params, $n, $server)
{
	if ($server->getAuthType() !== OAuthAuth::AUTH_TYPE && $server->getAuthType() !== APAuthAuth::AUTH_TYPE)
	{
		throw new BitrixRestAuthTypeException();
	}

	$clientId = $server->getClientId();
	$row = BitrixRestAppTable::getByClientId($clientId);
	$appId = $row['ID'];

	$result = RestHelper::getExternalLines($appId);
	if (!$result->isSuccess())
	{
		throw new BitrixRestRestException(implode('; ', $result->getErrorMessages()));
	}

	return $result->getData();
}