diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs index 21732bbc62e30..a9d60af64da84 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs @@ -236,14 +236,13 @@ internal CallDisconnected() { } } public partial class CallInvite { - public CallInvite(Azure.Communication.CommunicationUserIdentifier targetIdentity, System.Collections.Generic.IDictionary voipHeaders = null) { } - public CallInvite(Azure.Communication.MicrosoftTeamsUserIdentifier targetIdentity, System.Collections.Generic.IDictionary voipHeaders = null) { } - public CallInvite(Azure.Communication.PhoneNumberIdentifier targetPhoneNumberIdentity, Azure.Communication.PhoneNumberIdentifier callerIdNumber, System.Collections.Generic.IDictionary sipHeaders = null) { } - public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } } + public CallInvite(Azure.Communication.CommunicationUserIdentifier targetIdentity) { } + public CallInvite(Azure.Communication.MicrosoftTeamsUserIdentifier targetIdentity) { } + public CallInvite(Azure.Communication.PhoneNumberIdentifier targetPhoneNumberIdentity, Azure.Communication.PhoneNumberIdentifier callerIdNumber) { } + public Azure.Communication.CallAutomation.CustomContext CustomContext { get { throw null; } } public Azure.Communication.PhoneNumberIdentifier SourceCallerIdNumber { get { throw null; } } public string SourceDisplayName { get { throw null; } set { } } public Azure.Communication.CommunicationIdentifier Target { get { throw null; } } - public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } } } public abstract partial class CallLocator : System.IEquatable { @@ -526,13 +525,25 @@ public partial class CreateGroupCallOptions public CreateGroupCallOptions(System.Collections.Generic.IEnumerable targets, System.Uri callbackUri) { } public System.Uri AzureCognitiveServicesEndpointUrl { get { throw null; } set { } } public System.Uri CallbackUri { get { throw null; } } + public Azure.Communication.CallAutomation.CustomContext CustomContext { get { throw null; } } public Azure.Communication.CallAutomation.MediaStreamingOptions MediaStreamingOptions { get { throw null; } set { } } public string OperationContext { get { throw null; } set { } } - public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } set { } } public Azure.Communication.PhoneNumberIdentifier SourceCallerIdNumber { get { throw null; } set { } } public string SourceDisplayName { get { throw null; } set { } } public System.Collections.Generic.IEnumerable Targets { get { throw null; } } - public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } set { } } + } + public partial class CustomContext + { + internal CustomContext() { } + public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } } + public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } } + public void Add(Azure.Communication.CallAutomation.CustomContextHeader header) { } + } + public abstract partial class CustomContextHeader + { + protected CustomContextHeader(string key, string value) { } + public string Key { get { throw null; } } + public string Value { get { throw null; } } } public partial class DialogCompleted : Azure.Communication.CallAutomation.CallAutomationEventBase { @@ -1174,6 +1185,14 @@ public ServerCallLocator(string id) { } public override int GetHashCode() { throw null; } public override string ToString() { throw null; } } + public partial class SIPCustomHeader : Azure.Communication.CallAutomation.CustomContextHeader + { + public SIPCustomHeader(string key, string value) : base (default(string), default(string)) { } + } + public partial class SIPUUIHeader : Azure.Communication.CallAutomation.CustomContextHeader + { + public SIPUUIHeader(string value) : base (default(string), default(string)) { } + } public partial class SpeechResult : Azure.Communication.CallAutomation.RecognizeResult { internal SpeechResult() { } @@ -1253,13 +1272,12 @@ internal TransferCallToParticipantResult() { } } public partial class TransferToParticipantOptions { - public TransferToParticipantOptions(Azure.Communication.CommunicationUserIdentifier targetIdentity, System.Collections.Generic.IDictionary voipHeaders = null) { } - public TransferToParticipantOptions(Azure.Communication.MicrosoftTeamsUserIdentifier targetIdentity, System.Collections.Generic.IDictionary voipHeaders = null) { } - public TransferToParticipantOptions(Azure.Communication.PhoneNumberIdentifier targetPhoneNumberIdentity, System.Collections.Generic.IDictionary sipHeaders = null) { } + public TransferToParticipantOptions(Azure.Communication.CommunicationUserIdentifier targetIdentity) { } + public TransferToParticipantOptions(Azure.Communication.MicrosoftTeamsUserIdentifier targetIdentity) { } + public TransferToParticipantOptions(Azure.Communication.PhoneNumberIdentifier targetPhoneNumberIdentity) { } + public Azure.Communication.CallAutomation.CustomContext CustomContext { get { throw null; } } public string OperationContext { get { throw null; } set { } } - public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } } public Azure.Communication.CommunicationIdentifier Target { get { throw null; } } - public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } } } public partial class UnmuteParticipantsOptions { @@ -1277,4 +1295,8 @@ public partial class UserConsent internal UserConsent() { } public int? Recording { get { throw null; } } } + public partial class VoipHeader : Azure.Communication.CallAutomation.CustomContextHeader + { + public VoipHeader(string key, string value) : base (default(string), default(string)) { } + } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs index 274b40d389855..45fefd49b5e12 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs @@ -297,8 +297,8 @@ public virtual async Task RedirectCallAsync(RedirectCallOptions option var repeatabilityHeaders = new RepeatabilityHeaders(); request.CustomContext = new CustomContextInternal( - options.CallInvite.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.SipHeaders, - options.CallInvite.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.VoipHeaders); + options.CallInvite.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.SipHeaders, + options.CallInvite.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.VoipHeaders); return await AzureCommunicationServicesRestClient.RedirectCallAsync( request, @@ -346,8 +346,8 @@ public virtual Response RedirectCall(RedirectCallOptions options, CancellationTo var repeatabilityHeaders = new RepeatabilityHeaders(); request.CustomContext = new CustomContextInternal( - options.CallInvite.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.SipHeaders, - options.CallInvite.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.VoipHeaders); + options.CallInvite.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.SipHeaders, + options.CallInvite.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.VoipHeaders); return AzureCommunicationServicesRestClient.RedirectCall( request, @@ -674,8 +674,8 @@ private CreateCallRequestInternal CreateCallRequest(CreateCallOptions options) }; request.CustomContext = new CustomContextInternal( - options.CallInvite.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.SipHeaders, - options.CallInvite.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.VoipHeaders); + options.CallInvite.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.SipHeaders, + options.CallInvite.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomContext.VoipHeaders); // Add custom cognitive service domain name if (options.AzureCognitiveServicesEndpointUrl != null) @@ -706,8 +706,8 @@ private CreateCallRequestInternal CreateCallRequest(CreateGroupCallOptions optio }; request.CustomContext = new CustomContextInternal( - options.SipHeaders == null ? new ChangeTrackingDictionary() : options.SipHeaders, - options.VoipHeaders == null ? new ChangeTrackingDictionary() : options.VoipHeaders); + options.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CustomContext.SipHeaders, + options.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CustomContext.VoipHeaders); // Add custom cognitive service domain name if (options.AzureCognitiveServicesEndpointUrl != null) diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs index e35981cdf6633..3d30430f71716 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs @@ -305,8 +305,8 @@ private static TransferToParticipantRequestInternal CreateTransferToParticipantR TransferToParticipantRequestInternal request = new TransferToParticipantRequestInternal(CommunicationIdentifierSerializer.Serialize(options.Target)); request.CustomContext = new CustomContextInternal( - options.SipHeaders == null ? new ChangeTrackingDictionary() : options.SipHeaders, - options.VoipHeaders == null ? new ChangeTrackingDictionary() : options.VoipHeaders); + options.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CustomContext.SipHeaders, + options.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CustomContext.VoipHeaders); if (options.OperationContext != null && options.OperationContext.Length > CallAutomationConstants.InputValidation.StringMaxLength) { @@ -444,8 +444,8 @@ private static AddParticipantRequestInternal CreateAddParticipantRequest(AddPart } request.CustomContext = new CustomContextInternal( - options.ParticipantToAdd.SipHeaders == null ? new ChangeTrackingDictionary() : options.ParticipantToAdd.SipHeaders, - options.ParticipantToAdd.VoipHeaders == null ? new ChangeTrackingDictionary() : options.ParticipantToAdd.VoipHeaders); + options.ParticipantToAdd.CustomContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.ParticipantToAdd.CustomContext.SipHeaders, + options.ParticipantToAdd.CustomContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.ParticipantToAdd.CustomContext.VoipHeaders); return request; } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs index 995d3c8adedcd..c34ddbbf08bcc 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs @@ -15,34 +15,31 @@ public class CallInvite /// /// /// - /// /// - public CallInvite(PhoneNumberIdentifier targetPhoneNumberIdentity, PhoneNumberIdentifier callerIdNumber, IDictionary sipHeaders = null) + public CallInvite(PhoneNumberIdentifier targetPhoneNumberIdentity, PhoneNumberIdentifier callerIdNumber) { Target = targetPhoneNumberIdentity; SourceCallerIdNumber = callerIdNumber; - SipHeaders= sipHeaders == null ? new Dictionary() : sipHeaders; + CustomContext = new CustomContext(sipHeaders: new Dictionary(), voipHeaders: null); } /// /// Creates a new CallInvite object. /// /// - /// - public CallInvite(CommunicationUserIdentifier targetIdentity, IDictionary voipHeaders = null) + public CallInvite(CommunicationUserIdentifier targetIdentity) { Target = targetIdentity; - VoipHeaders= voipHeaders == null ? new Dictionary() : voipHeaders; + CustomContext = new CustomContext(sipHeaders: null, voipHeaders: new Dictionary()); } /// /// Creates a new CallInvite object. /// /// - /// - public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity, IDictionary voipHeaders = null) + public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity) { Target = targetIdentity; - VoipHeaders = voipHeaders == null ? new Dictionary() : voipHeaders; + CustomContext = new CustomContext(sipHeaders: null, voipHeaders: new Dictionary()); } /// @@ -57,16 +54,15 @@ public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity, IDictionary public PhoneNumberIdentifier SourceCallerIdNumber { get; } - /// Dictionary of VOIP headers. - public IDictionary VoipHeaders { get; } - - /// Dictionary of SIP headers. - public IDictionary SipHeaders { get; } - /// /// The display name to appear on target callee. /// /// public string SourceDisplayName { get; set; } + + /// + /// The Custom Context which contains SIP and voip headers + /// + public CustomContext CustomContext { get; } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs index 038f3449aa656..4b4ce4d13b0dd 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs @@ -18,6 +18,7 @@ public CreateGroupCallOptions(IEnumerable targets, Uri { Targets = targets; CallbackUri = callbackUri; + CustomContext = new CustomContext(sipHeaders: new Dictionary(), voipHeaders: new Dictionary()); } /// @@ -57,13 +58,8 @@ public CreateGroupCallOptions(IEnumerable targets, Uri public Uri AzureCognitiveServicesEndpointUrl { get; set; } /// - /// Custom Context for PSTN targets. + /// The Custom Context which contains SIP and voip headers. /// - public IDictionary SipHeaders { get; set; } - - /// - /// Custom Context for Voip targets. - /// - public IDictionary VoipHeaders { get; set; } + public CustomContext CustomContext { get; } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContext.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContext.cs new file mode 100644 index 0000000000000..b9e0f98e9a165 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContext.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.CallAutomation +{ + /// + /// CustomContext details. + /// + public class CustomContext + { + /// Dictionary of VOIP headers. + public IDictionary VoipHeaders { get; } + + /// Dictionary of SIP headers. + public IDictionary SipHeaders { get; } + + /// + /// Creates a new CustomContext. + /// + internal CustomContext(IDictionary sipHeaders, IDictionary voipHeaders) + { + SipHeaders = sipHeaders; + VoipHeaders = voipHeaders; + } + + /// + /// Add a custom context sip or voip header. + /// + /// custom context sip UUI, custom header or voip header. + public void Add(CustomContextHeader header) + { + if (header is SIPUUIHeader sipUUIHeader) + { + if (SipHeaders == null) + { + throw new InvalidOperationException("Cannot add sip header, SipHeaders is null."); + } + SipHeaders.Add(sipUUIHeader.Key, sipUUIHeader.Value); + } + else if (header is SIPCustomHeader sipCustomHeader) + { + if (SipHeaders == null) + { + throw new InvalidOperationException("Cannot add sip header, SipHeaders is null."); + } + SipHeaders.Add(sipCustomHeader.Key, sipCustomHeader.Value); + } + else if (header is VoipHeader voipHeader) + { + if (VoipHeaders == null) + { + throw new InvalidOperationException("Cannot add voip header, VoipHeaders is null"); + } + VoipHeaders.Add(voipHeader.Key, voipHeader.Value); + } + else + { + throw new InvalidOperationException("Unknown custom context header type."); + } + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContextHeader.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContextHeader.cs new file mode 100644 index 0000000000000..d0db6706ef15d --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomContextHeader.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.CallAutomation +{ + /// + /// The base class of CustomContext SipHeader and VoipHeader. + /// + public abstract class CustomContextHeader + { + /// + /// The CustomContext Key name. + /// + public string Key { get; } + + /// + /// The CustomContext Key value. + /// + public string Value { get; } + + /// + /// Creates a new CustomContextHeader + /// + protected CustomContextHeader(string key, string value) + { + Key = key; + Value = value; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPCustomHeader.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPCustomHeader.cs new file mode 100644 index 0000000000000..9c43d6558dc85 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPCustomHeader.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.CallAutomation +{ + /// + /// Custom Context Sip header. + /// + public class SIPCustomHeader : CustomContextHeader + { + /// + /// Create a new Sip header. + /// + /// sip header key name. + /// sip header value. + public SIPCustomHeader(string key, string value) : base("X-MS-Custom-"+key, value) + { + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPUUIHeader.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPUUIHeader.cs new file mode 100644 index 0000000000000..392ee389f6814 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/SIPUUIHeader.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.CallAutomation +{ + /// + /// Custom Context User-to-User Sip header. + /// + public class SIPUUIHeader : CustomContextHeader + { + /// + /// Create a new Sip UUI header. + /// + /// CustomContext Sip UUI value. + public SIPUUIHeader(string value) : base("User-to-User", value) + { + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs index 35e758681276a..c2d7f301683cb 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; using System.Collections.Generic; namespace Azure.Communication.CallAutomation @@ -15,33 +14,30 @@ public class TransferToParticipantOptions /// Creates a new TransferToParticipantOptions object. /// /// The target to transfer the call to. - /// Custom Context Sip headers. - public TransferToParticipantOptions(PhoneNumberIdentifier targetPhoneNumberIdentity, IDictionary sipHeaders = null) + public TransferToParticipantOptions(PhoneNumberIdentifier targetPhoneNumberIdentity) { Target = targetPhoneNumberIdentity; - SipHeaders = sipHeaders == null ? new Dictionary() : sipHeaders; + CustomContext = new CustomContext(sipHeaders: new Dictionary(), null); } /// /// Creates a new TransferToParticipantOptions object. /// /// The target to transfer the call to. - /// Custom Context Voip headers. - public TransferToParticipantOptions(CommunicationUserIdentifier targetIdentity, IDictionary voipHeaders = null) + public TransferToParticipantOptions(CommunicationUserIdentifier targetIdentity) { Target = targetIdentity; - VoipHeaders = voipHeaders == null ? new Dictionary() : voipHeaders; + CustomContext = new CustomContext(sipHeaders: null, voipHeaders: new Dictionary()); } /// /// Creates a new TransferToParticipantOptions object. /// /// The target to transfer the call to. - /// Custom Context Voip headers. - public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity, IDictionary voipHeaders = null) + public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity) { Target = targetIdentity; - VoipHeaders = voipHeaders == null ? new Dictionary() : voipHeaders; + CustomContext = new CustomContext(sipHeaders: null, voipHeaders: new Dictionary()); } /// @@ -50,15 +46,14 @@ public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity, /// public CommunicationIdentifier Target { get; } - /// Dictionary of VOIP headers. - public IDictionary VoipHeaders { get; } - - /// Dictionary of SIP headers. - public IDictionary SipHeaders { get; } - /// /// The operationContext for this transfer call. /// public string OperationContext { get; set; } + + /// + /// The Custom Context which contains SIP and voip headers + /// + public CustomContext CustomContext { get; } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/VoipHeader.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/VoipHeader.cs new file mode 100644 index 0000000000000..89c8191dd180c --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/VoipHeader.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Communication.CallAutomation +{ + /// + /// Custom Context Voip header. + /// + public class VoipHeader : CustomContextHeader + { + /// + /// Create a new voip header. + /// + /// voip header key name. + /// voip header value. + public VoipHeader(string key, string value) : base(key, value) + { + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs index 1a32c2216f02d..4ef39fd9d74cd 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Net; using System.Threading.Tasks; +using Azure.Communication.CallAutomation.Models; using Azure.Communication.CallAutomation.Tests.Infrastructure; using System; @@ -561,12 +562,13 @@ private CallConnection CreateMockCallConnection(int responseCode, string? respon private static IEnumerable TestData_TransferCallToParticipant() { + var callInvite = new CallInvite(new CommunicationUserIdentifier("userId")); + callInvite.CustomContext.Add(new VoipHeader("key1", "value1")); return new[] { new object?[] { - new CallInvite(new CommunicationUserIdentifier("userId")){ - VoipHeaders = {{ "key1", "value1" }}} + callInvite }, }; }