microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
211 stars 236 forks source link

Samples\V1.0Samples\StatelessSamples do not work with the latest versions of the SDK. #714

Open michaeljdresser opened 8 months ago

michaeljdresser commented 8 months ago

Describe the issue Updating all the 'Microsoft.Graph.Communications' packages to 1.2.0.9212 or above breaks the samples.

Should the stateless samples work with the latest versions of the SDK's? If so can the samples be updated?

I've managed to fix most things but still have a few errors.

Code Example private async Task BotAnswerIncomingCallAsync(string callId, string tenantId, Guid scenarioId) { var answerRequest = this.RequestBuilder.Communications.Calls[callId].Answer( callbackUri: new Uri(this.botBaseUri, ControllerConstants.CallbackPrefix).ToString(), mediaConfig: new ServiceHostedMediaConfig { PreFetchMedia = new List<MediaInfo>() { new MediaInfo() { Uri = new Uri(this.botBaseUri, "audio/speech.wav").ToString(), ResourceId = Guid.NewGuid().ToString(), }, }, }, acceptedModalities: new List<Modality> { Modality.Audio }).Request(); await this.GraphApiClient.SendAsync(answerRequest, RequestType.Create, tenantId, scenarioId).ConfigureAwait(false); }

This produces the error: Severity Code Description Project File Line Suppression State Error CS1955 Non-invocable member 'CallItemRequestBuilder.Answer' cannot be used like a method. SimpleIvrBot C:\Workspace\Projects\microsoft-graph-comms-samples-master\Samples\V1.0Samples\StatelessSamples\SimpleIvrBot\Bot\Bot.cs 403 Active

Regards

Michael.