dSIPRouter Wednesday: How to Set Up Microsoft Teams Direct Routing in 15 Minutes
dSIPRouter Wednesday: How to Set Up Microsoft Teams Direct Routing in 15 Minutes
Welcome to dSIPRouter Wednesday — your midweek guide to hands-on SIP routing tutorials!
This week, we're walking you through one of dSIPRouter's most popular use cases: Microsoft Teams Direct Routing. By the end of this guide, you'll have Teams connected to your SIP trunk provider.
What You'll Need
Before we start, make sure you have:
- A running dSIPRouter instance (v0.7+)
- A Microsoft 365 tenant with Phone System licenses
- A SIP trunk provider account
- Admin access to both systems
- About 15 minutes ☕
Step 1: Enable Teams Direct Routing in dSIPRouter
Log into your dSIPRouter dashboard and navigate to PBX(s) and Endpoints.
Click Add and select Microsoft Teams as the PBX type.
Enter your Teams tenant domain (e.g., contoso.onmicrosoft.com) and save.
dSIPRouter automatically configures:
- TLS certificate requirements
- Media bypass settings
- Codec preferences for Teams compatibility
Step 2: Configure Your SIP Trunk
Navigate to Carriers and add your SIP provider.
Required settings:
- Gateway IP/FQDN: Your provider's SIP server
- Trunk Type: IP Authentication or Registration
- Codecs: G.711 (required for Teams)
Test the trunk connection before proceeding.
Step 3: Set Up Call Routing
Go to Outbound Routes and create a new route:
- Name: Teams-to-PSTN
- Match Pattern: Match all or specific DIDs
- Carrier Group: Select your SIP trunk
- Source: Your Teams endpoint
For inbound calls, create an Inbound Route:
- DID Pattern: Your phone numbers
- Destination: Microsoft Teams endpoint
Step 4: Microsoft 365 Configuration
In the Teams Admin Center:
- Go to Voice → Direct Routing
- Add your dSIPRouter's FQDN as an SBC
- Set the SIP signaling port (default: 5061)
- Enable the SBC
Then assign phone numbers to users:
Set-CsPhoneNumberAssignment -Identity user@contoso.com -PhoneNumber "+14155551234" -PhoneNumberType DirectRouting
Step 5: Test Your Setup
Make a test call:
- From Teams → Dial an external number
- From external → Call your Teams DID
Check dSIPRouter logs for any issues:
- Dashboard → CDR for call records
- Dashboard → Logs for SIP traces
Troubleshooting Tips
Calls not connecting?
- Verify TLS certificates are valid
- Check firewall rules (ports 5061, 3478-3481)
- Ensure media bypass is configured correctly
One-way audio?
- Check NAT/firewall for RTP ports
- Verify codec compatibility
Registration issues?
- Confirm DNS SRV records
- Check SBC health in Teams Admin Center
What's Next?
Now that Teams is connected, consider:
- Adding redundancy: Configure multiple carriers for failover
- Call analytics: Use dSIPRouter's CDR for reporting
- Cost optimization: Route by least-cost carrier
Resources
- Full documentation: dsiprouter.readthedocs.io/en/latest/use-cases.html
- Video walkthrough: Watch on YouTube
- Community support: GitHub Discussions
Questions? Drop them in the comments below!
See you next Wednesday! 🛠️
#dSIPRouterWednesday #MicrosoftTeams #DirectRouting #VoIP #Tutorial #OpenSource