Closed paulnearney closed 4 years ago
@paulnearney A bot application should be able to run as a simple console application on a VM, as long as it self-hosts a WebAPI/HTTP endpoint (in order to receive calls from the platform services). From the traces provided, it looks like the MediaPlatform started successfully - the internal exceptions you see in the traces can be ignored. What application scenario problem are you encountering? The bot can receive audio but not send it? Thanks.
Thanks Steven. I got so caught up on the exceptions from the platform, that I missed that I had an error in my send logic. All good now
@paulnearney Hi Paul, we are trying to achieve the same thing locally. However we have the following error: InvalidOperationException: MediaPlatform needs a system with at least 2 cores for creation. We created a media tunnel with ngrok. We have a certificate pointing to the *.ngrok.io domain. We try to start the app from VS but receive the above exception. Only the Azure Bot instance is in azure.
@angieleba What kind or type of Azure Virtual Machine are you deploying on? Please try a VM with 4 virtual CPUs (vCPUs). Thanks.
@ssulzer Yes, we did exactly that. Changing to 4vCPU solved the error. However, when calling, it still goes to voicemail. I see logs in the ngrok terminal but it does not reach the signaling API. This is my ngrok tunnel configuration:
signaling:
addr: "https://localhost:9441"
proto: http
subdomain: **angieDomain**
host_header: "localhost:9441"
media:
addr: 8445
proto: tcp
remote_addr: 1.tcp.......ngrok.io:ngrokPost
I have a domain in ngrok called angieDomain. From Bot Service I call the ngrok for signaling and I expect to sent me to the OnIncomingRequestAsync but its not happening. Testing the localhost:9441 says connection failed. I have installed in my localComputer a pfx certificate for *.ngrok.io and I have set the ServiceFqdn to the tcp ngrokAddress. The only error I have is "PlaceCallEndpointUrl" from ServiceRuntime: FAIL. but reading online, maybe locally this should happen? Also, I read I should create a CNAME in my pc that will map a domain with the tcp address. Is this necessary? Any insight would be very helpful!
Please review these instructions for setting up a bot running locally behind ngrok: https://microsoftgraph.github.io/microsoft-graph-comms-samples/docs/articles/Testing.html
@ssulzer I followed the steps and we receive the calls from Teams. However, the request cant reach the bot. We try to access the port 9441 and its not reachable at all. Even if we create our custom controller. With reachable I mean that its not entering in debug, it is not reaching the api/signaling endpoint.
For testing/prototyping purposes, I'm looking to be able to create a lightweight application-hosted media app that doesn't have a dependency on cloud service or service fabric. So far, I'm unable to get the media platform to initialize.
On calling SetMediaPlatformSettings, I get a series of TaskCanceled, Socket and ObjectDisposed exceptions (see full program output below). I also see this warning a few times:
I do seem to receive audio from Teams, but get an error along the lines of Socket Closed when I try to send audio.
I'm running this as a .NET Framework 4.6.2 Console application. Source code is below. Referencing:
I'm reusing an ngrok tunnel, Azure AD app, certificate, DNS records etc from an environment that works with the HueBot sample, so I don't think there are any issues with those parts of the setup.
Is this possible? Can I reach my goal of being able to spin up lightweight test apps without the dependency on Service Fabric or Cloud Service?
Source code
Program output