• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/feature.php
  • Класс: BitrixVoximplantFeature
  • Вызов: Feature::isActive
static function isActive(?DateTime $minDate = null, ?DateTime $maxDate = null): bool
{
	$maxDate ??= new DateTime();
	$minDate ??= (new DateTime())->add('-1 months');

	$sipCount = SipTable::getCount();
	$numberCount = NumberTable::getCount();

	if ($sipCount === 0 && $numberCount === 0)
	{
		return false;
	}

	$filter = Query::filter()
		->whereNotLike('CALL_ID', 'externalcall%')
		->whereBetween('DATE_CREATE', $minDate, $maxDate)
	;
	$result = CallTable::getCount($filter);

	return $result > 0;
}