From e227b23f1f7bda7633fb4baeab9442d3f64c4aab Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Sat, 3 Apr 2021 22:14:53 +0200 Subject: [PATCH] Incremental work on Telnyx activity configurations --- .../Activities/AnswerCall.cs | 38 +++++-- .../Activities/BridgeCalls.cs | 26 ++++- .../Activities/CallRingGroup.cs | 43 ++++--- .../Elsa.Activities.Telnyx/Activities/Dial.cs | 106 ++++++++++++------ 4 files changed, 146 insertions(+), 67 deletions(-) diff --git a/src/activities/Elsa.Activities.Telnyx/Activities/AnswerCall.cs b/src/activities/Elsa.Activities.Telnyx/Activities/AnswerCall.cs index 67126f63a..9a61f8c25 100644 --- a/src/activities/Elsa.Activities.Telnyx/Activities/AnswerCall.cs +++ b/src/activities/Elsa.Activities.Telnyx/Activities/AnswerCall.cs @@ -6,6 +6,7 @@ using Elsa.ActivityResults; using Elsa.Attributes; using Elsa.Design; using Elsa.Exceptions; +using Elsa.Expressions; using Elsa.Services; using Elsa.Services.Models; using Refit; @@ -27,26 +28,47 @@ namespace Elsa.Activities.Telnyx.Activities _telnyxClient = telnyxClient; } - [ActivityProperty(Label = "Call Control ID", Hint = "Unique identifier and token for controlling the call", Category = PropertyCategories.Advanced)] + [ActivityProperty(Label = "Call Control ID", Hint = "Unique identifier and token for controlling the call", Category = PropertyCategories.Advanced, SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string CallControlId { get; set; } = default!; - [ActivityProperty(Label = "Billing Group ID", Hint = "Use this field to set the Billing Group ID for the call. Must be a valid and existing Billing Group ID.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Billing Group ID", + Hint = "Use this field to set the Billing Group ID for the call. Must be a valid and existing Billing Group ID.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? BillingGroupId { get; set; } - [ActivityProperty(Label = "Client State", Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? ClientState { get; set; } - [ActivityProperty(Label = "Command ID", Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Command ID", + Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? CommandId { get; set; } - [ActivityProperty(Label = "Webhook URL", Hint = "Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Webhook URL", + Hint = "Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? WebhookUrl { get; set; } - [ActivityProperty(Label = "Webhook URL Method", Hint = "HTTP request type used for Webhook URL", UIHint = ActivityPropertyUIHints.Dropdown, Options = new[] { "GET", "POST" }, Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Webhook URL Method", + Hint = "HTTP request type used for Webhook URL", + UIHint = ActivityPropertyUIHints.Dropdown, + Options = new[] { "GET", "POST" }, + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? WebhookUrlMethod { get; set; } protected override async ValueTask OnExecuteAsync(ActivityExecutionContext context) - { + { try { var callControlId = context.GetCallControlId(CallControlId); @@ -58,7 +80,7 @@ namespace Elsa.Activities.Telnyx.Activities { if (await e.CallIsNoLongerActiveAsync()) return Outcome(TelnyxOutcomeNames.CallIsNoLongerActive); - + throw new WorkflowException(e.Content ?? e.Message, e); } } diff --git a/src/activities/Elsa.Activities.Telnyx/Activities/BridgeCalls.cs b/src/activities/Elsa.Activities.Telnyx/Activities/BridgeCalls.cs index 6fc3a14e0..9ad5c6c94 100644 --- a/src/activities/Elsa.Activities.Telnyx/Activities/BridgeCalls.cs +++ b/src/activities/Elsa.Activities.Telnyx/Activities/BridgeCalls.cs @@ -8,6 +8,7 @@ using Elsa.Attributes; using Elsa.Builders; using Elsa.Design; using Elsa.Exceptions; +using Elsa.Expressions; using Elsa.Services; using Elsa.Services.Models; using Refit; @@ -29,19 +30,32 @@ namespace Elsa.Activities.Telnyx.Activities _telnyxClient = telnyxClient; } - [ActivityProperty(Label = "Call Control ID A", Hint = "Unique identifier and token for controlling the call.")] + [ActivityProperty(Label = "Call Control ID A", Hint = "Unique identifier and token for controlling the call.", SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? CallControlIdA { get; set; } = default!; - [ActivityProperty(Label = "Call Control ID B", Hint = "The Call Control ID of the call you want to bridge with.")] + [ActivityProperty(Label = "Call Control ID B", Hint = "The Call Control ID of the call you want to bridge with.", SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string CallControlIdB { get; set; } = default!; - [ActivityProperty(Label = "Command ID", Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Command ID", + Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? CommandId { get; set; } - [ActivityProperty(Label = "Client State", Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? ClientState { get; set; } - [ActivityProperty(Label = "Webhook URL Method", Hint = "HTTP request type used for Webhook URL", UIHint = ActivityPropertyUIHints.Dropdown, Options = new[] { "", "self" }, Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Webhook URL Method", + Hint = "HTTP request type used for Webhook URL", + UIHint = ActivityPropertyUIHints.Dropdown, + Options = new[] { "", "self" }, + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? ParkAfterUnbridged { get; set; } protected override async ValueTask OnExecuteAsync(ActivityExecutionContext context) @@ -64,7 +78,7 @@ namespace Elsa.Activities.Telnyx.Activities { if (await e.CallIsNoLongerActiveAsync()) return Outcome(TelnyxOutcomeNames.CallIsNoLongerActive); - + throw new WorkflowException(e.Content ?? e.Message, e); } } diff --git a/src/activities/Elsa.Activities.Telnyx/Activities/CallRingGroup.cs b/src/activities/Elsa.Activities.Telnyx/Activities/CallRingGroup.cs index bc511632e..566db24cc 100644 --- a/src/activities/Elsa.Activities.Telnyx/Activities/CallRingGroup.cs +++ b/src/activities/Elsa.Activities.Telnyx/Activities/CallRingGroup.cs @@ -12,6 +12,7 @@ using Elsa.Activities.Temporal; using Elsa.Attributes; using Elsa.Builders; using Elsa.Design; +using Elsa.Expressions; using Elsa.Metadata; using Elsa.Services; using Elsa.Services.Models; @@ -35,52 +36,62 @@ namespace Elsa.Activities.Telnyx.Activities { _logger = logger; } - - [ActivityProperty(UIHint = ActivityPropertyUIHints.MultiText)] + + [ActivityProperty(UIHint = ActivityPropertyUIHints.MultiText, DefaultSyntax = SyntaxNames.Json, SupportedSyntaxes = new[] { SyntaxNames.Json, SyntaxNames.JavaScript, SyntaxNames.Liquid })] public IList Extensions { get => GetState>(() => new List()); set => SetState(value); } - [ActivityProperty(Label = "Call Control ID", Hint = "Unique identifier and token for controlling the call.", Category = PropertyCategories.Advanced)] + [ActivityProperty(Label = "Call Control ID", Hint = "Unique identifier and token for controlling the call.", Category = PropertyCategories.Advanced, SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string CallControlId { get => GetState()!; set => SetState(value); } - - [ActivityProperty(Label = "Call Control App ID", Hint = "The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination.", Category = PropertyCategories.Advanced)] + + [ActivityProperty( + Label = "Call Control App ID", + Hint = "The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid } + )] public string? CallControlAppId { get => GetState(); set => SetState(value); } - - [ActivityProperty] + + [ActivityProperty(SupportedSyntaxes = new[] { SyntaxNames.Literal, SyntaxNames.JavaScript, SyntaxNames.Liquid })] public RingGroupStrategy Strategy { get => GetState(); set => SetState(value); } - [ActivityProperty(Hint = - "The 'from' number to be used as the caller id presented to the destination ('To' number). The number should be in +E164 format. This attribute will default to the 'From' number of the original call if omitted.")] + [ActivityProperty( + Hint = "The 'from' number to be used as the caller id presented to the destination ('To' number). The number should be in +E164 format. This attribute will default to the 'From' number of the original call if omitted.", + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid } + )] public string? From { get => GetState(); set => SetState(value); } - [ActivityProperty(Hint = - "The string to be used as the caller id name (SIP From Display Name) presented to the destination ('To' number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If omitted, the display name will be the same as the number in the 'From' field.")] + [ActivityProperty( + Hint = + "The string to be used as the caller id name (SIP From Display Name) presented to the destination ('To' number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If omitted, the display name will be the same as the number in the 'From' field.", + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid } + )] public string? FromDisplayName { get => GetState(); set => SetState(value); } - [ActivityProperty(DefaultValueProvider = typeof(CallRingGroup))] + [ActivityProperty(DefaultValueProvider = typeof(CallRingGroup), SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public Duration RingTime { get => GetState(() => Duration.FromSeconds(20)); @@ -92,19 +103,19 @@ namespace Elsa.Activities.Telnyx.Activities get => GetState(); set => SetState(value); } - + private IList DialedControlIds { get => GetState(() => new List()); set => SetState(value); } - + private CallAnsweredPayload? CallAnsweredPayload { get => GetState(); set => SetState(value); } - + private IList CollectedDialResponses { get => GetState(() => new List()); @@ -121,7 +132,7 @@ namespace Elsa.Activities.Telnyx.Activities protected override async ValueTask OnExitAsync(ActivityExecutionContext context, object? output) { // Hang up any pending calls. - + var answeredCallControlId = CallAnsweredPayload?.CallControlId; var outgoingCalls = CollectedDialResponses.Where(x => x.CallControlId != answeredCallControlId).ToList(); var client = context.GetService(); diff --git a/src/activities/Elsa.Activities.Telnyx/Activities/Dial.cs b/src/activities/Elsa.Activities.Telnyx/Activities/Dial.cs index c8343cd57..b25870c8f 100644 --- a/src/activities/Elsa.Activities.Telnyx/Activities/Dial.cs +++ b/src/activities/Elsa.Activities.Telnyx/Activities/Dial.cs @@ -11,6 +11,7 @@ using Elsa.Attributes; using Elsa.Builders; using Elsa.Design; using Elsa.Exceptions; +using Elsa.Expressions; using Elsa.Services; using Elsa.Services.Models; using Refit; @@ -34,55 +35,84 @@ namespace Elsa.Activities.Telnyx.Activities _telnyxOptions = telnyxOptions; } - [ActivityProperty(Label = "Call Control ID", Hint = "The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Call Control ID", Hint = "The ID of the Call Control App (formerly ID of the connection) to be used when dialing the destination.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string ConnectionId { get; set; } = default!; - [ActivityProperty(Label = "To", Hint = "The DID or SIP URI to dial out and bridge to the given call.")] + [ActivityProperty(Hint = "The DID or SIP URI to dial out and bridge to the given call.", SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string To { get; set; } = default!; - [ActivityProperty(Label = "From", - Hint = "The 'from' number to be used as the caller id presented to the destination ('To' number). The number should be in +E164 format. This attribute will default to the 'From' number of the original call if omitted.")] + [ActivityProperty( + Hint = "The 'from' number to be used as the caller id presented to the destination ('To' number). The number should be in +E164 format. This attribute will default to the 'From' number of the original call if omitted.", + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? From { get; set; } - [ActivityProperty(Label = "From Display Name", + [ActivityProperty( Hint = - "The string to be used as the caller id name (SIP From Display Name) presented to the destination ('To' number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If omitted, the display name will be the same as the number in the 'From' field.")] + "The string to be used as the caller id name (SIP From Display Name) presented to the destination ('To' number). The string should have a maximum of 128 characters, containing only letters, numbers, spaces, and -_~!.+ special characters. If omitted, the display name will be the same as the number in the 'From' field.", + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? FromDisplayName { get; set; } - [ActivityProperty(Label = "Answering Machine Detection", Hint = "Enables Answering Machine Detection.", UIHint = ActivityPropertyUIHints.Dropdown, - Options = new[] { "disabled", "detect", "detect_beep", "detect_words", "greeting_end" })] + [ActivityProperty( + Hint = "Enables Answering Machine Detection.", + UIHint = ActivityPropertyUIHints.Dropdown, + Options = new[] { "disabled", "detect", "detect_beep", "detect_words", "greeting_end" }, + SupportedSyntaxes = new[] { SyntaxNames.Literal, SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? AnsweringMachineDetection { get; set; } - [ActivityProperty(Label = "Answering Machine Detection Configuration", Hint = "Optional configuration parameters to modify answering machine detection performance.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Answering Machine Detection Configuration", + Hint = "Optional configuration parameters to modify answering machine detection performance.", + UIHint = ActivityPropertyUIHints.Json, + Category = PropertyCategories.Advanced)] public AnsweringMachineConfig? AnsweringMachineDetectionConfig { get; set; } - [ActivityProperty(Label = "Command ID", Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Command ID", + Hint = "Use this field to avoid duplicate commands. Telnyx will ignore commands with the same Command ID.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? CommandId { get; set; } - [ActivityProperty(Label = "Client State", Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Hint = "Use this field to add state to every subsequent webhook. It must be a valid Base-64 encoded string.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? ClientState { get; set; } - [ActivityProperty(Label = "Custom Headers", Hint = "Custom headers to be added to the SIP INVITE.", Category = PropertyCategories.Advanced)] + [ActivityProperty(Label = "Custom Headers", Hint = "Custom headers to be added to the SIP INVITE.", Category = PropertyCategories.Advanced, UIHint = ActivityPropertyUIHints.Json)] public IList
? CustomHeaders { get; set; } - [ActivityProperty(Label = "SIP Authentication Username", Hint = "SIP Authentication username used for SIP challenges.", Category = "SIP Authentication")] + [ActivityProperty(Label = "SIP Authentication Username", Hint = "SIP Authentication username used for SIP challenges.", Category = "SIP Authentication", SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? SipAuthUsername { get; set; } - [ActivityProperty(Label = "SIP Authentication Password", Hint = "SIP Authentication password used for SIP challenges.", Category = "SIP Authentication")] + [ActivityProperty(Label = "SIP Authentication Password", Hint = "SIP Authentication password used for SIP challenges.", Category = "SIP Authentication", SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? SipAuthPassword { get; set; } - [ActivityProperty(Label = "Time Limit", Hint = "Sets the maximum duration of a Call Control Leg in seconds.", Category = PropertyCategories.Advanced)] + [ActivityProperty(Label = "Time Limit", Hint = "Sets the maximum duration of a Call Control Leg in seconds.", Category = PropertyCategories.Advanced, SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public int? TimeLimitSecs { get; set; } - [ActivityProperty(Label = "Timeout", Hint = "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being transferred.", Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Timeout", + Hint = "The number of seconds that Telnyx will wait for the call to be answered by the destination to which it is being transferred.", + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public int? TimeoutSecs { get; set; } - [ActivityProperty(Label = "Webhook URL", Hint = "Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call.", Category = PropertyCategories.Advanced)] + [ActivityProperty(Label = "Webhook URL", Hint = "Use this field to override the URL for which Telnyx will send subsequent webhooks to for this call.", Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? WebhookUrl { get; set; } - [ActivityProperty(Label = "Webhook URL Method", Hint = "HTTP request type used for Webhook URL", UIHint = ActivityPropertyUIHints.Dropdown, Options = new[] { "GET", "POST" }, Category = PropertyCategories.Advanced)] + [ActivityProperty( + Label = "Webhook URL Method", + Hint = "HTTP request type used for Webhook URL", + UIHint = ActivityPropertyUIHints.Dropdown, Options = new[] { "GET", "POST" }, + Category = PropertyCategories.Advanced, + SupportedSyntaxes = new[] { SyntaxNames.Literal, SyntaxNames.JavaScript, SyntaxNames.Liquid })] public string? WebhookUrlMethod { get; set; } - + protected override async ValueTask OnExecuteAsync(ActivityExecutionContext context) { var response = await DialAsync(context); @@ -92,12 +122,12 @@ namespace Elsa.Activities.Telnyx.Activities private async Task DialAsync(ActivityExecutionContext context) { var connectionId = string.IsNullOrWhiteSpace(ConnectionId) ? _telnyxOptions.CallControlAppId : ConnectionId; - - if(connectionId == null) + + if (connectionId == null) throw new MissingCallControlAppIdException("No Call Control ID specified and no default value configured"); var fromNumber = context.GetFromNumber(From); - + var request = new DialRequest( connectionId, To, @@ -135,85 +165,87 @@ namespace Elsa.Activities.Telnyx.Activities public static ISetupActivity WithConnectionId(this ISetupActivity setup, Func> value) => setup.Set(x => x.ConnectionId, value); public static ISetupActivity WithConnectionId(this ISetupActivity setup, Func value) => setup.Set(x => x.ConnectionId, value); public static ISetupActivity WithConnectionId(this ISetupActivity setup, string? value) => setup.Set(x => x.ConnectionId, value); - + public static ISetupActivity WithTo(this ISetupActivity setup, Func> value) => setup.Set(x => x.To, value); public static ISetupActivity WithTo(this ISetupActivity setup, Func value) => setup.Set(x => x.To, value); public static ISetupActivity WithTo(this ISetupActivity setup, Func> value) => setup.Set(x => x.To, value); public static ISetupActivity WithTo(this ISetupActivity setup, Func value) => setup.Set(x => x.To, value); public static ISetupActivity WithTo(this ISetupActivity setup, string? value) => setup.Set(x => x.To, value); - + public static ISetupActivity WithFrom(this ISetupActivity setup, Func> value) => setup.Set(x => x.From, value); public static ISetupActivity WithFrom(this ISetupActivity setup, Func value) => setup.Set(x => x.From, value); public static ISetupActivity WithFrom(this ISetupActivity setup, Func> value) => setup.Set(x => x.From, value); public static ISetupActivity WithFrom(this ISetupActivity setup, Func value) => setup.Set(x => x.From, value); public static ISetupActivity WithFrom(this ISetupActivity setup, string? value) => setup.Set(x => x.From, value); - + public static ISetupActivity WithFromDisplayName(this ISetupActivity setup, Func> value) => setup.Set(x => x.FromDisplayName, value); public static ISetupActivity WithFromDisplayName(this ISetupActivity setup, Func value) => setup.Set(x => x.FromDisplayName, value); public static ISetupActivity WithFromDisplayName(this ISetupActivity setup, Func> value) => setup.Set(x => x.FromDisplayName, value); public static ISetupActivity WithFromDisplayName(this ISetupActivity setup, Func value) => setup.Set(x => x.FromDisplayName, value); public static ISetupActivity WithFromDisplayName(this ISetupActivity setup, string? value) => setup.Set(x => x.FromDisplayName, value); - + public static ISetupActivity WithAnsweringMachineDetection(this ISetupActivity setup, Func> value) => setup.Set(x => x.AnsweringMachineDetection, value); public static ISetupActivity WithAnsweringMachineDetection(this ISetupActivity setup, Func value) => setup.Set(x => x.AnsweringMachineDetection, value); public static ISetupActivity WithAnsweringMachineDetection(this ISetupActivity setup, Func> value) => setup.Set(x => x.AnsweringMachineDetection, value); public static ISetupActivity WithAnsweringMachineDetection(this ISetupActivity setup, Func value) => setup.Set(x => x.AnsweringMachineDetection, value); public static ISetupActivity WithAnsweringMachineDetection(this ISetupActivity setup, string? value) => setup.Set(x => x.AnsweringMachineDetection, value); - - public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, Func> value) => setup.Set(x => x.AnsweringMachineDetectionConfig, value); + + public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, Func> value) => + setup.Set(x => x.AnsweringMachineDetectionConfig, value); + public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, Func value) => setup.Set(x => x.AnsweringMachineDetectionConfig, value); public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, Func> value) => setup.Set(x => x.AnsweringMachineDetectionConfig, value); public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, Func value) => setup.Set(x => x.AnsweringMachineDetectionConfig, value); public static ISetupActivity WithAnsweringMachineDetectionConfig(this ISetupActivity setup, AnsweringMachineConfig? value) => setup.Set(x => x.AnsweringMachineDetectionConfig, value); - + public static ISetupActivity WithCommandId(this ISetupActivity setup, Func> value) => setup.Set(x => x.CommandId, value); public static ISetupActivity WithCommandId(this ISetupActivity setup, Func value) => setup.Set(x => x.CommandId, value); public static ISetupActivity WithCommandId(this ISetupActivity setup, Func> value) => setup.Set(x => x.CommandId, value); public static ISetupActivity WithCommandId(this ISetupActivity setup, Func value) => setup.Set(x => x.CommandId, value); public static ISetupActivity WithCommandId(this ISetupActivity setup, string? value) => setup.Set(x => x.CommandId, value); - + public static ISetupActivity WithClientState(this ISetupActivity setup, Func> value) => setup.Set(x => x.ClientState, value); public static ISetupActivity WithClientState(this ISetupActivity setup, Func value) => setup.Set(x => x.ClientState, value); public static ISetupActivity WithClientState(this ISetupActivity setup, Func> value) => setup.Set(x => x.ClientState, value); public static ISetupActivity WithClientState(this ISetupActivity setup, Func value) => setup.Set(x => x.ClientState, value); public static ISetupActivity WithClientState(this ISetupActivity setup, string? value) => setup.Set(x => x.ClientState, value); - + public static ISetupActivity WithCustomHeaders(this ISetupActivity setup, Func?>> value) => setup.Set(x => x.CustomHeaders, value); public static ISetupActivity WithCustomHeaders(this ISetupActivity setup, Func?> value) => setup.Set(x => x.CustomHeaders, value); public static ISetupActivity WithCustomHeaders(this ISetupActivity setup, Func?>> value) => setup.Set(x => x.CustomHeaders, value); public static ISetupActivity WithCustomHeaders(this ISetupActivity setup, Func?> value) => setup.Set(x => x.CustomHeaders, value); public static ISetupActivity WithCustomHeaders(this ISetupActivity setup, IList
? value) => setup.Set(x => x.CustomHeaders, value); - + public static ISetupActivity WithSipAuthUsername(this ISetupActivity setup, Func> value) => setup.Set(x => x.SipAuthUsername, value); public static ISetupActivity WithSipAuthUsername(this ISetupActivity setup, Func value) => setup.Set(x => x.SipAuthUsername, value); public static ISetupActivity WithSipAuthUsername(this ISetupActivity setup, Func> value) => setup.Set(x => x.SipAuthUsername, value); public static ISetupActivity WithSipAuthUsername(this ISetupActivity setup, Func value) => setup.Set(x => x.SipAuthUsername, value); public static ISetupActivity WithSipAuthUsername(this ISetupActivity setup, string? value) => setup.Set(x => x.SipAuthUsername, value); - + public static ISetupActivity WithSipAuthPassword(this ISetupActivity setup, Func> value) => setup.Set(x => x.SipAuthPassword, value); public static ISetupActivity WithSipAuthPassword(this ISetupActivity setup, Func value) => setup.Set(x => x.SipAuthPassword, value); public static ISetupActivity WithSipAuthPassword(this ISetupActivity setup, Func> value) => setup.Set(x => x.SipAuthPassword, value); public static ISetupActivity WithSipAuthPassword(this ISetupActivity setup, Func value) => setup.Set(x => x.SipAuthPassword, value); public static ISetupActivity WithSipAuthPassword(this ISetupActivity setup, string? value) => setup.Set(x => x.SipAuthPassword, value); - + public static ISetupActivity WithTimeLimitSecs(this ISetupActivity setup, Func> value) => setup.Set(x => x.TimeLimitSecs, value); public static ISetupActivity WithTimeLimitSecs(this ISetupActivity setup, Func value) => setup.Set(x => x.TimeLimitSecs, value); public static ISetupActivity WithTimeLimitSecs(this ISetupActivity setup, Func> value) => setup.Set(x => x.TimeLimitSecs, value); public static ISetupActivity WithTimeLimitSecs(this ISetupActivity setup, Func value) => setup.Set(x => x.TimeLimitSecs, value); public static ISetupActivity WithTimeLimitSecs(this ISetupActivity setup, int? value) => setup.Set(x => x.TimeLimitSecs, value); - + public static ISetupActivity WithTimeoutSecs(this ISetupActivity setup, Func> value) => setup.Set(x => x.TimeoutSecs, value); public static ISetupActivity WithTimeoutSecs(this ISetupActivity setup, Func value) => setup.Set(x => x.TimeoutSecs, value); public static ISetupActivity WithTimeoutSecs(this ISetupActivity setup, Func> value) => setup.Set(x => x.TimeoutSecs, value); public static ISetupActivity WithTimeoutSecs(this ISetupActivity setup, Func value) => setup.Set(x => x.TimeoutSecs, value); public static ISetupActivity WithTimeoutSecs(this ISetupActivity setup, int? value) => setup.Set(x => x.TimeoutSecs, value); - + public static ISetupActivity WithWebhookUrl(this ISetupActivity setup, Func> value) => setup.Set(x => x.WebhookUrl, value); public static ISetupActivity WithWebhookUrl(this ISetupActivity setup, Func value) => setup.Set(x => x.WebhookUrl, value); public static ISetupActivity WithWebhookUrl(this ISetupActivity setup, Func> value) => setup.Set(x => x.WebhookUrl, value); public static ISetupActivity WithWebhookUrl(this ISetupActivity setup, Func value) => setup.Set(x => x.WebhookUrl, value); public static ISetupActivity WithWebhookUrl(this ISetupActivity setup, string? value) => setup.Set(x => x.WebhookUrl, value); - + public static ISetupActivity WithWebhookUrlMethod(this ISetupActivity setup, Func> value) => setup.Set(x => x.WebhookUrlMethod, value); public static ISetupActivity WithWebhookUrlMethod(this ISetupActivity setup, Func value) => setup.Set(x => x.WebhookUrlMethod, value); public static ISetupActivity WithWebhookUrlMethod(this ISetupActivity setup, Func> value) => setup.Set(x => x.WebhookUrlMethod, value);