• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/routing/router.php
  • Класс: BitrixVoximplantRoutingRouter
  • Вызов: Router::buildCallbackExecutionGraph
protected function buildCallbackExecutionGraph(Call $call)
{
	$config = $call->getConfig();
	$rootNode = new Root();
	$lastNode = $rootNode;

	if($config['CRM_FORWARD'] === 'Y')
	{
		$responsibleId = CVoxImplantCrmHelper::getResponsibleWithCall($this->call);
		if($responsibleId)
		{
			if($config['TIMEMAN'] != 'Y' || CVoxImplantUser::GetActiveStatusByTimeman($responsibleId))
			{
				list($crmNode, $nextNode) = $this->buildUserGraph($responsibleId, 'crm', $config['CRM_RULE'], true);
				$lastNode->setNext($crmNode);
				$lastNode = $nextNode;
			}
		}
	}

	if($call->getQueueId())
	{
		$queueNode = $this->buildQueueGraph($call->getQueueId(), $config['TIMEMAN'] === 'Y');
		if($queueNode instanceof Node)
		{
			$lastNode->setNext($queueNode);
		}
	}

	return $rootNode;
}