Exemple #1
0
        private void StartDialOutFailureDialog(bool didUserDecline)
        {
            try
            {
                string mainPrompt;
                if (didUserDecline)
                {
                    mainPrompt = m_configuration.UserDeclinedStatement.MainPrompt;
                }
                else
                {
                    mainPrompt = m_configuration.DialupFailedStatement.MainPrompt;
                }

                this.Logger.Log(Logger.LogLevel.Info, "DialupService: Dialup was unsuccessful. Preparing statement for customer.");

                //Start simple dialog which only speaks a given statement.
                SimpleStatementDialog simpleDialog = new SimpleStatementDialog(mainPrompt, this.CustomerSession.CustomerServiceChannel.ServiceChannelCall);
                simpleDialog.Completed += new EventHandler <DialogCompletedEventArgs>(this.DeclinedDialogCompleted);
                simpleDialog.Run();
            }
            catch (InvalidOperationException exp)
            {
                this.EndService(exp);
            }
        }
Exemple #2
0
 /// <summary>
 ///Start simple dialog which only speaks a statement and dialog completion event is handled by passed event handler.
 /// </summary>
 /// <param name="mainPrompt"></param>
 /// <param name="dialogCompleted"></param>
 private void StartSimpleDialog(string mainPrompt, EventHandler <DialogCompletedEventArgs> dialogCompleted)
 {
     try
     {
         SimpleStatementDialog simpleStatDialog = new SimpleStatementDialog(mainPrompt, this.CustomerSession.CustomerServiceChannel.ServiceChannelCall);
         simpleStatDialog.Completed += dialogCompleted;
         simpleStatDialog.Run();
     }
     catch (InvalidOperationException exp)
     {
         this.EndService(exp);
     }
 }
Exemple #3
0
 public static void PlayCallWasDeclined(
     AudioVideoCall avCall,
     EventHandler <DialogCompletedEventArgs> dialogCompleted)
 {
     try
     {
         SimpleStatementDialog simpleStatDialog = new SimpleStatementDialog("The call was declined.", avCall);
         simpleStatDialog.Completed += dialogCompleted;
         simpleStatDialog.Run();
     }
     catch (InvalidOperationException)
     {
         // Ignore if we get this since we are just missing an announcement.
     }
 }
Exemple #4
0
        private void TimerElapsed(object sender, ElapsedEventArgs e)
        {
            if (this.CustomerSession.RosterTrackingService.ParticipantCount <= 0)
            {
                this.EndService(null); // Only customer is there or everyone has left.
            }
            try
            {
                string mainPrompt = string.Format(CultureInfo.InvariantCulture, "{0} minute", c_intervalMins * m_count++);

                //Start simple dialog which only speaks a  given statement.
                SimpleStatementDialog simpleDialog = new SimpleStatementDialog(mainPrompt, this.CustomerSession.CustomerServiceChannel.ServiceChannelCall);
                simpleDialog.Completed += new EventHandler <DialogCompletedEventArgs>(this.TimeOutDialogCompleted);
                simpleDialog.Run();
            }
            catch (InvalidOperationException exp)
            {
                this.EndService(exp);
            }
        }