public void PlaceScheduleReminderCall(CallButlerAuthInfo authInfo, Guid extensionID, OutlookReminder[] reminders)
 {
     if (Authenticate(authInfo))
     {
         scriptService.PlaceScheduleReminderCall(extensionID, reminders);
     }
 }
 public ScheduleReminderScriptProcessor(WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension, OutlookReminder [] reminders)
 {
     this.extension = extension;
     this.reminders = reminders;
 }
Пример #3
0
        public void PlaceScheduleReminderCall(Guid extensionID, OutlookReminder [] reminders)
        {
            try
            {
                // If the transfer is an extension, find the extension
                WOSI.CallButler.Data.CallButlerDataset.ExtensionsRow extension = dataProvider.GetExtension(Properties.Settings.Default.CustomerID, extensionID);

                if (extension != null)
                {
                    if (!extension.DoNotDisturb)
                    {
                        int openLineNumber = 0;

                        // Find an open line
                        for (int index = 1; index <= telecomProvider.LineCount; index++)
                        {
                            if (!telecomProvider.IsLineInUse(index))
                            {
                                // Disable the line for incoming calls
                                tsInterfaces[index].Locked = true;
                                openLineNumber = index;
                                break;
                            }
                        }

                        if (openLineNumber != 0)
                        {
                            // If we get here, we have an open line and we should start processing our schedule reminder
                            tsInterfaces[openLineNumber].ScriptProcessor = new ScheduleReminderScriptProcessor(extension, reminders );
                            tsInterfaces[openLineNumber].ScriptProcessor.StartProcessing(tsInterfaces[openLineNumber], telecomProvider, dataProvider);

                            return;
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
        private string GetReminderDetails(OutlookReminder reminder)
        {
            string scheduleDetails = "You have an appointment at " + reminder.ScheduledDateTime.ToShortTimeString() + ".";

             if (reminder.Subject.Length > 0)
             {
                 scheduleDetails += "The subject of this appointment is " + reminder.Subject + ". ";
             }

             if (reminder.Location.Length > 0)
             {
                 scheduleDetails += "The location of this appointment is " + reminder.Location + ". ";
             }

             return scheduleDetails;
        }