• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/routing/queue.php
  • Класс: BitrixVoximplantRoutingQueue
  • Вызов: Queue::enqueue
protected function enqueue(Call $call)
{
	$call->updateStatus(CallTable::STATUS_ENQUEUED);
	$queuePosition = CallQueue::getCallPosition($call->getCallId());

	$userId = $call->getUserId();
	if ($userId <= 0)
	{
		$userId = $this->queue->getFirstUserId($this->checkTimeman);
		if ($userId)
		{
			$this->queue->touchUser($userId);
		}
	}

	return new Action(Command::ENQUEUE, ['QUEUE_POSITION' => $queuePosition, 'QUEUE_ID' => $this->queueId, 'USER_ID' => $userId]);
}