@@ -259,7 +259,8 @@ private AnswerCallRequestInternal CreateAnswerCallRequest(AnswerCallOptions opti
259259 request . OperationContext = options . OperationContext ;
260260 request . CustomCallingContext = new CustomCallingContextInternal (
261261 options . CustomCallingContext ? . VoipHeaders ?? new ChangeTrackingDictionary < string , string > ( ) ,
262- options . CustomCallingContext ? . SipHeaders ?? new ChangeTrackingDictionary < string , string > ( ) ) ;
262+ options . CustomCallingContext ? . SipHeaders ?? new ChangeTrackingDictionary < string , string > ( ) ,
263+ CustomCallContextHelpers . CreateTeamsPhoneCallDetailsInternal ( options . CustomCallingContext ? . TeamsPhoneCallDetails ) ) ;
263264
264265 return request ;
265266 }
@@ -295,8 +296,9 @@ public virtual async Task<Response> RedirectCallAsync(RedirectCallOptions option
295296 RedirectCallRequestInternal request = new RedirectCallRequestInternal ( options . IncomingCallContext , CommunicationIdentifierSerializer . Serialize ( options . CallInvite . Target ) ) ;
296297
297298 request . CustomCallingContext = new CustomCallingContextInternal (
298- options . CallInvite . CustomCallingContext . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . VoipHeaders ,
299- options . CallInvite . CustomCallingContext . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . SipHeaders ) ;
299+ options . CallInvite ? . CustomCallingContext ? . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite ? . CustomCallingContext ? . VoipHeaders ,
300+ options . CallInvite ? . CustomCallingContext ? . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite ? . CustomCallingContext ? . SipHeaders ,
301+ CustomCallContextHelpers . CreateTeamsPhoneCallDetailsInternal ( options . CallInvite ? . CustomCallingContext ? . TeamsPhoneCallDetails ) ) ;
300302
301303 return await AzureCommunicationServicesRestClient . RedirectCallAsync ( request , cancellationToken ) . ConfigureAwait ( false ) ;
302304 }
@@ -338,8 +340,9 @@ public virtual Response RedirectCall(RedirectCallOptions options, CancellationTo
338340 RedirectCallRequestInternal request = new RedirectCallRequestInternal ( options . IncomingCallContext , CommunicationIdentifierSerializer . Serialize ( options . CallInvite . Target ) ) ;
339341
340342 request . CustomCallingContext = new CustomCallingContextInternal (
341- options . CallInvite . CustomCallingContext . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . VoipHeaders ,
342- options . CallInvite . CustomCallingContext . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . SipHeaders ) ;
343+ options . CallInvite ? . CustomCallingContext ? . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . VoipHeaders ,
344+ options . CallInvite ? . CustomCallingContext ? . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . SipHeaders ,
345+ CustomCallContextHelpers . CreateTeamsPhoneCallDetailsInternal ( options . CallInvite ? . CustomCallingContext ? . TeamsPhoneCallDetails ) ) ;
343346
344347 return AzureCommunicationServicesRestClient . RedirectCall ( request , cancellationToken ) ;
345348 }
@@ -729,8 +732,9 @@ private CreateCallRequestInternal CreateCallRequest(CreateCallOptions options)
729732 } ;
730733
731734 request . CustomCallingContext = new CustomCallingContextInternal (
732- options . CallInvite . CustomCallingContext . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . VoipHeaders ,
733- options . CallInvite . CustomCallingContext . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . SipHeaders ) ;
735+ options . CallInvite ? . CustomCallingContext ? . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite ? . CustomCallingContext ? . VoipHeaders ,
736+ options . CallInvite ? . CustomCallingContext ? . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CallInvite . CustomCallingContext . SipHeaders ,
737+ CustomCallContextHelpers . CreateTeamsPhoneCallDetailsInternal ( options . CallInvite ? . CustomCallingContext ? . TeamsPhoneCallDetails ) ) ;
734738
735739 // Add CallIntelligenceOptions such as custom cognitive service domain name
736740 string cognitiveServicesEndpoint = options . CallIntelligenceOptions ? . CognitiveServicesEndpoint ? . AbsoluteUri ;
@@ -766,8 +770,9 @@ private CreateCallRequestInternal CreateCallRequest(CreateGroupCallOptions optio
766770 } ;
767771
768772 request . CustomCallingContext = new CustomCallingContextInternal (
769- options . CustomCallingContext . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CustomCallingContext . VoipHeaders ,
770- options . CustomCallingContext . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CustomCallingContext . SipHeaders ) ;
773+ options . CustomCallingContext ? . VoipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CustomCallingContext ? . VoipHeaders ,
774+ options . CustomCallingContext ? . SipHeaders == null ? new ChangeTrackingDictionary < string , string > ( ) : options . CustomCallingContext ? . SipHeaders ,
775+ CustomCallContextHelpers . CreateTeamsPhoneCallDetailsInternal ( options . CustomCallingContext ? . TeamsPhoneCallDetails ) ) ;
771776
772777 // Add CallIntelligenceOptions such as custom cognitive service domain name
773778 string cognitiveServicesEndpoint = options . CallIntelligenceOptions ? . CognitiveServicesEndpoint ? . AbsoluteUri ;
0 commit comments