microsoft / BotBuilder-RealTimeMediaCalling

BotBuilder-RealTimeMediaCalling extends the BotBuilder to enable bots to engage in Skype audio-video calling. It provides real-time, programmable access to the voice, video, and screen sharing streams of a Skype call. The bot is a direct participant in a Skype 1:1 call.
MIT License
74 stars 38 forks source link

HueBotSample: AnswerAPpHostedMedia failed with reason: CallEnded #26

Open itisslizz opened 6 years ago

itisslizz commented 6 years ago

After deploying the HueBot on an azure instance the bot doesn't answer the call. Checking the logs it seems it receives the call and returns accept, however the call ends before that?

Response to incoming call:

228925aa-3725-4369-8655-26e6f36aacbb SendAsync,LoggingMessageHandler.cs(139)] 
|| correlationId=228925aa-3725-4369-8655-26e6f36aacbb 
|| statuscode=Accepted 
|| local.msgid=1a61ed64-5c1e-4fa4-a078-0a93fc095961 
||Response to incoming:: POST https://cloud-rtc.luware.com/api/calling/call
202 Accepted  
Connection: close  
X-Microsoft-Skype-Chain-ID: 228925aa-3725-4369-8655-26e6f36aacbb  
Content-Type: text/plain; charset=utf-8  
{ "notificationSubscriptions": [ "callStateChange" ],    
"links": {  
  "callback": "https://cloud-rtc.luware.com:10100/api/calling/callback/",  
  "notification": "https://cloud-rtc.luware.com:10100/api/calling/notification/" 
 }, 
 "actions": [
    {
      "operationId": "9172976d-12bd-4bf5-9e85-0061dbd79bd5",
      "action": "answerAppHostedMedia",
      "mediaConfiguration": {
        "mpUri": "net.tcp://cloud-rtc.luware.com:20100/MediaProcessor",
        "audioRenderContexts": [
          "29dcaadf-142f-46d3-b210-ea71ff9fbe30"
        ],
        "videoRenderContexts": [
          "b204323a-dd46-4af9-bed0-33e161c1c310"
        ],
        "audioSourceContexts": [
          "c3318e2c-116b-44f3-afd8-7641f62a8b05"
        ],
        "videoSourceContexts": [
          "dadc7d7e-8bf2-4ab1-aebc-5ce1d2527313"
        ],
        "supportedAudioFormat": "Pcm16K",
        "mpMediaSessionId": "609f1c32-4618-4643-8632-070404f42656",
        "regionAffinity": null,
        "skypeMediaBotsVersion": "1.5.0.1177",
        "mediaStackVersion": "6.0.8980.141",
        "mpVersion": "7.0.697.0"
      }
    }
  ],
  "appState": "fe9a3651-6d4e-4390-8e39-be273f31522f"}
$$END$$

Incoming Callback:

[228925aa-3725-4369-8655-26e6f36aacbb SendAsync,LoggingMessageHandler.cs(90)] 
|| correlationId=228925aa-3725-4369-8655-26e6f36aacbb 
|| local.msgid=a8c1bc78-30b8-4e02-a26b-2e6983dd6158 
||Incoming:: POST https://cloud-rtc.luware.com:10100/api/calling/callback/
X-Microsoft-Skype-Chain-ID: 228925aa-3725-4369-8655-26e6f36aacbb
X-Microsoft-Skype-Message-ID: d8372b67-5ec5-4c7c-861e-73cfe0a15970
Connection: Keep-Alive
Accept: application/json
Authorization: Bearer eyJ0eXAiOiJK...
Host: cloud-rtc.luware.com:10100
User-Agent: Microsoft-Skype/3.0,(Calling/1.0)
Content-Length: 386
Content-Type: application/json; charset=utf-8
{
  "id": "fe9a3651-6d4e-4390-8e39-be273f31522f",
  "operationOutcome": {
    "type": "answerAppHostedMediaOutcome",
    "id": "9172976d-12bd-4bf5-9e85-0061dbd79bd5",
    "outcome": "failure",
    "failureReason": "CallEnded"
  },
  "callState": "terminated",
  "appState": "fe9a3651-6d4e-4390-8e39-be273f31522f",
  "links": {
    "call": "https://b-pma-euwe-01.plat.skype.com:6706/platform/v1/calls/76e5982d-b241-4322-a645-3d6261189adc"
  }}
  $$END$$

Any Ideas where the issue lies? Only change I did was changing the workerrole to a Standard_D2 vmsize. Thanks

ssulzer commented 6 years ago

There was a problem validating the certificate presented by your service: The expected DNS identity of the remote endpoint was 'cloud-rtc.luware.com' but the remote endpoint provided DNS claim 'luware.com'.

What are the values of the Subject Name and Subject Alternative Name list of your server certificate?

Thanks, Stephen

itisslizz commented 6 years ago

Thank you for the response. Subject: CN = *.luware.com O = Luware AG L = Zürich S = ZH C = CH

Subject Alternative Name: DNS Name=*.luware.com DNS Name=luware.com

So the exact DNS Name of cloud-rtc.luware.com needs to be in the Subject Alternative Name of the certificate?

Thanks, Marc

ssulzer commented 6 years ago

@itisslizz

Yes, the "cloud-RTC.luware.com" DNS name needs to be added to the end of the SAN list. We do not yet have wild-card support for bot certificates. Thanks.