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");