From 64d2ac15773418bc404cdfec0866d649c5a2c976 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Fri, 16 Dec 2022 21:08:54 +0100 Subject: [PATCH] Fix GatherUsingspeak activity optional input --- .../Activities/GatherUsingSpeak.cs | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/Elsa.Telnyx/Activities/GatherUsingSpeak.cs b/src/modules/Elsa.Telnyx/Activities/GatherUsingSpeak.cs index e4a3799b5..f188d3795 100644 --- a/src/modules/Elsa.Telnyx/Activities/GatherUsingSpeak.cs +++ b/src/modules/Elsa.Telnyx/Activities/GatherUsingSpeak.cs @@ -151,17 +151,17 @@ public class GatherUsingSpeak : ActivityBase, IBookmarks { var request = new GatherUsingSpeakRequest( Language.Get(context) ?? throw new Exception("Language is required."), - Voice.Get(context) ?? throw new Exception("Language is required."), - Payload.Get(context) ?? throw new Exception("Language is required."), - PayloadType.Get(context), - ServiceLevel.Get(context), - InterDigitTimeoutMillis.Get(context), - MaximumDigits.Get(context), - MaximumTries.Get(context), - MinimumDigits.Get(context), - TerminatingDigit.Get(context).EmptyToNull(), - TimeoutMillis.Get(context), - ValidDigits.Get(context).EmptyToNull() + Voice.Get(context) ?? throw new Exception("Voice is required."), + Payload.Get(context) ?? throw new Exception("Payload is required."), + PayloadType.TryGet(context), + ServiceLevel.TryGet(context), + InterDigitTimeoutMillis.TryGet(context), + MaximumDigits.TryGet(context), + MaximumTries.TryGet(context), + MinimumDigits.TryGet(context), + TerminatingDigit.TryGet(context).EmptyToNull(), + TimeoutMillis.TryGet(context), + ValidDigits.TryGet(context).EmptyToNull() ); var callControlId = context.GetPrimaryCallControlId(CallControlId) ?? throw new Exception("CallControlId is required");