Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions packages/Telephony/Actions/StartRecording.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Components.Telephony.Common;
using Microsoft.Bot.Connector;
using Microsoft.Bot.Schema.Telephony;
using Newtonsoft.Json;

namespace Microsoft.Bot.Components.Telephony.Actions
{
/// <summary>
/// Starts recording the current conversation.
/// </summary>
public class StartRecording : CommandDialog<RecordingStartSettings>
public class StartRecording : CommandDialog
{
/// <summary>
/// Class identifier.
Expand All @@ -38,12 +37,6 @@ public StartRecording([CallerFilePath] string sourceFilePath = "", [CallerLineNu
this.RegisterSourceLocation(sourceFilePath, sourceLineNumber);

this.CommandName = RecordingStart;

this.Data = new RecordingStartSettings()
{
RecordingChannelType = RecordingChannelType.Mixed,
RecordingContentType = RecordingContentType.AudioVideo,
};
}

/// <inheritdoc/>
Expand Down
44 changes: 0 additions & 44 deletions packages/Telephony/Common/RecordingStartSettings.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
{
"$kind": "Microsoft.SendActivity",
"activity": "Started recording!"
},
{
"$kind": "Microsoft.SendActivity",
"activity": "Enter your account number."
},
{
"$kind": "Microsoft.Telephony.PauseRecording",
"allowInterruptions": "=coalesce(settings.allowInterruptions, false)"
},
{
"$kind": "Microsoft.SendActivity",
"activity": "Paused recording!"
},
{
"$kind": "Microsoft.EndTurn"
}
]
},
Expand All @@ -25,14 +40,36 @@
"activity": "On help intent handler"
}
]
},
{
"$kind": "Microsoft.OnIntent",
"intent": "AccountIntent",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "Your account is active."
},
{
"$kind": "Microsoft.Telephony.ResumeRecording",
"allowInterruptions": "=coalesce(settings.allowInterruptions, false)"
},
{
"$kind": "Microsoft.SendActivity",
"activity": "Resumed recording!"
}
]
}
],
"recognizer": {
"$kind": "Microsoft.RegexRecognizer",
"intents": [
{
"intent": "HelpIntent",
"pattern": "help"
"intent": "HelpIntent",
"pattern": "help"
},
{
"intent": "AccountIntent",
"pattern": "account"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
]
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.start'"
]
},
{
"$kind": "Microsoft.Test.UserActivity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,71 @@
"$kind": "Microsoft.Test.UserSays",
"text": "Hello I'm Calculon"
},
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.start'"
]
},
{
"$kind": "Microsoft.Test.UserActivity",
"activity": {
"type": "commandResult",
"name": "channel/vnd.microsoft.telephony.recording.start"
}
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Started recording!"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Enter your account number."
},
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.pause'"
]
},
{
"$kind": "Microsoft.Test.UserActivity",
"activity": {
"type": "commandResult",
"name": "channel/vnd.microsoft.telephony.recording.start"
"name": "channel/vnd.microsoft.telephony.recording.pause"
}
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Started recording!"
"text": "Paused recording!"
},
{
"$kind": "Microsoft.Test.UserSays",
"text": "account"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Your account is active."
},
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.resume'"
]
},
{
"$kind": "Microsoft.Test.UserActivity",
"activity": {
"type": "commandResult",
"name": "channel/vnd.microsoft.telephony.recording.resume"
}
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Resumed recording!"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,32 @@
"dialog": "Recording_BaseScenario.test",
"script": [
{
"$kind": "Microsoft.Test.UserSays",
"text": "Hello I'm Bender"
"$kind": "Microsoft.Test.UserSays",
"text": "Hello I'm Bender"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Started recording!"
"$kind": "Microsoft.Test.AssertReply",
"text": "Started recording!"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Enter your account number."
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Paused recording!"
},
{
"$kind": "Microsoft.Test.UserSays",
"text": "account"
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Your account is active."
},
{
"$kind": "Microsoft.Test.AssertReply",
"text": "Resumed recording!"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
]
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.start'"
]
},
{
"$kind": "Microsoft.Test.UserSays",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
{
"$kind": "Microsoft.Test.AssertReplyActivity",
"assertions": [
"type == 'command'",
"type == 'command'",
"name == 'channel/vnd.microsoft.telephony.recording.start'"
]
},
{
Expand Down