Skip to content

fix: allow separate host for call signaling (local debugging with ngrok) - #117

Open
rsubrama83 wants to merge 1 commit into
mainfrom
fix/separate-signaling-host
Open

rsubrama83 wants to merge 1 commit into
mainfrom
fix/separate-signaling-host

Conversation

@rsubrama83

Copy link
Copy Markdown
Collaborator

Fixes #64. Related to #96.

Problem

AzureSettings.Initialize() builds both the call notification URL (CallControlBaseUrl) and the media FQDN (MediaPlatformInstanceSettings.ServiceFqdn) from ServiceCname, which falls back to ServiceDnsName.

On AKS, signaling (Traefik on 443) and media (LoadBalancer ports) share one host, so this works. For local debugging with ngrok they are different hosts: signaling goes through the ngrok HTTP tunnel, and media goes through a reserved TCP address behind your own CNAME, which the certificate is issued for. With ServiceDnsName set to the media CNAME, as the docs say, Teams sends call notifications to https://<tcp host>:443/.... They never reach the bot, and the call drops without any error in the bot log. This matches #64 and the maintainer's CallControlBaseUrl hint there.

Change

  • New optional setting AzureSettings__ServiceSignalingDnsName, used for CallControlBaseUrl and the call URI returned by POST /joinCall. It falls back to ServiceCname, so behaviour is unchanged when it isn't set. The AKS chart is untouched.
  • The media FQDN still uses ServiceCname / ServiceDnsName.
  • Added the setting to both .env-template files and the README .env example.
  • docs/debug.md: new "Signaling and media hosts" section with an example ngrok .env, plus a troubleshooting entry for "calls fail without errors in the bot".

Testing

  • dotnet build passes with 0 warnings.
  • RecordingBot.Tests: 2/2 pass.
  • Not tested end to end with ngrok. It would be good if someone with a reserved ngrok TCP address could confirm notifications arrive (ngrok inspector at localhost:4040).

🤖 Generated with Claude Code

CallControlBaseUrl and the media ServiceFqdn were both built from
ServiceCname. With ngrok, signaling (HTTP tunnel) and media (TCP tunnel
behind a CNAME) are on different hosts, so call notifications were sent
to the TCP tunnel host, never reached the bot, and calls failed without
errors.

Add the optional AzureSettings__ServiceSignalingDnsName setting, used for
CallControlBaseUrl and the joinCall response. It falls back to
ServiceCname, so AKS and existing setups are unchanged. Document the
local setup in docs/debug.md and the env templates.

Fixes #64

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TeamsRecordingBot debug on local machine is not working

1 participant