示例#1
0
        public DemoCallingBot(ICallingBotService callingBotService)
        {
            this.CallingBotService = callingBotService;

            this.CallingBotService.OnIncomingCallReceived += this.OnIncomingCallReceived;
            this.CallingBotService.OnRecordCompleted      += this.OnRecordCompleted;
            this.CallingBotService.OnHangupCompleted      += OnHangupCompleted;
        }
示例#2
0
        public CallingBot(ICallingBotService callingBotService, IDialog <object> rootDialog)
        {
            _rootDialog       = rootDialog;
            CallingBotService = callingBotService ?? throw new ArgumentNullException(nameof(callingBotService));

            CallingBotService.OnIncomingCallReceived += OnIncomingCallReceived;
            CallingBotService.OnPlayPromptCompleted  += OnPlayPromptCompleted;
            CallingBotService.OnRecordCompleted      += OnRecordCompleted;
            CallingBotService.OnHangupCompleted      += OnHangupCompleted;
        }
示例#3
0
        public SimpleIVRBot(ICallingBotService callingBotService)
        {
            if (callingBotService == null)
                throw new ArgumentNullException(nameof(callingBotService));

            CallingBotService = callingBotService;

            CallingBotService.OnIncomingCallReceived += OnIncomingCallReceived;
            CallingBotService.OnPlayPromptCompleted += OnPlayPromptCompleted;
            CallingBotService.OnRecordCompleted += OnRecordCompleted;
            CallingBotService.OnRecognizeCompleted += OnRecognizeCompleted;
            CallingBotService.OnHangupCompleted += OnHangupCompleted;
        }
示例#4
0
 /// <summary>
 /// Calling Bot model constructor
 /// </summary>
 /// <param name="callingBotService"></param>
 public CallingModel(ICallingBotService callingBotService)
 {
     if (callingBotService == null)
     {
         throw new ArgumentNullException(nameof(callingBotService));
     }
     CallingBotService = callingBotService;
     CallingBotService.OnIncomingCallReceived += OnIncomingCallReceived;
     CallingBotService.OnPlayPromptCompleted  += OnPlayPromptCompleted;
     CallingBotService.OnRecordCompleted      += OnRecordCompleted;
     CallingBotService.OnRecognizeCompleted   += OnRecognizeCompleted;
     CallingBotService.OnHangupCompleted      += OnHangupCompleted;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="IVRBot"/> class.
        /// </summary>
        /// <param name="callingBotService">The calling bot service.</param>
        public IVRBot(ICallingBotService callingBotService)
        {
            if (callingBotService == null)
            {
                throw new ArgumentNullException(nameof(callingBotService));
            }

            this.CallingBotService = callingBotService;

            // Registering Call events
            this.CallingBotService.OnIncomingCallReceived += OnIncomingCallReceived;
            this.CallingBotService.OnPlayPromptCompleted  += OnPlayPromptCompleted;
            this.CallingBotService.OnRecordCompleted      += OnRecordCompletedAsync;
            this.CallingBotService.OnRecognizeCompleted   += OnRecognizeCompleted;
            this.CallingBotService.OnHangupCompleted      += OnHangupCompleted;
        }
示例#6
0
        public IVRBot2(ICallingBotService callingBotService)
        {
            if (callingBotService == null)
            {
                throw new ArgumentNullException(nameof(callingBotService));
            }

            this.CallingBotService = callingBotService;

            this.CallingBotService.OnIncomingCallReceived += this.OnIncomingCallReceived;
            this.CallingBotService.OnPlayPromptCompleted  += this.OnPlayPromptCompleted;
            this.CallingBotService.OnRecordCompleted      += this.OnRecordCompleted;
            this.CallingBotService.OnRecognizeCompleted   += this.OnRecognizeCompleted;
            this.CallingBotService.OnHangupCompleted      += OnHangupCompleted;

            rootIntentActiveState.Add(RootIntent.REGISTER, false);
            rootIntentActiveState.Add(RootIntent.RESCHEDULE, false);
            rootIntentActiveState.Add(RootIntent.CANCEL, false);
            rootIntentActiveState.Add(RootIntent.LOOK_UP, false);
        }