public static function Start($arParams) { $arConfig['CHAT_ID'] = intval($arParams['CHAT_ID']); if ($arConfig['CHAT_ID'] <= 0) return false; global $USER; $arConfig['USER_ID'] = intval($arParams['USER_ID']) > 0? intval($arParams['USER_ID']): IntVal($USER->GetID()); if (!$arParams['CALL_TO_GROUP']) self::MessageToPrivate($arConfig['USER_ID'], $arParams['RECIPIENT_ID'], "IM_CALL_CHAT_START"); CIMCall::Signaling(Array( 'CHAT_ID' => $arConfig['CHAT_ID'], 'USER_ID' => $arConfig['USER_ID'], 'COMMAND' => 'start', )); return true; }
'ERROR' => $errorMessage )); } else { echo CUtil::PhpToJsObject(Array( 'CHAT_ID' => $arCallData['CHAT_ID'], 'ERROR' => $e->GetString() )); } } else { CIMCall::Signaling(Array( 'CHAT_ID' => $chatId, 'USER_ID' => $userId, 'COMMAND' => $_POST['COMMAND'], )); } if ($_POST['COMMAND'] != 'invite' && $_POST['COMMAND'] != 'invite_user') { echo CUtil::PhpToJsObject(Array( 'CHAT_ID' => $chatId, 'ERROR' => $errorMessage )); } } else if ($_POST['IM_PHONE'] == 'Y' && CModule::IncludeModule('voximplant')) { require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/voximplant/ajax_hit.php"); }