Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Communications SDK doc for GA. #209

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
58 changes: 29 additions & 29 deletions Samples/Common/Sample.Common/Sample.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<RootNamespace>Sample.Common</RootNamespace>
<AssemblyName>Sample.Common</AssemblyName>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\..\Graph.props" />
<ItemGroup>
<PackageReference Include="Microsoft.Graph.Communications.Client" Version="1.2.0.791" />
<PackageReference Include="Microsoft.Graph.Communications.Core" Version="1.2.0.791" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.3" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="5.5.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<RootNamespace>Sample.Common</RootNamespace>
<AssemblyName>Sample.Common</AssemblyName>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\Graph.props" />

<ItemGroup>
<PackageReference Include="Microsoft.Graph.Communications.Client" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Graph.Communications.Core" Version="1.2.0.850" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.3" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="5.5.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.Owin" Version="5.2.7" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.791" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Owin.Hosting" Version="4.0.1" />
<PackageReference Include="Microsoft.Skype.Bots.Media" Version="1.17.0.39-alpha" />
<Reference Include="System.Data.Entity" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"contentVersion": "1.0.0.0",
"parameters": {
"clusterLocation": {
"value": "westus"
"value": "westus2"
},
"clusterName": {
"value": "%BotNameLower%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"parameters": {
"clusterLocation": {
"type": "string",
"defaultValue": "westus",
"defaultValue": "westus2",
"metadata": {
"description": "Location of the Cluster"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- Although Bots.Media is implicitly imported by Calls.Media, this library requires an explicit reference for
some scripts included within the nuget package. -->
<PackageReference Include="Microsoft.Skype.Bots.Media" Version="1.17.0.39-alpha" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.791" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.850" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Samples/V1.0Samples/LocalMediaSamples/HueBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ Click `Start` on the top toolbar to deploy the sample to the local cluster.

![Test Meeting1](Images/TestMeeting1.png)

1. Copy the Join Microsoft Teams Meeting link. Depending on where you copy this, this may be encoded as a safe link in Outlook. If it's encoded, first decode the link and replace the " with \".
2. Copy the Join Microsoft Teams Meeting link. Depending on where you copy this, this may be encoded as a safe link in Outlook. If it's encoded, you can use it directly. If it's decoded, replace every " in the link with \\".

![Test Meeting2](Images/TestMeeting2.png)

Example, `https://teams.microsoft.com/l/meetup-join/19:[email protected]/1509579179399?context={"Tid":"72f988bf-86f1-41af-91ab-2d7cd011db47","Oid":"550fae72-d251-43ec-868c-373732c2704f","MessageId":"1536978844957"}`

1. Join the meeting from the Teams client and start up video.
3. Join the meeting from the Teams client and start up video.

1. Interact with your service, _adjusting the service URL appropriately_. Target port 9441 for the first request to the load balancer. The returned URL will be on a different port/node that picked up the call.
4. Interact with your service, _adjusting the service URL appropriately_. Target port 9441 for the first request to the load balancer. The returned URL will be on a different port/node that picked up the call.
1. Use Postman to post the following `JSON` payload.

##### Request
Expand All @@ -155,7 +155,7 @@ Click `Start` on the top toolbar to deploy the sample to the local cluster.
Content-Type: application/json

{
"JoinURL": "https://teams.microsoft.com/l/meetup-join/..."
"JoinURL": "{URL to join the meeting, copied from step 2}"
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.WebApi.Owin" Version="5.2.7" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.791" />
<PackageReference Include="Microsoft.Graph.Communications.Calls.Media" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Owin.Hosting" Version="4.0.1" />
<PackageReference Include="Microsoft.Skype.Bots.Media" Version="1.17.0.39-alpha" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
Expand Down
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 17 additions & 11 deletions Samples/V1.0Samples/LocalMediaSamples/PolicyRecordingBot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,35 +60,41 @@ To verify your policy was assigned correctly:

1. Create a cloud service (classic) in Azure. Get your "Site URL" from Azure portal, this will be your DNS name and CN name for later configuration, for example: `bot.contoso.com`.

1. Set up SSL certificate and upload to the cloud service
2. Set up SSL certificate and upload to the cloud service
1. Create a wildcard certificate for your service. This certificate should not be a self-signed certificate. For instance, if your bot is hosted at `bot.contoso.com`, create the certificate for `*.contoso.com`.
2. Upload the certificate to the cloud service.
3. Copy the thumbprint for later.

1. Set up cloud service configuration
3. Set up cloud service configuration
1. Open powershell, go to the folder that contains file `configure_cloud.ps1`. The file is in the `Samples` directory.

2. Run the powershell script with parameters:
* `> .\configure_cloud.ps1 -p .\BetaSamples\LocalMediaSamples\PolicyRecordingBot\ -dns {your DNS name} -cn {your CN name, should be the same as your DNS name} -thumb {your certificate thumbprint} -bid {your bot name} -aid {your bot app id} -as {your bot secret}`, for example `.\configure_cloud.ps1 -p .\BetaSamples\LocalMediaSamples\PolicyRecordingBot\ -dns bot.contoso.com -cn bot.contoso.com -thumb ABC0000000000000000000000000000000000CBA -bid bot -aid 3853f935-2c6f-43d7-859d-6e8f83b519ae -as 123456!@#$%^`
`> .\configure_cloud.ps1 -p {path to project} -dns {your DNS name} -cn {your CN name, should be the same as your DNS name} -thumb {your certificate thumbprint} -bid {your bot name} -aid {your bot app id} -as {your bot secret}`

For example:

`.\configure_cloud.ps1 -p .\V1.0Samples\LocalMediaSamples\PolicyRecordingBot\ -dns bot.contoso.com -cn bot.contoso.com -thumb ABC0000000000000000000000000000000000CBA -bid bot -aid 3853f935-2c6f-43d7-859d-6e8f83b519ae -as 123456!@#$%^`

1. Publish the bot from VS:
4. Publish the bot from VS:
1. Right click PolicyRecordingBot, then click `Publish...`. Publish it to the cloud service you created earlier.

### Test

1. Set up the test meeting and test clients:
1. Sign in to Teams client with a non-recorded test tenant user.
1. Use another Teams client to sign in with the recorded user. (You could use an private browser window at https://teams.microsoft.com)
2. Use another Teams client to sign in with the recorded user. (You could use an private browser window at https://teams.microsoft.com). Use Teams client if you couldn't see the call notification by using Teams browser for some reason.
zihzhan-msft marked this conversation as resolved.
Show resolved Hide resolved

1. Place a call from the Teams client with the non-recorded user to the recorded user.
2. Place a call from the Teams client with the non-recorded user to the recorded user.

1. Your bot should now receive an incoming call, and join the call (See next step for retrieving logs). Use the recorded user's Teams client to accept the call.
3. Your bot should now receive an incoming call, and join the call (See next step for retrieving logs). Use the recorded user's Teams client to accept the call. A banner should show up once the call get established.
zihzhan-msft marked this conversation as resolved.
Show resolved Hide resolved
![Test PrBot1](Images/TestPrBot1.png)

1. Interact with your service, _adjusting the service URL appropriately_.
1. Get diagnostics data from the bot. Open the links in a browser for auto-refresh. Replace the call id 311a0a00-53d9-4a42-aa78-c10a9ae95213 below with your call id from the first response.
* Active calls: https://bot.contoso.com/calls
3. Interact with your service, _adjusting the service URL appropriately_.
1. Get diagnostics data from the bot. Open the url https://bot.contoso.com/calls in a browser for auto-refresh. Search for the most recent CallId and replace with it in the below url.
* Active calls: https://bot.contoso.com/calls/{CallId}
* Service logs: https://bot.contoso.com/logs

1. By default, the call will be terminated when the recording status has failed. You can terminate the call through `DELETE`, as needed for testing. Replace the call id `311a0a00-53d9-4a42-aa78-c10a9ae95213` below with your call id from the first response.
2. By default, the call will be terminated when the recording status has failed. You can terminate the call through `DELETE`, as needed for testing. Replace the call id `311a0a00-53d9-4a42-aa78-c10a9ae95213` below with your call id from the first response.

##### Request
```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
<PackageReference Include="Microsoft.Graph.Communications.Calls" Version="1.2.0.791" />
<PackageReference Include="Microsoft.Graph.Communications.Calls" Version="1.2.0.850" />
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="4.9.0" />
<ProjectReference Include="..\..\..\Common\Sample.Common\Sample.Common.csproj" />
<Reference Include="System.Net.Http" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Sample.SimpleIvrBot.Bot
using Sample.Common;
using Sample.Common.Authentication;
using Sample.Common.Transport;
using Sample.SimpleIvrBot.Controller;
using Sample.SimpleIvrBot.Controllers;
using Sample.SimpleIvrBot.Data;
using Sample.SimpleIvrBot.Extensions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the MIT license.
// </copyright>

namespace Sample.SimpleIvrBot.Controller
namespace Sample.SimpleIvrBot.Controllers
{
/// <summary>
/// Http route constants for routing requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the MIT license.
// </copyright>

namespace Sample.SimpleIvrBot.Controller
namespace Sample.SimpleIvrBot.Controllers
{
using Microsoft.AspNetCore.Mvc;
using Sample.Common.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Licensed under the MIT license.
// </copyright>

namespace Sample.SimpleIvrBot.Controller
namespace Sample.SimpleIvrBot.Controllers
{
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@
</PropertyGroup>

<ItemGroup>
<Folder Include="Controller\" />
<Folder Include="Controllers\" />
<Folder Include="Extensions\" />
<Folder Include="wwwroot\audio\" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
<PackageReference Include="Microsoft.Graph.Communications.Common" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Graph.Communications.Client" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Graph.Communications.Core" Version="1.2.0.850" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,7 @@ private void CleanupCall(string callId)
}
else
{
throw new ServiceException(new Error()
{
Message = "File does not exist to be deleted.",
});
this.GraphLogger.Log(TraceLevel.Info, "File to be deleted does not exist.");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="2.1.1" />
<PackageReference Include="Microsoft.Graph.Communications.Common" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Graph.Communications.Client" Version="1.2.0.850" />
<PackageReference Include="Microsoft.Graph.Communications.Core" Version="1.2.0.850" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This changelog covers what's changed in Microsoft Graph Communications SDK and i
- For a full list of changes refer to the [graph blog](https://developer.microsoft.com/en-us/graph/blogs/microsoft-graph-net-sdk-updates/).
- Changed name of Compliance Recording to Policy Recording
- Migrated the Policy Recording sample to the https://graph.microsoft.com/v1.0 endpoint.
- Updated Communications libraries in v1 bots to use the 1.2.0.791 SDK.
- Updated Communications libraries in v1 bots to use the 1.2.0.850 SDK.
- Exposed the Policy Recording API's in v1.
- Updated Media library in v1 bots to 1.17.0.39-alpha

Expand Down
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 <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>
<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>
<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 <a class="xref" href="../bot_media/Microsoft.Skype.Bots.Media.MediaPlatformSettings.html">MediaPlatformSettings</a> to the following.</p>
<p>Update your @Microsoft.Skype.Bots.Media.MediaPlatformSettings to the following.</p>
<pre><code>var mediaPlatform = new MediaPlatformSettings
{
ApplicationId = &lt;Your application id&gt;
Expand Down
Loading