This repository was archived by the owner on Jan 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
chore: Merge Feature/telephony to main #1227
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
6eb4d73
Adding Telephony preview package, this includes Call Transfer Activit…
vanshu86 e73c96c
Telephony: First draft of CommandDialog (#983)
carlosscastro 908ada4
Telephony: create build pipeline (#984)
carlosscastro baeceac
Update telephony.yml for Azure Pipelines
carlosscastro 888fcbd
Telephony: Add recording actions to component
carlosscastro f4a723e
Add Schema files and some comments
e7fe083
Fix OnSuccess flow for commands
d65ac34
Update telephony version to 0.0.1
carlosscastro d70ac7f
Update Microsoft.Bot.Components.Telephony.csproj
carlosscastro d3e3587
Add support for pause and resume
e8722bc
Merge branch 'feature/telephony' of https://github.com/microsoft/botf…
12734be
Add support for pause and resume
902fd4d
Update Microsoft.Bot.Components.Telephony.csproj
carlosscastro 15639d5
Update nuget-versioning-steps.yml
carlosscastro 0b86b24
Merge main -> feature/telephony
carlosscastro 77b7a65
Telephony: adopt stylecop / fxcop and leave things at zero warnings /…
carlosscastro 531a6a8
chore: [Internal dev branch PR] Telephony: integration tests and Comm…
carlosscastro 13c8aae
Telephony: Base call transfer tests
carlosscastro 9f1beba
Telephony uischemas: Change action tree location for telephony compon…
carlosscastro b6ef2f4
Add tests for pause and resume recording (#1165)
p-nagpal a2d3fac
Update recording labels per UX feedback (#1166)
p-nagpal 7b94687
Update subtitle for recording operations (#1176)
p-nagpal 4cc89b0
chore:Add mini-spec for Telephony actions (#1190)
p-nagpal 9a9f732
Add more requirements to the call recording mini-spec (#1211)
p-nagpal dfedd60
chore: Merge main to feature/telephony (#1209)
p-nagpal 15febcd
chore: Merge latest main into feature/telephony (#1217)
p-nagpal 01d0bfe
chore: Updating tests and adding documentation for error handling in …
vanshu86 b30f43d
chore:Merge main to Telephony to remove new conflicts (#1224)
p-nagpal fe1e6d2
Merge branch 'main' into feature/telephony
dc3de8a
refactor: remove unused imported functional tests code (#1222)
ryanisgrig e706979
Address feedback for merging feature/telephony to main
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,7 +53,7 @@ steps: | |
|
|
||
| # Configure version suffix based on deployment ring | ||
| if ($deploymentRing.ToLowerInvariant() -ne "stable") { | ||
| $nugetVersionSuffix = $deploymentRing + $vs; | ||
| $nugetVersionSuffix = $deploymentRing; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll need to check what to do with this one, but I can take care of that separately. |
||
| "Version Suffix = $nugetVersionSuffix"; | ||
| $packageVersion += "-" + $nugetVersionSuffix; | ||
| } | ||
|
|
@@ -73,4 +73,4 @@ steps: | |
| NugetPackageVersion: $(NugetPackageVersion) | ||
| continueOnError: true | ||
|
|
||
| - template: debug-workspace-steps.yml | ||
| - template: debug-workspace-steps.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using AdaptiveExpressions.Properties; | ||
| using Microsoft.Bot.Builder.Dialogs; | ||
| using Microsoft.Bot.Builder.Dialogs.Adaptive.Actions; | ||
| using Microsoft.Bot.Connector; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Components.Telephony.Actions | ||
| { | ||
| /// <summary> | ||
| /// Transfers call to given phone number. | ||
| /// </summary> | ||
| public class CallTransfer : SendHandoffActivity | ||
| { | ||
| /// <summary> | ||
| /// Class identifier. | ||
| /// </summary> | ||
| [JsonProperty("$kind")] | ||
| public new const string Kind = "Microsoft.Telephony.CallTransfer"; | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="CallTransfer"/> class. | ||
| /// </summary> | ||
| /// <param name="sourceFilePath">Optional, source file full path.</param> | ||
| /// <param name="sourceLineNumber">Optional, line number in source file.</param> | ||
| [JsonConstructor] | ||
| public CallTransfer([CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) | ||
| : base() | ||
| { | ||
| // enable instances of this command as debug break point | ||
| this.RegisterSourceLocation(sourceFilePath, sourceLineNumber); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the phone number to be included when sending the handoff activity. | ||
| /// </summary> | ||
| /// <value> | ||
| /// <see cref="StringExpression"/>. | ||
| /// </value> | ||
| [JsonProperty("phoneNumber")] | ||
| public StringExpression PhoneNumber { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Called when the dialog is started and pushed onto the dialog stack. | ||
| /// </summary> | ||
| /// <param name="dc">The <see cref="DialogContext"/> for the current turn of conversation.</param> | ||
| /// <param name="options">Optional, initial information to pass to the dialog.</param> | ||
| /// <param name="cancellationToken">A cancellation token that can be used by other objects | ||
| /// or threads to receive notice of cancellation.</param> | ||
| /// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns> | ||
| public async override Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default(CancellationToken)) | ||
| { | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| var phoneNumber = this.PhoneNumber?.GetValue(dc.State); | ||
|
|
||
| // Create handoff event, passing the phone number to transfer to as context. | ||
| HandoffContext = new { TargetPhoneNumber = phoneNumber }; | ||
|
|
||
| return await base.BeginDialogAsync(dc, options, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Microsoft.Bot.Builder.Dialogs; | ||
| using Microsoft.Bot.Components.Telephony.Common; | ||
| using Microsoft.Bot.Connector; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Components.Telephony.Actions | ||
| { | ||
| /// <summary> | ||
| /// Pauses recording the current conversation. | ||
| /// </summary> | ||
| public class PauseRecording : CommandDialog | ||
| { | ||
| /// <summary> | ||
| /// Class identifier. | ||
| /// </summary> | ||
| [JsonProperty("$kind")] | ||
| public const string Kind = "Microsoft.Telephony.PauseRecording"; | ||
|
|
||
| private const string RecordingPause = "channel/vnd.microsoft.telephony.recording.pause"; | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="PauseRecording"/> class. | ||
| /// </summary> | ||
| /// <param name="sourceFilePath">Optional, source file full path.</param> | ||
| /// <param name="sourceLineNumber">Optional, line number in source file.</param> | ||
| [JsonConstructor] | ||
| public PauseRecording([CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) | ||
| : base() | ||
| { | ||
| // enable instances of this command as debug break point | ||
| this.RegisterSourceLocation(sourceFilePath, sourceLineNumber); | ||
|
|
||
| this.CommandName = RecordingPause; | ||
| } | ||
|
|
||
| public async override Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default) | ||
| { | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.BeginDialogAsync(dc, options, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| public override async Task<DialogTurnResult> ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken = default) | ||
| { | ||
| // TODO: Carlos try to delete | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.ContinueDialogAsync(dc, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Microsoft.Bot.Builder.Dialogs; | ||
| using Microsoft.Bot.Components.Telephony.Common; | ||
| using Microsoft.Bot.Connector; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Components.Telephony.Actions | ||
| { | ||
| /// <summary> | ||
| /// Resume recording the current conversation. | ||
| /// </summary> | ||
| public class ResumeRecording : CommandDialog | ||
| { | ||
| public const string RecordingResume = "channel/vnd.microsoft.telephony.recording.resume"; | ||
|
|
||
| /// <summary> | ||
| /// Class identifier. | ||
| /// </summary> | ||
| [JsonProperty("$kind")] | ||
| public const string Kind = "Microsoft.Telephony.ResumeRecording"; | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="ResumeRecording"/> class. | ||
| /// </summary> | ||
| /// <param name="sourceFilePath">Optional, source file full path.</param> | ||
| /// <param name="sourceLineNumber">Optional, line number in source file.</param> | ||
| [JsonConstructor] | ||
| public ResumeRecording([CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) | ||
| : base() | ||
| { | ||
| // enable instances of this command as debug break point | ||
| this.RegisterSourceLocation(sourceFilePath, sourceLineNumber); | ||
|
|
||
| this.CommandName = RecordingResume; | ||
| } | ||
|
|
||
| public async override Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default) | ||
| { | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.BeginDialogAsync(dc, options, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| public override async Task<DialogTurnResult> ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken = default) | ||
| { | ||
| // TODO: Carlos try to delete | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.ContinueDialogAsync(dc, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Runtime.CompilerServices; | ||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
| using Microsoft.Bot.Builder.Dialogs; | ||
| using Microsoft.Bot.Components.Telephony.Common; | ||
| using Microsoft.Bot.Connector; | ||
| using Newtonsoft.Json; | ||
|
|
||
| namespace Microsoft.Bot.Components.Telephony.Actions | ||
| { | ||
| /// <summary> | ||
| /// Starts recording the current conversation. | ||
| /// </summary> | ||
| public class StartRecording : CommandDialog | ||
| { | ||
| /// <summary> | ||
| /// Class identifier. | ||
| /// </summary> | ||
| [JsonProperty("$kind")] | ||
| public const string Kind = "Microsoft.Telephony.StartRecording"; | ||
|
|
||
| private const string RecordingStart = "channel/vnd.microsoft.telephony.recording.start"; | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="StartRecording"/> class. | ||
| /// </summary> | ||
| /// <param name="sourceFilePath">Optional, source file full path.</param> | ||
| /// <param name="sourceLineNumber">Optional, line number in source file.</param> | ||
| [JsonConstructor] | ||
| public StartRecording([CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) | ||
| : base() | ||
| { | ||
| // enable instances of this command as debug break point | ||
| this.RegisterSourceLocation(sourceFilePath, sourceLineNumber); | ||
|
|
||
| this.CommandName = RecordingStart; | ||
| } | ||
|
|
||
| /// <inheritdoc/> | ||
| public async override Task<DialogTurnResult> BeginDialogAsync(DialogContext dc, object options = null, CancellationToken cancellationToken = default) | ||
| { | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.BeginDialogAsync(dc, options, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| /// <inheritdoc/> | ||
| public override async Task<DialogTurnResult> ContinueDialogAsync(DialogContext dc, CancellationToken cancellationToken = default) | ||
| { | ||
| // TODO: Carlos try to delete | ||
| if (dc.Context.Activity.ChannelId == Channels.Telephony) | ||
| { | ||
| return await base.ContinueDialogAsync(dc, cancellationToken).ConfigureAwait(false); | ||
| } | ||
|
|
||
| return await dc.EndDialogAsync(cancellationToken: cancellationToken).ConfigureAwait(false); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.Bot.Components.Telephony.Common | ||
| { | ||
| /// <summary> | ||
| /// Generic dialog to orchestrate issuing command activities and releasing control once a command result is received. | ||
| /// </summary> | ||
| public class CommandDialog : CommandDialog<object> | ||
| { | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple duplicates of the same directory, maybe can just use !/tests/**/[Pp]ackages/*?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed duplicates. There is one instance of !/tests/unit/[Pp]ackages/*. Did you want to remove all references to tests/unit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No we should keep the one!
Are there any instances of
!/tests/[Pp]ackages/*or can that be removed?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Telephony tests are there. I will move them out after this merge and once a few PRs in flight settle down. Too many conflicts otherwise :(
Will make sure to remove this line with that change.