• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/transfer/transferor.php
  • Класс: BitrixVoximplantTransferTransferor
  • Вызов: Transferor::updateCrmData
static function updateCrmData(Call $clientCall, Call $internalCall, $newUserId)
{
	$clientCall->updateUserId($newUserId);

	$internalCall->update([
		'CRM' => $clientCall->isCrmEnabled() ? 'Y' : 'N',
		'CRM_ACTIVITY_ID' => $clientCall->getCrmActivityId()
	]);

	$internalCall->updateCrmEntities($clientCall->getCrmEntities());

	if($clientCall->isCrmEnabled())
	{
		$config = $clientCall->getConfig();
		if (isset($config['CRM_TRANSFER_CHANGE']) && $config['CRM_TRANSFER_CHANGE'] == 'Y' && $newUserId)
		{
			CVoxImplantCrmHelper::updateCrmEntities($clientCall->getCreatedCrmEntities(), ['ASSIGNED_BY_ID' => $newUserId]);
		}
	}

	$internalCall->getSignaling()->sendReplaceCallerId($newUserId, $clientCall->getCallerId());
}