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
76 stars 36 forks source link

Exceptions on incoming connections #9

Closed tjr114 closed 7 years ago

tjr114 commented 7 years ago

I'm stuck. I have the sample deployed, but every attempt to communicate with the bot fails with an exception. There are two cases I'm hitting as I attempt to troubleshoot. Note that I attempted to add a messaging endpoint to the sample as I was struggling getting A/V working and I thought it could help me with troubleshooting.

1) I have the Bot messaging endpoint point to my CNAME record (myhuebot.mydomain.org/api/messages) which points to the actual Azure service FQDN of myhuebot.cloudapp.net. In this case, I get the following error from AppInsights- "POST to the bot's endpoint failed with HTTP status 404".

2) I set the Bot messaging endpoint to the Azure cloud service FQDN (https://myhuebot.cloudapp.net/api/messages). In this case, my cert that I uploaded is for my personal domain and as a result I get an error "Bad certificateThe remote certificate is invalid according to the validation procedure." Now in this case, I am assuming the issue is due to the fact that the ServiceDNSName in ServiceConfiguration.Cloud.cscfg doesn't match the subject name of the certificate I used. For ServiceDNSName I was using myhuebot.cloudapp.net and the cert SN is myhuebot.mydomain.org. So I subsequently tried modifying the ServiceDNSName to match the SN (myhuebot.mydomain.org) and that failed when attempting to deploy to Azure from VS seemingly because of this ServiceDNSName change.

I know there's a deployment guide referenced from the readme, but not having every built a bot that requires certificates I seem to be missing the point here. Any help would be greatly appreciated.

MalarGit commented 7 years ago

Is this cert a selfsigned cert or from a trusted CA? we accept only trusted CA certs. The last entry of the Subject Alternative Name (SAN) of the certificate or the Subject Name if no SAN entries are present should be the CNAME. Wild-card certificates are currently not supported.

Also could you sync to the latest changes? I added messaging endpoint few days back to help debug issues. Now I have split the config into 2 settings

      <Setting name="ServiceDnsName" value="$ServiceDnsName$" /> <!-- xyz.cloudapp.net-->
      <Setting name="ServiceCNAME" value="" /> <!-- CNAME pointing to the .cloudapp.net if available.-->

ServiceDNSName in your case would be myhuebot.cloudapp.net and ServiceCNAME is myhuebot.mydomain.org. I hope you modified the appid and secret in app.config as well.

tjr114 commented 7 years ago

I synced down the updated sample and after reading through the other related issue thread here (https://github.com/Microsoft/BotBuilder-RealTimeMediaCalling/issues/2) I discovered that my calling hook URL was incorrect. I now have audio and video playing back successfully for the first time just a moment ago. Thanks for the help.