Skip to content

Commit

Permalink
Update Public Sample Doc. (microsoftgraph#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
zihzhan-msft authored May 4, 2020
1 parent 41c15e2 commit 6e69b1b
Show file tree
Hide file tree
Showing 30 changed files with 1,314 additions and 1,284 deletions.
4 changes: 2 additions & 2 deletions Samples/V1.0Samples/RemoteMediaSamples/IncidentBot/Bot/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ public async Task<ICall> JoinCallAsync(JoinCallRequestData joinCallBody, string

Microsoft.Graph.MeetingInfo meetingInfo;
ChatInfo chatInfo;
if (!string.IsNullOrWhiteSpace(joinCallBody.MeetingId))
if (!string.IsNullOrWhiteSpace(joinCallBody.VideoTeleconferenceId))
{
// Meeting id is a cloud-video-interop numeric meeting id.
var onlineMeeting = await this.OnlineMeetings
.GetOnlineMeetingAsync(joinCallBody.TenantId, joinCallBody.MeetingId, scenarioId)
.GetOnlineMeetingAsync(joinCallBody.TenantId, joinCallBody.VideoTeleconferenceId, scenarioId)
.ConfigureAwait(false);

meetingInfo = new OrganizerMeetingInfo { Organizer = onlineMeeting.Participants.Organizer.Identity, };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class JoinCallRequestData
/// <summary>
/// Gets or sets the meeting identifier.
/// </summary>
public string MeetingId { get; set; }
public string VideoTeleconferenceId { get; set; }

/// <summary>
/// Gets or sets the tenant id.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 23 additions & 18 deletions Samples/V1.0Samples/RemoteMediaSamples/IncidentBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,33 @@ The sample demostrate an incident process workflow. When a incident raised (thro
4. Login Teams with user1. Create a teams channel and add a meeting there.
* Meeting uri should be in format https://teams.microsoft.com/l/meetup-join/...

5. Use the postman to send request to "\{WebSiteRootUri\}/incidents/raise", with header "Content-Type:application/json" and the json content in body as below:
```json
{
"name": "<name-of-incident>",
"time": "<start-time-of-the-incident-in-ISO-8601-format>",
"tenantId": "{TenantId}",
"objectIds": [
"{UserObjectId-1}",
"{UserObjectId-2}"
],
"meetingId": "{MeetingId}",
"joinURL": "https://teams.microsoft.com/l/meetup-join/...",
"removeFromDefaultRoutingGroup": true,
"allowConversationWithoutHost": true
}
```
5. If the meeting created is a VTC meeting and **{videoTeleconferenceId}** is provided in request body, then **{videoTeleconferenceId}** will be used as a replacement of **{joinURL}**.
![Test Meeting1](Images/TestMeeting1.png)

6. Use the postman to send request to "**{WebSiteRootUri}/incidents/raise**", with header "Content-Type:application/json" and the json content in body as below:
```json
{
"name": "<name-of-incident>",
"time": "<start-time-of-the-incident-in-ISO-8601-format>",
"tenantId": "{TenantId}",
"objectIds": [
"{UserObjectId-1}",
"{UserObjectId-2}"
],
"videoTeleconferenceId": "{VTC Conference ID}, alternative parameter",
"joinURL": "https://teams.microsoft.com/l/meetup-join/..., alternative parameter",
"removeFromDefaultRoutingGroup": true,
"allowConversationWithoutHost": true
}
```

6. user1 & user2 should get audio call, and bot should joined the schedule meeting.

7. Choose user1 as a example, when the call is picked up, user1 should be able to hear the audio prompt to notice an incident is occured, and press "1" or "0" for different actions.
7. Choose user1 as a example(currently, user2's behaviors are same as user1's), when the call is picked up, user1 should be able to hear the audio prompt to notice an incident is occured, and press "1" or "0" for different actions.

8. If user1 pressed "1", an new invitation will be sent from the bot to invite user1 to join the incident meeting, user1 could click "video" or "voice only" button to join the incident meeting.
8. If user1 pressed "1", an new invitation will be sent from the bot to invite user1 to join the incident meeting.
* If Teams Client is in the P2P call panel layout with Incident Bot, user1 will join the Incident Meeting directly with "voice only" by default.
* If Teams Client is in the menu layout with P2P call layout minimized on Top-left, user1 will received an invitation from Bot, with choices of "video" or "voice only" to join the incident meeting.

# Contribute
TODO: Explain how other users and developers can contribute to make your code better.
Expand Down
7 changes: 7 additions & 0 deletions Samples/V1.0Samples/StatelessSamples/SimpleIvrBot.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleIvrBot", "SimpleIvrBo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Common", "..\..\Common\Sample.Common\Sample.Common.csproj", "{4FCDBE79-54CC-43F0-A6FC-674B5CD980E1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{535E8276-78C8-419B-9199-F300F05FA9A4}"
ProjectSection(SolutionItems) = preProject
..\..\configure_cloud.ps1 = ..\..\configure_cloud.ps1
..\..\Graph.props = ..\..\Graph.props
..\..\nuget.config = ..\..\nuget.config
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29102.190
VisualStudioVersion = 16.0.30002.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{DCC9792D-0B15-4167-8A9F-BB5DDDA6E7D6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VoiceRecorderAndPlaybackBot", "VoiceRecorderAndPlaybackBot\VoiceRecorderAndPlaybackBot.csproj", "{47696D0E-0F53-49BD-AAD3-83DC1F83FAE0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Common", "..\..\Common\Sample.Common\Sample.Common.csproj", "{09026D7D-6E99-43E0-B35C-9182A488F192}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A5B96260-B14D-4923-8F66-0D080C65A350}"
ProjectSection(SolutionItems) = preProject
..\..\configure_cloud.ps1 = ..\..\configure_cloud.ps1
..\Graph.props = ..\Graph.props
..\nuget.config = ..\nuget.config
..\..\Graph.props = ..\..\Graph.props
..\..\nuget.config = ..\..\nuget.config
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VoiceRecorderAndPlaybackBot", "VoiceRecorderAndPlaybackBot\VoiceRecorderAndPlaybackBot.csproj", "{FA70E97D-7018-4B08-A9D0-ABA9967AD7DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Common", "..\..\Common\Sample.Common\Sample.Common.csproj", "{3268E59C-90DC-4D7B-97EA-A1DBB2716DF3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FA70E97D-7018-4B08-A9D0-ABA9967AD7DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA70E97D-7018-4B08-A9D0-ABA9967AD7DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA70E97D-7018-4B08-A9D0-ABA9967AD7DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA70E97D-7018-4B08-A9D0-ABA9967AD7DC}.Release|Any CPU.Build.0 = Release|Any CPU
{3268E59C-90DC-4D7B-97EA-A1DBB2716DF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3268E59C-90DC-4D7B-97EA-A1DBB2716DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3268E59C-90DC-4D7B-97EA-A1DBB2716DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3268E59C-90DC-4D7B-97EA-A1DBB2716DF3}.Release|Any CPU.Build.0 = Release|Any CPU
{47696D0E-0F53-49BD-AAD3-83DC1F83FAE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{47696D0E-0F53-49BD-AAD3-83DC1F83FAE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47696D0E-0F53-49BD-AAD3-83DC1F83FAE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47696D0E-0F53-49BD-AAD3-83DC1F83FAE0}.Release|Any CPU.Build.0 = Release|Any CPU
{09026D7D-6E99-43E0-B35C-9182A488F192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09026D7D-6E99-43E0-B35C-9182A488F192}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09026D7D-6E99-43E0-B35C-9182A488F192}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09026D7D-6E99-43E0-B35C-9182A488F192}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {49D3AAEB-2787-4CC0-876C-8F6C8E350FD7}
SolutionGuid = {389E7A53-C21E-4865-B2ED-3E7FFB0E50D3}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions docs/articles/Logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@
<article class="content wrap" id="_content" data-uid="">
<h1 id="logging-in-sdk">Logging in SDK</h1>

<p>The Graph SDK uses a custom logger named @Microsoft.Graph.Communications.Common.Telemetry.IGraphLogger which allows custom subscribers for log events. These events can be observed and logged as required by the bot developers.</p>
<p>You need to create an <code>IObserver</code> for log events (the @Microsoft.Graph.Communications.Common.Telemetry.LogEvent class).</p>
<p>The Graph SDK uses a custom logger named <a class="xref" href="../common/Microsoft.Graph.Communications.Common.Telemetry.IGraphLogger.html">IGraphLogger</a> which allows custom subscribers for log events. These events can be observed and logged as required by the bot developers.</p>
<p>You need to create an <code>IObserver</code> for log events (the <a class="xref" href="../common/Microsoft.Graph.Communications.Common.Telemetry.LogEvent.html">LogEvent</a> class).</p>
<pre><code class="lang-cs">private class LogObserver : IObserver&lt;LogEvent&gt;
{
private readonly LogEventFormatter formatter = new LogEventFormatter();
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/Testing.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ <h4 id="update-signaling">Update Signaling</h4>
<div class="IMPORTANT"><h5>Important</h5><p>Your local instance must be listening to http traffic on the signaling port. The requests made by Graph Platform will reach the bot as localhost http traffic when End to End encryption is not setup.</p>
</div>
<h4 id="update-media">Update Media</h4>
<p>Update your @Microsoft.Skype.Bots.Media.MediaPlatformSettings to the following.</p>
<p>Update your <a class="xref" href="../bot_media/Microsoft.Skype.Bots.Media.MediaPlatformSettings.html">MediaPlatformSettings</a> to the following.</p>
<pre><code>var mediaPlatform = new MediaPlatformSettings
{
ApplicationId = &lt;Your application id&gt;
Expand Down
8 changes: 4 additions & 4 deletions docs/articles/calls/appHostedMediaCalls.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ <h1 id="application-hosted-media-calls">Application Hosted Media Calls</h1>
<p>Application Hosted Media calls are those calls in which the bot manages the call&#39;s video and audio sockets. The bots send and receive raw audio and video data over the network.</p>
<h2 id="building-a-communicationsclient-with-media-platform-settings">Building a CommunicationsClient with Media Platform Settings</h2>
<ol>
<li>Create the an instance of the @Microsoft.Graph.Communications.Client.ICommunicationsClientBuilder.</li>
<li>Create an instance of @Microsoft.Skype.Bots.Media.MediaPlatformSettings and use <a href="xref:Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientBuilderExtensions#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientBuilderExtensions_SetMediaPlatformSettings_Microsoft_Graph_Communications_Client_ICommunicationsClientBuilder_Microsoft_Skype_Bots_Media_MediaPlatformSettings_">MediaCommunicationsClientBuilderExtensions.SetMediaPlatformSettings</a> method to pass the @Microsoft.Skype.Bots.Media.MediaPlatformSettings to build the @Microsoft.Graph.Communications.Client.ICommunicationsClient</li>
<li>Once the builder builds the @Microsoft.Graph.Communications.Client.ICommunicationsClient, a media session can be created using either <a href="xref:Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientExtensions#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientExtensions_CreateMediaSession_Microsoft_Graph_Communications_Client_ICommunicationsClient_Microsoft_Skype_Bots_Media_AudioSocketSettings_Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_DataSocketSettings_System_Guid_">MediaCommunicationsClientExtension.CreateMediaSession</a> or <a href="xref:Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientExtensions#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientExtensions_CreateMediaSession_Microsoft_Graph_Communications_Client_ICommunicationsClient_Microsoft_Skype_Bots_Media_AudioSocketSettings_System_Collections_Generic_IEnumerable_Microsoft_Skype_Bots_Media_VideoSocketSettings__Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_DataSocketSettings_System_Guid_">MediaCommunicationsClientExtension.CreateMediaSession</a> depending on how many video sockets are required.</li>
<li>Create the an instance of the <a class="xref" href="../../client/Microsoft.Graph.Communications.Client.ICommunicationsClientBuilder.html">ICommunicationsClientBuilder</a>.</li>
<li>Create an instance of <a class="xref" href="../../bot_media/Microsoft.Skype.Bots.Media.MediaPlatformSettings.html">MediaPlatformSettings</a> and use <a class="xref" href="../../calls_media/Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientBuilderExtensions.html#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientBuilderExtensions_SetMediaPlatformSettings_Microsoft_Graph_Communications_Client_ICommunicationsClientBuilder_Microsoft_Skype_Bots_Media_MediaPlatformSettings_">MediaCommunicationsClientBuilderExtensions.SetMediaPlatformSettings</a> method to pass the <a class="xref" href="../../bot_media/Microsoft.Skype.Bots.Media.MediaPlatformSettings.html">MediaPlatformSettings</a> to build the <a class="xref" href="../../client/Microsoft.Graph.Communications.Client.ICommunicationsClient.html">ICommunicationsClient</a></li>
<li>Once the builder builds the <a class="xref" href="../../client/Microsoft.Graph.Communications.Client.ICommunicationsClient.html">ICommunicationsClient</a>, a media session can be created using either <a class="xref" href="../../calls_media/Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientExtensions.html#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientExtensions_CreateMediaSession_Microsoft_Graph_Communications_Client_ICommunicationsClient_Microsoft_Skype_Bots_Media_AudioSocketSettings_Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_DataSocketSettings_System_Guid_">MediaCommunicationsClientExtension.CreateMediaSession</a> or <a class="xref" href="../../calls_media/Microsoft.Graph.Communications.Calls.Media.MediaCommunicationsClientExtensions.html#Microsoft_Graph_Communications_Calls_Media_MediaCommunicationsClientExtensions_CreateMediaSession_Microsoft_Graph_Communications_Client_ICommunicationsClient_Microsoft_Skype_Bots_Media_AudioSocketSettings_System_Collections_Generic_IEnumerable_Microsoft_Skype_Bots_Media_VideoSocketSettings__Microsoft_Skype_Bots_Media_VideoSocketSettings_Microsoft_Skype_Bots_Media_DataSocketSettings_System_Guid_">MediaCommunicationsClientExtension.CreateMediaSession</a> depending on how many video sockets are required.</li>
<li>When creating an object of the <a class="xref" href="https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/src/Microsoft.Graph/Models/Generated/Call.cs">Call</a> resource, <a class="xref" href="https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/src/Microsoft.Graph/Models/Generated/MediaConfig.cs">MediaConfig</a> needs to be set to <a class="xref" href="https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/src/Microsoft.Graph/Models/Generated/AppHostedMediaConfig.cs">AppHostedMediaConfig</a>.</li>
</ol>
<div class="IMPORTANT"><h5>Important</h5><p>When creating a new call that uses application hosted media, an instance of @Microsoft.Graph.Communications.Calls.IMediaSession needs to be passed into <a href="xref:Microsoft.Graph.Communications.Calls.CallCollectionExtensions#Microsoft_Graph_Communications_Calls_CallCollectionExtensions_AddAsync_Microsoft_Graph_Communications_Calls_ICallCollection_Microsoft_Graph_Communications_Calls_JoinMeetingParameters_System_Guid_System_Threading_CancellationToken_">CallCollectionExtensions.AddAsync</a></p>
<div class="IMPORTANT"><h5>Important</h5><p>When creating a new call that uses application hosted media, an instance of <a class="xref" href="../../calls/Microsoft.Graph.Communications.Calls.IMediaSession.html">IMediaSession</a> needs to be passed into <a class="xref" href="../../calls/Microsoft.Graph.Communications.Calls.CallCollectionExtensions.html#Microsoft_Graph_Communications_Calls_CallCollectionExtensions_AddAsync_Microsoft_Graph_Communications_Calls_ICallCollection_Microsoft_Graph_Communications_Calls_JoinMeetingParameters_System_Guid_System_Threading_CancellationToken_">CallCollectionExtensions.AddAsync</a></p>
</div>
</article>
</div>
Expand Down
Loading

0 comments on commit 6e69b1b

Please sign in to comment.