← Back to Blog
NEWS

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:

  1. Name: Teams-to-PSTN
  2. Match Pattern: Match all or specific DIDs
  3. Carrier Group: Select your SIP trunk
  4. Source: Your Teams endpoint

For inbound calls, create an Inbound Route:

  1. DID Pattern: Your phone numbers
  2. Destination: Microsoft Teams endpoint

Step 4: Microsoft 365 Configuration

In the Teams Admin Center:

  1. Go to VoiceDirect Routing
  2. Add your dSIPRouter's FQDN as an SBC
  3. Set the SIP signaling port (default: 5061)
  4. 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:

  1. From Teams → Dial an external number
  2. From external → Call your Teams DID

Check dSIPRouter logs for any issues:
- DashboardCDR for call records
- DashboardLogs 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

Questions? Drop them in the comments below!

See you next Wednesday! 🛠️


#dSIPRouterWednesday #MicrosoftTeams #DirectRouting #VoIP #Tutorial #OpenSource