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

[Skype for Business] When Message is sent from SfB client to bot, It receives two responses. Address-Id with "sip" and without "sip"

Open ganesh1190 opened this issue 8 years ago • 3 comments

Bot Info

  • SDK Platform: Node.js
  • botbuilder Version: 3.8.4
  • Active Channels: Skype for Bussiness
  • Deployment Environment: Azure Bot Service, Azure App Service

Issue Description

On chat initiation from users to bot using Skype for Business clients like Android, iOS, and Mac, bot receives two responses (type: message) from users. But while using Windows SFB client, bot receives only 1 response. This happens only for first message (during chat initiation). Address -Id in the first message Json is withoud "sip" and second message is with "sip".

twomessage

Code Example

var builder = require('botbuilder');

//
//other Code
//

var intents = new builder.IntentDialog()
                     .onDefault((session) => {        
                             session.send('Sorry, I did not understand \'%s\'.', session.message.text);
                     });


////Here is the two different messages in json format received by Bot.
////Address -Id in the first message Json is withoud "sip" and second message is with "sip" in Address-Id.

{
    "type": "message",
    "timestamp": "2017-12-22T05:18:19.4976179Z",
    "textFormat": "plain",
    "text": "hi",
    "address": {
        "id": //GUID
        "channelId": "skypeforbusiness",
        "user": {
            "id": "[email protected]",
            "name": "TestUserName"
        },
        "conversation": {
            "isGroup": true,
            "id": "NDJjOGUzNjcjc2lwOmJ1bWJsZWJlZUBiYW5uZXJ0ZWNoLm9ubWljcm9zb2Z0LmNvbQ=="
        },
        "bot": {
            "id": "sip:[email protected]",
            "name": "sip:[email protected]"
        },
        "serviceUrl": "https://webpoolbl20r04.infra.lync.com/platformservice/tgt-abcd/botframework"
    },
    "source": "skypeforbusiness",
    "agent": "botbuilder",
    "user": {
        "id": "[email protected]",
        "name": "TestUserName"
    }
}


{
    "type": "message",
    "timestamp": "2017-12-22T05:18:19.5601021Z",
    "textFormat": "plain",
    "text": "hi",
    "address": {
        "id": "2",
       "channelId": "skypeforbusiness",
        "user": {
            "id": "sip:[email protected]",
            "name": "TestUserName"
        },
        "conversation": {
            "isGroup": true,
            "id": "NDJjOGUzNjcjc2lwOmJ1bWJsZWJlZUBiYW5uZXJ0ZWNoLm9ubWljcm9zb2Z0LmNvbQ=="
        },
        "bot": {
            "id": "sip:[email protected]",
            "name": "sip:[email protected]"
        },
        "serviceUrl": "https://webpoolbl20r04.infra.lync.com/platformservice/tgt-3e269d45c99c53b8a53d91bd8610020f/botframework"
    },
    "source": "skypeforbusiness",
    "agent": "botbuilder",
    "user": {
        "id": "sip:[email protected]",
        "name": "TestUserName"
    }
}

Reproduction Steps

  1. Start debugging the bot , using ngrok.
  2. Send message from SFB client like android , mac or ios .
  3. Add brakpoint to "session.send('Sorry, I did not understand '%s'.', session.message.text);"
  4. Observe this breakpoint will be hit two times.
  5. Address -Id in the first response is withoud "sip" and second message is with "sip" in Address-Id.

Expected Behavior

  1. When User sends a messae from SFB clients, Bot server should receive one response per message.

Actual Results

  1. As per observation in message json , Address -Id in the first response is withoud "sip" and second message is with "sip" in Address-Id.
  2. As bot recevices two messages from user , user also gets two responses from the bot.

ganesh1190 avatar Jan 02 '18 08:01 ganesh1190

I am facing the same issue and not able to make my bot live on production. This is making heavy impact on my product. Guys, can you please resolve this?

rohankulkarni21 avatar Jan 10 '18 06:01 rohankulkarni21

Any updates on this? Surprised to see no comments. Guys this is very high priority for us to get it fixed. Please resolve this issue.

ganesh1190 avatar Jan 10 '18 06:01 ganesh1190

Thank you for opening an issue against the Bot Framework SDK v3. As part of the Bot Framework v4 release, we’ve moved all v3 work to a new repo located at https://github.com/microsoft/botbuilder-v3. We will continue to support and offer maintenance updates to v3 via this new repo.

From now on, https://github.com/microsoft/botbuilder repo will be used as hub, with pointers to all the different SDK languages, tools and samples repos.

As part of this restructuring, we are closing all tickets in this repo.

For defects or feature requests, please create a new issue in the new Bot Framework v3 repo found here: https://github.com/microsoft/botbuilder-v3/issues

For Azure Bot Service Channel specific defects or feature requests (e.g. Facebook, Twilio, Teams, Slack, etc.), please create a new issue in the new Bot Framework Channel repo found here: https://github.com/microsoft/botframework-services/issues

For product behavior, how-to, or general understanding questions, please use Stackoverflow. https://stackoverflow.com/search?q=bot+framework

Thank you.

The Bot Framework Team

JasonSowers avatar Oct 01 '18 23:10 JasonSowers