var UserDemoApplication = new UserAppDemo(); var VoicePhoneState = new VoiceStateClass(); var ConferenceState = new ConferenceStateClass(); var WndUiState = new WndUiStateClass(); var ICSClientState = new ICSClientStateClass(); var VoicePhoneUI = new VoiceUIClass(); var ConferenceUI = new ConferenceUIClass(); var WndUiUI = new WndUiUIClass(); var ICSClientUI = new ICSClientUIClass(); var LanguagePage = new LanguagePageClass(); var UserState = new UserStateClass(); var I18N = new I18NClass(); var UserAppNotPrintElems = { SendChatMessage: [1], Call: [2, 3], SendFile: [1], ReceiveFile: [2] }; function LoadUserConfig() { if (UserConfig === undefined || UserConfig === null) { alert("UserConfig lost, did you deleted it?"); return; } //1¡¢ invoke icsclient method ,SetServerInfo var IcsServerInfoObj = {}; IcsServerInfoObj.ip = UserConfig.ICSClient["icsgatewayIp"]; IcsServerInfoObj.port = UserConfig.ICSClient["icsgatewayPort"]; IcsServerInfoObj.name = UserConfig.ICSClient["icsgatewayName"]; IcsServerInfoObj.vdnId = UserConfig.ICSClient["VdnID"]; if (UserConfig.ICSClient["sslEnable"]) { IcsServerInfoObj.sslEnable = 1; } else { IcsServerInfoObj.sslEnable = 0; } var strServerInfo = JSON.stringify(IcsServerInfoObj); ICSClientExcute("SetServerInfo", strServerInfo); var backSipserverInfo = UserConfig.Voice["BackSipServerIP"]; backSipserverInfo = backSipserverInfo.replace(/^\s+|\s+$/g,''); if (backSipserverInfo !==''){ backSipserverInfo = '[{"ip":"' + UserConfig.Voice["BackSipServerIP"] + '","port":"' + UserConfig.Voice["BackSipServerPort"] + '"}]'; } //3¡¢auto config voice ocx serverInfo localInfo VoiceExcute("SetSipServerInfo", UserConfig.Voice["SipServerIP"], UserConfig.Voice["SipServerPort"], backSipserverInfo); //set the backServerInfo default to empty string VoiceExcute("SetLocalInfo", UserConfig.Voice["LocalIP"], UserConfig.Voice["LocalSipPort"], UserConfig.Voice["LocalAudioPort"]); //4 change the page text according to the language config var langobj = LanguagePage.GetLanguagePage(UserConfig.Common['Language']); I18N.SwitchI18N(langobj); } // !function UserAppDemo interfaces excute function UserAppDemoExcute(sInterfaceName) { var _argumentsInfo = ""; for(var i=0; i