public void ChangeInputSettings(PhoneInputHandlerSettings settings) { _settings = settings; MaxDigitTimeoutInSeconds = _settings.MaxDigitTimeoutInSeconds; SetTimerInterval(); NumberOfDigitsToWaitForNextStep = _settings.NumberOfDigitsToWaitForNextStep; TerminationDigit = _settings.TerminationDigit; }
public AsteriskPhoneInputHandler(ICall call, IPromptPlayer promptPlayer) { _call = call; _promptPlayer = promptPlayer; _settings = new PhoneInputHandlerSettings(); DigitsReceived = ""; DigitTimeoutTimer = new Timer(); DigitTimeoutTimer.Elapsed += DigitTimeoutEvent; MaxDigitTimeoutInSeconds = 0; NumberOfDigitsToWaitForNextStep = 0; TerminationDigit = "#"; }
public void ChangeInputSettings(PhoneInputHandlerSettings settings) { if (_settings != null) { _settings = settings; MaxDigitTimeoutInSeconds = _settings.MaxDigitTimeoutInSeconds; SetValueAs = _settings.SetValueAs; SetTimerInterval(); NumberOfDigitsToWaitForNextStep = _settings.NumberOfDigitsToWaitForNextStep; TerminationDigit = _settings.TerminationDigit; Direction = _settings.Direction; } else { NumberOfDigitsToWaitForNextStep = -1; TerminationDigit = "D"; Direction = Direction.Both; _settings.SetValueAs = ""; _settings.SetValueAsDestination = false; _settings.Options = new Dictionary <string, int>(); } }