コード例 #1
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string callFlowScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Call Flow.xml";

            IMLScript imlScript = new IMLScript();

            ScriptPage introPage = new ScriptPage();

            introPage.ID = Guid.NewGuid().ToString();

            if (Properties.Settings.Default.WelcomeGreetingDelay > 0)
            {
                Delay welcomeDelay = new Delay();
                welcomeDelay.DelayTime = Properties.Settings.Default.WelcomeGreetingDelay.ToString();
                introPage.Actions.Add(welcomeDelay);
            }

            /*if (LicenseService.IsTrialLicense())
             * {
             *  introPage.Actions.Add(ScriptCompilers.ScriptUtils.CreateExternalAction(ScriptCompilers.BaseExternalCommands.CALLBUTLERINTERNAL_PlayLicenseIntroGreeting.ToString(), ""));
             * }*/

            ScriptCompilers.ScriptUtils.ProcessPersonalizedGreeting(dataProvider, ref introPage, Properties.Settings.Default.CustomerID, tsInterface.IMLInterpreter.CallerDisplayName, tsInterface.IMLInterpreter.CallerUsername, tsInterface.IMLInterpreter.CallerHost, tsInterface.IMLInterpreter.DialedUsername);

            if (File.Exists(callFlowScriptLocation))
            {
                GotoPage gotoPage = new GotoPage();
                gotoPage.Location = callFlowScriptLocation;
                introPage.Actions.Add(gotoPage);

                imlScript.Pages.Add(introPage);
            }

            tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
        }
コード例 #2
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string voicemailScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Voicemail.xml";

            if (File.Exists(voicemailScriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(voicemailScriptLocation);

                // Set our script variables
                tsInterface.IMLInterpreter.SetLocalVariable("ExtensionID", extension.ExtensionID.ToString());

                //if (Licensing.Management.AppPermissions.StatIsPermitted("Settings.MusicSettings"))
                //{
                tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.HoldMusicRootDirectory));
                //}

                /*else
                 * {
                 *  tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", "");
                 * }*/

                tsInterface.IMLInterpreter.SetLocalVariable("VoicemailRootFolder", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.VoicemailRootDirectory));

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #3
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            LoggingService.AddLogEntry(LogLevel.Extended, "(Line " + tsInterface.LineNumber + ") Executing custom script at " + customScriptLocation, false);

            IMLScript imlScript = new IMLScript();

            ScriptPage introPage = new ScriptPage();

            introPage.ID = Guid.NewGuid().ToString();

            /*if (LicenseService.IsTrialLicense())
             * {
             *  if (Properties.Settings.Default.WelcomeGreetingDelay > 0)
             *  {
             *      Delay welcomeDelay = new Delay();
             *      welcomeDelay.DelayTime = Properties.Settings.Default.WelcomeGreetingDelay.ToString();
             *      introPage.Actions.Add(welcomeDelay);
             *  }
             *
             *  introPage.Actions.Add(ScriptCompilers.ScriptUtils.CreateExternalAction(ScriptCompilers.BaseExternalCommands.CALLBUTLERINTERNAL_PlayLicenseIntroGreeting.ToString(), ""));
             * }*/

            ScriptCompilers.ScriptUtils.ProcessPersonalizedGreeting(dataProvider, ref introPage, Properties.Settings.Default.CustomerID, tsInterface.IMLInterpreter.CallerDisplayName, tsInterface.IMLInterpreter.CallerUsername, tsInterface.IMLInterpreter.CallerHost, tsInterface.IMLInterpreter.DialedUsername);

            GotoPage gotoPage = new GotoPage();

            gotoPage.Location = customScriptLocation;
            introPage.Actions.Add(gotoPage);

            imlScript.Pages.Add(introPage);

            tsInterface.IMLInterpreter.StartScript(imlScript, System.IO.Path.GetDirectoryName(customScriptLocation));
        }
コード例 #4
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            LoggingService.AddLogEntry(LogLevel.Extended, "(Line " + tsInterface.LineNumber + ") Executing custom script at " + customScriptLocation, false);

            IMLScript imlScript = new IMLScript();

            ScriptPage introPage = new ScriptPage();
            introPage.ID = Guid.NewGuid().ToString();

            /*if (LicenseService.IsTrialLicense())
            {
                if (Properties.Settings.Default.WelcomeGreetingDelay > 0)
                {
                    Delay welcomeDelay = new Delay();
                    welcomeDelay.DelayTime = Properties.Settings.Default.WelcomeGreetingDelay.ToString();
                    introPage.Actions.Add(welcomeDelay);
                }

                introPage.Actions.Add(ScriptCompilers.ScriptUtils.CreateExternalAction(ScriptCompilers.BaseExternalCommands.CALLBUTLERINTERNAL_PlayLicenseIntroGreeting.ToString(), ""));
            }*/

            ScriptCompilers.ScriptUtils.ProcessPersonalizedGreeting(dataProvider, ref introPage, Properties.Settings.Default.CustomerID, tsInterface.IMLInterpreter.CallerDisplayName, tsInterface.IMLInterpreter.CallerUsername, tsInterface.IMLInterpreter.CallerHost, tsInterface.IMLInterpreter.DialedUsername);

            GotoPage gotoPage = new GotoPage();
            gotoPage.Location = customScriptLocation;
            introPage.Actions.Add(gotoPage);

            imlScript.Pages.Add(introPage);

            tsInterface.IMLInterpreter.StartScript(imlScript, System.IO.Path.GetDirectoryName(customScriptLocation));
        }
コード例 #5
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string scriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Outbound Call.xml";

            if (File.Exists(scriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

                tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.HoldMusicRootDirectory));

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));

                WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension = dataProvider.GetExtensionNumber(Properties.Settings.Default.CustomerID, outboundExtensionNumber);

                // If the outbound ts interface is null, then this means we don't have any available lines to make outbound calls.
                // Also check to see if this extension is allowed to make outbound calls
                if (outboundTsInterface == null || (outboundExtensionNumber >= 0 && extension != null && !extension.EnableOutboundCalls))
                {
                    tsInterface.IMLInterpreter.SignalCallFailure();
                    outboundTsInterface.Locked = false;
                }
                else
                {
                    // Link to our outbound script processor and start it
                    outboundTsInterface.ScriptProcessor.LinkScriptProcessor(this);
                    outboundTsInterface.ScriptProcessor.StartProcessing(outboundTsInterface, telecomProvider, dataProvider);
                }
            }
        }
コード例 #6
0
        public void StartFromMainMenu(TelecomScriptInterface tsInterface)
        {
            string callFlowScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Call Flow.xml";

            if (File.Exists(callFlowScriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(callFlowScriptLocation);
                tsInterface.IMLInterpreter.StartScript(imlScript, "MainMenuPage", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string scriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Transfer Conference Participant.xml";

            if (File.Exists(scriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

                tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.HoldMusicRootDirectory));

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #8
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string scheduleReminderScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Schedule Reminder.xml";

            if (File.Exists(scheduleReminderScriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scheduleReminderScriptLocation);

                extensionNumberIndex = -1;

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string scriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Receptionist Finder.xml";

            if (File.Exists(scriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

                // Set our script variables
                tsInterface.IMLInterpreter.SetLocalVariable("ExtensionID", extension.ExtensionID.ToString());

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #10
0
        private void StartScript(string scriptLocation)
        {
            IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

            // Set our script variables
            if (scriptVariables != null)
            {
                foreach (string name in scriptVariables.AllKeys)
                {
                    this.tsInterface.IMLInterpreter.SetLocalVariable(name, scriptVariables[name]);
                }
            }

            this.tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
        }
コード例 #11
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            tsInterface.IMLInterpreter.CallerDisplayName = string.Format("Calling {0}", numberToDial);
            tsInterface.IMLInterpreter.CallerHost        = "";
            tsInterface.IMLInterpreter.CallerUsername    = "";
            tsInterface.IMLInterpreter.DialedHost        = "";
            tsInterface.IMLInterpreter.DialedUsername    = "";

            string click2CallScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Click2Call Handler.xml";

            if (System.IO.File.Exists(click2CallScriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(click2CallScriptLocation);
                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #12
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string scriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Outbound Callee.xml";

            if (File.Exists(scriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

                tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.HoldMusicRootDirectory));
                tsInterface.IMLInterpreter.SetLocalVariable("NumberToCall", numberToCall);
                tsInterface.IMLInterpreter.SetLocalVariable("FromCallerID", fromCallerID);
                tsInterface.IMLInterpreter.SetLocalVariable("CallProfile", "");

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #13
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            IMLScript imlScript;

            string moduleData = addonModule.OnStartScript(new CallButler.Service.Plugin.CallButlerScriptContext(tsInterface.IMLInterpreter));

            if (addonModule.ModuleReturnsScriptPath)
            {
                imlScript = IMLScript.OpenScript(moduleData);
            }
            else
            {
                imlScript = IMLScript.LoadFromXML(moduleData);
            }

            tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
        }
コード例 #14
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            this.tsInterface = tsInterface;

            string scriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Transfer Conference.xml";

            if (File.Exists(scriptLocation))
            {
                IMLScript imlScript = IMLScript.OpenScript(scriptLocation);

                tsInterface.IMLInterpreter.SetLocalVariable("HoldMusicLocation", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.HoldMusicRootDirectory));

                // Set our recording path
                tsInterface.IMLInterpreter.SetLocalVariable("RecordingPath", WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.CallRecordingSoundPath));
                tsInterface.IMLInterpreter.SetLocalVariable("ExtensionID", extension.ExtensionID.ToString());

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
            }
        }
コード例 #15
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            tsInterface.IMLInterpreter.DefaultSpeechVoice = Properties.Settings.Default.DefaultTTSVoice;

            // Set our volumes
            telecomProvider.SetRecordVolume(tsInterface.LineNumber, Properties.Settings.Default.RecordVolume);
            telecomProvider.SetSoundVolume(tsInterface.LineNumber, Properties.Settings.Default.SoundVolume);
            telecomProvider.SetSpeechVolume(tsInterface.LineNumber, Properties.Settings.Default.SpeechVolume);

            string extensionFinderScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Extension Finder.xml";

            if (File.Exists(extensionFinderScriptLocation))
            {
                onholdTsInterface.IMLInterpreter.SyncExternalAction += new EventHandler <WOSI.IVR.IML.SyncExternalActionEventArgs>(IMLInterpreter_SyncExternalAction);

                IMLScript imlScript = IMLScript.OpenScript(extensionFinderScriptLocation);

                // Get our call script element
                ScriptElement[] callElements = imlScript.GetAllElementsOfType(typeof(Call));

                if (callElements != null && callElements.Length > 0)
                {
                    callScriptElement = (Call)callElements[0];
                }

                extensionNumberIndex = -1;

                this.tsInterface = tsInterface;

                // Copy our variables
                tsInterface.IMLInterpreter.MergeLocalVariables(onholdTsInterface.IMLInterpreter);

                tsInterface.IMLInterpreter.SetLocalVariable("ExtensionTimeout", "20");

                tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));

                // Tell our extension that they have an incoming call
                //CallInfo callInfo = new CallInfo(tsInterface.CurrentCallID, tsInterface.LineNumber, CallStatus.Incoming, onholdTsInterface.IMLInterpreter.CallerDisplayName, onholdTsInterface.IMLInterpreter.CallerUsername);
                //extStateService.UpdateCallState(extension.ExtensionID, callInfo);
            }
        }
コード例 #16
0
        protected override void OnStartProcessing(TelecomScriptInterface tsInterface, CallButler.Telecom.TelecomProviderBase telecomProvider, WOSI.CallButler.Data.DataProviders.CallButlerDataProviderBase dataProvider)
        {
            string callFlowScriptLocation = WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory) + "\\Call Flow.xml";

            IMLScript imlScript = new IMLScript();

            ScriptPage introPage = new ScriptPage();
            introPage.ID = Guid.NewGuid().ToString();

            if (Properties.Settings.Default.WelcomeGreetingDelay > 0)
            {
                Delay welcomeDelay = new Delay();
                welcomeDelay.DelayTime = Properties.Settings.Default.WelcomeGreetingDelay.ToString();
                introPage.Actions.Add(welcomeDelay);
            }

            /*if (LicenseService.IsTrialLicense())
            {
                introPage.Actions.Add(ScriptCompilers.ScriptUtils.CreateExternalAction(ScriptCompilers.BaseExternalCommands.CALLBUTLERINTERNAL_PlayLicenseIntroGreeting.ToString(), ""));
            }*/

            ScriptCompilers.ScriptUtils.ProcessPersonalizedGreeting(dataProvider, ref introPage, Properties.Settings.Default.CustomerID, tsInterface.IMLInterpreter.CallerDisplayName, tsInterface.IMLInterpreter.CallerUsername, tsInterface.IMLInterpreter.CallerHost, tsInterface.IMLInterpreter.DialedUsername);

            if (File.Exists(callFlowScriptLocation))
            {
                GotoPage gotoPage = new GotoPage();
                gotoPage.Location = callFlowScriptLocation;
                introPage.Actions.Add(gotoPage);

                imlScript.Pages.Add(introPage);
            }

            tsInterface.IMLInterpreter.StartScript(imlScript, WOSI.Utilities.FileUtils.GetApplicationRelativePath(Properties.Settings.Default.SystemScriptsRootDirectory));
        }