var AgentAppDemoApplication = new AgentAppDemo(); var VoicePhoneState = new VoiceStateClass(); var AgentState = new AgentStateClass(); var ConferenceState = new ConferenceStateClass(); var WndUiState = new WndUiStateClass(); var AgentUI = new AgentUIClass(); var VoicePhoneUI = new VoiceUIClass(); var ConferenceUI = new ConferenceUIClass(); var WndUiUI = new WndUiUIClass(); var LanguagePage = new LanguagePageClass(); var UserState = new UserStateClass(); var I18N = new I18NClass(); var AgentAppNotPrintElems = { Login: [2, 4], Register: [1, 2], SendChat: [1], SendFile: [1], ReceiveFile: [2] }; function CopyValueToInput(strValue, inputID) { document.getElementById(inputID).value = strValue; } //load agent config from config file function LoadAgentConfig(localIp) { //load agent config // CopyValueToInput(Config.Agent["MainCcsIP"], "AgentAppDemo.MainCcsIP"); // CopyValueToInput(Config.Agent["AutoAnswer"], "AgentAppDemo.AutoAnswer"); // CopyValueToInput(Config.Agent["AutoRelease"], "AgentAppDemo.AutoRelease"); // CopyValueToInput(Config.Agent["AutoEnterIdle"], "AgentAppDemo.AutoEnterIdle"); // CopyValueToInput(Config.Agent["MyID"], "AgentAppDemo.AgentProgID"); // // //load agent voice config // CopyValueToInput(Config.Voice["SipServerIP"], "AgentAppDemo.SipServerIP"); // CopyValueToInput(Config.Voice["SipServerPort"], "AgentAppDemo.SipServerPort"); // CopyValueToInput(Config.Voice["LocalIP"], "AgentAppDemo.LocalIP"); // CopyValueToInput(Config.Voice["LocalSipPort"], "AgentAppDemo.LocalSipPort"); // CopyValueToInput(Config.Voice["LocalAudioPort"], "AgentAppDemo.LocalAudioPort"); var backSipserverInfo = Config.Voice["BackSipServerIP"]; backSipserverInfo = backSipserverInfo.replace(/^\s+|\s+$/g,''); if (backSipserverInfo !==''){ backSipserverInfo = '[{"ip":"' + Config.Voice["BackSipServerIP"] + '","port":"' + Config.Voice["BackSipServerPort"] + '"}]'; } //auto config voice ocx serverInfo localInfo VoiceExcute("SetSipServerInfo", Config.Voice["SipServerIP"], Config.Voice["SipServerPort"], backSipserverInfo); //set the backServerInfo default to empty string // VoiceExcute("SetLocalInfo", Config.Voice["LocalIP"], Config.Voice["LocalSipPort"], Config.Voice["LocalAudioPort"]); VoiceExcute("SetLocalInfo", localIp, Config.Voice["LocalSipPort"], Config.Voice["LocalAudioPort"]); //change the page text according to the language config var langobj = LanguagePage.GetLanguagePage(Config.Common['Language']); I18N.SwitchI18N(langobj); } // !function UserAppDemo interfaces excute function AgentAppDemoExcute(sInterfaceName) { var _argumentsInfo = ""; var _phoneNumber = ""; for(var i=0; i