EasyUC for Microsoft Teams
Set up the trunk and voice routes in Teams
Create and synchronise PSTN gateway, voice route and policy in the Teams tenant from within EasyUC.
In EasyUC: EasyUC Teams → Teams → Teams Tenants → tenant → Settings → Set up the trunk in Teams
What it is for
For Teams to send calls to the EasyUC SBC, the Teams tenant needs four objects: a PSTN gateway with the hostname and port of the SBC, a PSTN usage, a voice route with a number pattern and a voice routing policy. EasyUC creates these objects itself through Teams PowerShell and keeps them up to date.
EasyUC builds the number pattern of the voice route from the numbers of the scripts for which Reachable via MS Teams is switched on with this tenant. Teams therefore sends only calls to these script numbers over the trunk. The SBC rejects every other number. Without a script number EasyUC does not create a voice route.
EasyUC changes only its own objects. By default they are named EasyUC- followed by the first label of the SBC hostname. The gateway is explicitly created as enabled, with SIP OPTIONS, without media bypass and with History-Info and P-Asserted-Identity forwarding. EasyUC does not assign the policy to individual users here.
Prerequisites
- Licence module
teams. Without this module the EasyUC Teams workspace does not appear. - Role EasyUC Teams (
ROLE_APP_TEAMS_WORKSPACE) with the sub-permissions TENANTS (ROLE_APP_TEAMS_TENANTS) to read and TENANTS bearbeiten (ROLE_APP_TEAMS_TENANTS_EDIT) to change. - The tenant’s certificate is issued, the SBC service is running, the firewall is open.
- The domain of the SBC hostname is verified in the Microsoft 365 tenant.
- EasyUC is signed in to Teams PowerShell or an app registration is stored (chapter “Graph access and Teams admin sign-in”).
- At least one script is reachable through this tenant and has a number (chapter “Make a script reachable via Microsoft Teams”). Otherwise only the gateway is created, without a voice route.
- The Teams users who are to call the script numbers have a Teams Phone licence and Enterprise Voice.
Step by step: Set up the trunk for the first time
Step by step: Assign the voice routing policy to users
Step by step: Synchronise voice routes after a change
Step by step: Set up the trunk by hand or remove it again
Fields and options
| Field / action | Meaning and use |
|---|---|
| Set up in Microsoft | Configuration state in Microsoft: not checked yet, not yet, yes or exists, but does not match these settings. After it: hostname, port, enabled/disabled and sends SIP OPTIONS/no SIP OPTIONS. |
| Reached from Microsoft | Measured at your own SBC: whether Microsoft answers the SBC’s OPTIONS and when OPTIONS last arrived from Microsoft. Microsoft does not expose this state through any interface. |
| Routes in Teams | State of the last synchronisation: Up to date, Outdated or Never synchronised, with a timestamp. |
| Synchronise now | Rebuilds the voice routes from the current script numbers. Changes only EasyUC’s voice route, PSTN usage and policy. |
| Enable for all users (global policy) | Attaches this trunk’s PSTN usage to the Global policy. This changes the default policy of all users with Enterprise Voice in this tenant. Applies to Update routes only. Not recommended with scripts that use Operator Connect through Teams forwarding. |
| Show what would happen | Read-only preview with the numbers covered, the steps and notes. Reports “Nothing to do: the trunk in Microsoft already matches these settings.” when everything matches. |
| Set up the trunk now / Update routes | Runs the steps of the preview. The label changes as soon as the gateway exists in Microsoft. |
| Remove the trunk | Removes EasyUC’s gateway, voice route, PSTN usage and policy from the Teams tenant. |
| Set it up by hand instead | Expands the guide for setting up without the PowerShell service. |
| These commands ran | List of the executed commands as readable lines, for documentation. |
Check the result and narrow down errors
- Success: Set up in Microsoft shows yes, Reached from Microsoft shows “Microsoft answers our OPTIONS”, Routes in Teams shows Up to date, and the tenant list shows the trunk as active.
- Microsoft sends OPTIONS only after the SBC’s OPTIONS have arrived. If the trunk is still down or unknown after a few minutes, check certificate, hostname, TLS port and firewall.
- „Microsoft kennt die Domain dieses SBC-Namens in diesem Tenant nicht. …“ Add the domain in the Microsoft 365 admin center under Settings → Domains and verify it with a TXT record. For a name with two subdomain levels, exactly the domain after the first label must be registered.
- „Die Anmeldung steht, aber dem Konto fehlen die Rechte. Der App-Registrierung muss die Verzeichnisrolle „Teams-Administrator“ zugewiesen sein.“ Assign the role in Microsoft Entra.
- „Dem Tenant fehlt eine Voraussetzung an Lizenzen. Für Direct Routing brauchen die Benutzer eine Teams-Phone-Lizenz und Enterprise Voice.“ Check the licences in the tenant.
- „Erst mit einem Teams-Administrator anmelden oder unter Microsoft Graph eine App-Registrierung hinterlegen, dann meldet sich EasyUC selbst an.“ The buttons are locked until a sign-in exists.
- „Die Antwort des Abgleichs kam nicht rechtzeitig zurück. Er kann dennoch durchgelaufen sein; der Stand oben wird gleich nachgezogen.“ Wait and reload the page before synchronising again.
- “The gateway sends no History-Info (ForwardCallHistory off). Operator Connect through Teams forwarding needs it.” Affects only scripts with Teams forwarding. Click Update routes so that EasyUC aligns the gateway with its settings.
- A call to the script number fails although everything is green: check whether the EasyUC policy is assigned to the calling user, and wait for Teams to apply it.