Ejemplo n.º 1
0
 public void LinkScriptProcessor(ScriptProcessorBase scriptProcessor)
 {
     linkedScriptProcessor = scriptProcessor;
 }
Ejemplo n.º 2
0
 private void UnlinkScriptProcessor()
 {
     linkedScriptProcessor = null;
 }
 public void LinkScriptProcessor(ScriptProcessorBase scriptProcessor)
 {
     linkedScriptProcessor = scriptProcessor;
 }
 private void UnlinkScriptProcessor()
 {
     linkedScriptProcessor = null;
 }
Ejemplo n.º 5
0
        public void TransferToExtension(string extensionNumber, ScriptProcessorBase onHoldScriptProcessor, TelecomScriptInterface tsInterface, bool disableCallScreening)
        {
            try
            {
                int extNumber = Convert.ToInt32(extensionNumber);
                WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension;

                // If the transfer is an extension, find the extension
                if (extNumber == 0)
                {
                    // Get our receptionist extension
                    extension = dataProvider.GetExtension(Properties.Settings.Default.CustomerID, Properties.Settings.Default.ReceptionistExtensionID);
                }
                else
                {
                    extension = dataProvider.GetExtensionNumber(Properties.Settings.Default.CustomerID, extNumber);
                }

                if (extension != null)
                {
                    // Start the voicemail processing script
                    if (onHoldScriptProcessor == null)
                        tsInterface.ScriptProcessor = new VoicemailScriptProcessor(extension, vmService , registrarService, pluginManager);
                    else
                        tsInterface.ScriptProcessor = onHoldScriptProcessor;

                    tsInterface.ScriptProcessor.StartProcessing(tsInterface, telecomProvider, dataProvider);

                    if (!extension.DoNotDisturb /*&& Licensing.Management.AppPermissions.StatIsPermitted("Extensions.TelephoneNumbers")*/)
                    {
                        int openLineNumber = FindAndHoldOpenLine();

                        if (openLineNumber != 0)
                        {
                            // If we get here, we have an open line and we should start processing our find me follow me
                            tsInterfaces[openLineNumber].ScriptProcessor = new ExtensionScriptProcessor(this, tsInterface, extension, vmMailerService, registrarService/*, extStateService*/, disableCallScreening, true, false);
                            tsInterfaces[openLineNumber].ScriptProcessor.StartProcessing(tsInterfaces[openLineNumber], telecomProvider, dataProvider);

                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                LoggingService.AddLogEntry(LogLevel.ErrorsOnly, Utils.ErrorUtils.FormatErrorString(ex), true);
            }

            // If we get here, the transfer has failed
            tsInterface.IMLInterpreter.SignalTransferFailure();
        }