Exemplo n.º 1
0
        public async Task DoStep(ISettings settings, ICall call)
        {
            _promptPlayer = call.LanguageSelectionPromptPlayer;
            _promptPlayer.SetStepProcessor(this);
            _call = call;
            _call.Logger.Info("Get Language Step Start");
            _settings = (LanguageStepSettings)settings;
            call.SipApiClient.OnDtmfReceivedEvent += DTMF_ReceivedEvent;
            call.FireStateChange(Trigger.PlayLanguagePrompts);
            _promptPlayer.AddPromptsToQueue(_settings.Prompts);
            await _promptPlayer.PlayNextPromptInQueue();

            _inputTimeout.Interval = _settings.MaxDigitTimeoutInSeconds * 1000;
            _call.Logger.Info("Get Language Step End");
        }
Exemplo n.º 2
0
        public async Task DoStepAsync(Step step, ICall call)
        {
            _promptPlayer = call.LanguageSelectionPromptPlayer;
            _promptPlayer.SetStepProcessor(this);
            _call = call;
            _call.Logger.Information("Get Language Step Start {@Call}", call.CallState);
            _step     = step;
            _settings = (LanguageStepSettings)step.NodeData.Properties;
            call.SipApiClient.OnDtmfReceivedEvent += DTMF_ReceivedEvent;
            await call.FireStateChange(Trigger.PlayLanguagePrompts);

            _promptPlayer.AddPromptsToQueue(_settings.Prompts);
            await _promptPlayer.PlayNextPromptInQueue();

            _inputTimeout.Interval = _settings.MaxDigitTimeoutInSeconds * 1000;
            _call.Logger.Information("Get Language Step End {@Call}", call.CallState);
        }