Internal tool · unified communications managed service · 2026

Teams Phone trunk sizing from real call data

A PowerShell tool that turns Teams Admin Center PSTN usage exports into a single HTML report showing how many channels each trunk actually needs.

  • Microsoft 365 & Teams
  • Telephony & contact centre
  • Code & DevOps
PSTN types covered (Direct Routing, Operator Connect, Calling Plan)
3
self-contained HTML file per customer
1
PowerShell versions supported (5.1 and 7)
2
Architecture

How it fits together

  1. 01

    Export

    • Teams Admin Center PSTN usage
  2. 02

    Rebuild

    • Per-second concurrency per trunk
  3. 03

    Size

    • Peak and P95
    • Erlang B
  4. 04

    Report

    • HTML report (Chart.js)
Outcome

Channel sizing based on measured concurrency instead of a headcount guess, in a report the support team runs themselves.

The problem

“How many channels do we need?” comes up at every carrier renewal, and the usual answer is a guess. Teams records every PSTN call, but the admin centre shows call lists, not how many calls were up at once, which is what a trunk is sized on.

What I did

  • Wrote a script that reads the raw admin centre exports and rebuilds second-by-second concurrency for each trunk.
  • Handled how channels are actually sold: one pool across a carrier’s SBCs, a limit per SBC, or a limit per operator.
  • Reported peak and P95 use, an Erlang B recommendation, time over the purchased limit, and rejected calls with the load at the moment each happened. That last part separates a capacity problem from a network one.
  • Produced one HTML file that can be emailed straight to a customer, and a guide so the team can run it without me.

Result

The team can now answer the sizing question from the customer’s own call data.