Closed ceciliaavila closed 1 month ago
@ceciliaavila - There's a problem with Azure Relay in that it doesn't work with Direct Line Speech. Or, more accurately, DL Speech won't work with Azure Relay which is a problem for anyone wanting to test it in Emulator. I've used and tested Azure Relay a lot over the past few years. I knew from past experience that this issue with DL Speech existed but only dug into it recently.
Tools I tested included: Azure Service Bus Relay, Tunnel Relay, NetPassage, and DevTunnel.
A little background on each.
The Azure Service Bus Relay tool was created by Gabo Gilabert as an alternative to ngrok and works well when used with DirectLine with or without Cognitive Services Speech. Cognitive Services Speech and DL Speech are different products however both are accessed using a secret/token from CS. (Side note - this tool actually only uses Azure Relay and not Azure Service Bus.)
Team's Tunnel Relay does exactly the same thing as Azure Service Bus Relay by utilizing Azure Relay. It just has a GUI to work with. As it is essentially the same, DL Speech also does not work with it.
NetPassage was initially created as a branch on the Azure Service Bus Relay repo. It has since become its own product. It produces a bi-directional web socket tunnel turning any http
requests into a message in a web socket stream. This works with DirectLine, but DL Speech still does not.
DevTunnel is another MS product that also makes use of Azure Relay and web sockets, though the implementation is different than the other products. Regardless, DL Speech does not work with it.
Here are some of my findings:
http
calls and then redirects them to an Azure Relay web socket instance. It does not support custom web socket connections (i.e., connecting the DL Speech web socket so inbound/outbound traffic could be read). A feature request could be created requesting support for this.wss://
streams that are generated in both a normal DirectLine-based Web Chat conversation and a DirectLine Speech-based Web Chat conversation. In the former, the host of the web socket stream is directline.botframework.com
. Copying the connection string and inputing it into a web socket client (e.g., WebSocket King - an Edge extension) will display all the back and forth messages between the user and the bot.
However, in the latter case, where the host of the web socket stream is westus.convai.speech.microsoft.com
, neither the inbound nor outbound messages generated from the user or bot are available. This includes the initial conversationUpdate
and is true regardless of whether it is text or speech passed into Web Chat. The conversation isn't impeded in any way. The web socket stream simply doesn't display any traffic.
Anyhow, as ngrok was able to overcome this hurdle, as DL Speech works with it, it really seems that it should be possible to overcome this using another tool, such as NetPassage, Tunnel Relay, or DevTunnel. It's just a matter of getting the correct solution implemented.
Thanks for the detailed information @stevkan!
hi, Is there any guidance / steps available to use DevTunnel with bot emulator?
@sambathrajv there is no support yet. There are limitations on DevTunnel side stopping us from the integration. NgRok v3 should work with Emulator Nightly releases
Closing as Ngrok was removed so the user can set the tunneling tool of preference.
Description
We should include Azure Relay service as an alternative tunneling tool.