Skip to content

Commit

Permalink
Adding repeatable headers to StartRecording (Azure#31983)
Browse files Browse the repository at this point in the history
* Adding repeatable headers for StartRecording

* Adding repeatable headers to async recording

* Adding export

* - Fixing RepeatabilityHeaders: Allow null to be passed (Do not send repeataiblity headers)
- Auto-create repeatabilityHeaders by default
- Updated CustomeHMACHeaders to allow rawId in HMAC authentication
- Updated all tests and re-recorded based on changes

* Updating API doc

* Fixing hangup + repeatability headers
Initializing repeatability headers in all options

* Fixing Tests + recorded tests

* Replacing the null repeatability headers case

Co-authored-by: Min Woo Lee 🧊 <77083090+minwoolee-ms@users.noreply.github.com>
  • Loading branch information
cochi2 and minwoolee-msft authored Oct 26, 2022
1 parent 2ee7e33 commit 20d4836
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ public StartRecordingOptions(Azure.Communication.CallAutomation.CallLocator call
public Azure.Communication.CallAutomation.RecordingContent RecordingContent { get { throw null; } set { } }
public Azure.Communication.CallAutomation.RecordingFormat RecordingFormat { get { throw null; } set { } }
public System.Uri RecordingStateCallbackEndpoint { get { throw null; } set { } }
public Azure.Communication.CallAutomation.RepeatabilityHeaders RepeatabilityHeaders { get { throw null; } set { } }
}
public partial class TransferCallToParticipantResult
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ public virtual Response<RecordingStateResult> StartRecording(StartRecordingOptio
}
};

return ContentRestClient.Recording(request, cancellationToken: cancellationToken);
options.RepeatabilityHeaders?.GenerateIfRepeatabilityHeadersNotProvided();
return ContentRestClient.Recording(request,
options.RepeatabilityHeaders?.RepeatabilityRequestId,
options.RepeatabilityHeaders?.GetRepeatabilityFirstSentString(),
cancellationToken: cancellationToken);
}
catch (Exception ex)
{
Expand Down Expand Up @@ -113,7 +117,11 @@ public virtual async Task<Response<RecordingStateResult>> StartRecordingAsync(St
}
};

return await ContentRestClient.RecordingAsync(request, cancellationToken: cancellationToken).ConfigureAwait(false);
options.RepeatabilityHeaders?.GenerateIfRepeatabilityHeadersNotProvided();
return await ContentRestClient.RecordingAsync(request,
options.RepeatabilityHeaders?.RepeatabilityRequestId,
options.RepeatabilityHeaders?.GetRepeatabilityFirstSentString(),
cancellationToken: cancellationToken).ConfigureAwait(false);
}
catch (Exception ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public StartRecordingOptions(CallLocator callLocator)
/// </summary>
public RecordingFormat RecordingFormat { get; set; }

/// <summary>
/// Repeatability Headers.
/// </summary>
public RepeatabilityHeaders RepeatabilityHeaders { get; set; }

/// <summary>
/// The sequential order in which audio channels are assigned to participants in the unmixed recording.
/// When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering is not specified,
Expand Down

0 comments on commit 20d4836

Please sign in to comment.