Fix GatherUsingspeak activity optional input

This commit is contained in:
Sipke Schoorstra 2022-12-16 21:08:54 +01:00
parent e172118af9
commit 64d2ac1577

View file

@ -151,17 +151,17 @@ public class GatherUsingSpeak : ActivityBase<CallGatherEndedPayload>, 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");