81 if (!is_null(static::$isActiveCallExtension))
83 return static::$isActiveCallExtension;
86 if (!\
Bitrix\Main\Loader::includeModule(
'bitrix24'))
88 static::$isActiveCallExtension =
true;
92 $value = (int)\
Bitrix\Bitrix24\Feature::getVariable(
'im_call_extensions_limit');
95 static::$isActiveCallExtension =
true;
100 if ($calls >= $value)
102 static::$isActiveCallExtension =
false;
106 static::$isActiveCallExtension =
true;
119 if ($code === self::COUNTER_CALL_SUCCESS)
121 static::$isActiveCallExtension =
null;
124 $code = mb_strtolower($code);
125 return \CGlobalCounter::Set(
'im_limit_'.$code, $value, \CGlobalCounter::ALL_SITES,
'',
false);
130 if ($code === self::COUNTER_CALL_SUCCESS)
132 static::$isActiveCallExtension =
null;
135 $code = mb_strtolower($code);
136 return \CGlobalCounter::Increment(
'im_limit_'.$code, \CGlobalCounter::ALL_SITES,
false);