botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Multiple Hits to ProcessCallingEventAsync() in Skype Call for every Record Event

Open cystema opened this issue 8 years ago • 7 comments

Bot Info

  • SDK Platform: .NET
  • SDK Version: 3.14.0.7
  • Active Channels: Skype
  • Deployment Environment: Azure Bot Service, Azure App Service

Issue Description

We have:

[Route("callback")]
public async Task<HttpResponseMessage> ProcessCallingEventAsync()
{
    return await CallingConversation.SendAsync(this.Request, CallRequestType.CallingEvent);
}

Sometimes (but almost always, at least 4-5 times in a call), this method is hit thrice in a row for the same event. Before the first fired event can finish processing, this event is hit a second and then third time, which causes some flags set in the code to change and ruin the intended flow.

Similar to https://github.com/Microsoft/BotBuilder/issues/2016.

Reproduction Steps

  1. Speak into the bot as required.
  2. Wait for issue to occur.

Expected Behavior

For every Record event, the ProcessCallingEventAsync() method should be hit once. Hence, the event handler OnRecordCompleted() should be hit just once.

Actual Results

The method is hit thrice in a row - causing the OnRecordCompleted() event to fired thrice. This muddles the intended flow.

cystema avatar May 22 '18 12:05 cystema

Hi @flatmath,

Are you still experiencing issues? If so, can you provide your AppId so I can look at the activity?

stevkan avatar Jun 05 '18 18:06 stevkan

Closing due to no response. Please reopen if you're still experiencing this issue.

stevkan avatar Jun 15 '18 16:06 stevkan

@stevkan I'd like to re-open this issue. The AppId is [80dbaddf-68d0-40ee-9326-edbf49a636da].

cystema avatar Jun 18 '18 08:06 cystema

@flatmath, I'll take a look and let you know what I find.

stevkan avatar Jun 21 '18 22:06 stevkan

any updates? @stevkan

cystema avatar Jul 27 '18 09:07 cystema

@flatmath, I have been testing the sample and came across a couple lines of code that need to change. Could you alter yours to match the following and test again? I have been unable to reproduce the issue and am wondering if your experience is related to the following. Let me know.

  1. In Web.config, change the "MicrosoftSpeechRecognitionUri" value to "https://speech.platform.bing.com/speech/recognition/dictation/cognitiveservices/v1?language=en-US". The Uri provided in the sample is incorrect.

    • Be sure you generate a Cognitive Services Bing Speech API key, if you haven't already.
  2. In MSCongnitiveSpeechService.cs, change line 34 from "var requestUri = this.speechRecognitionUri + Guid.NewGuid();" to "var requestUri = this.speechRecognitionUri;". The Uri doesn't accept an appended value.

  3. In MSCongnitiveSpeechService.cs, change line 52 from "return data.header.name" to "return data["DisplayText"]. The return value actually lives in the location I specify

stevkan avatar Jul 30 '18 20:07 stevkan

Closing as resolved. If you encounter the issue again, please feel free to reopen.


The Microsoft Bot Framework team prefers that how to questions be submitted on Stack Overflow. The official Bot Framework Github repo  is the preferred platform for submitting bug fixes and feature requests.

stevkan avatar Aug 06 '18 18:08 stevkan