Launching the Numer w Teams
- Adding a New Domain to the Microsoft 365 Admin Center
- Creating a user for integration with the telephony network
- Teams Voice Services Configuration
- Assigning Phone Numbers to User Accounts
Adding a New Domain to the Microsoft 365 Admin Center
T-Mobile has assigned your company a domain in the following format. You can find your individual number in the Order section of your contract:
This domain will be used for voice communication in MS Teams. You need to add this domain to the Admin Center panel of your organization on the Microsoft 365 portal.
1. Once you have logged in, go to: Settings > Domains > Add domain. Enter the domain assigned to your company by T-Mobile and click Use this domain.
2. Verify the domain, by selecting: Add a TXT record to the domain's DNS records.
Click Continue to generate a TXT record to verify domain ownership.
3. The DNS record information will be displayed.
Make sure to leave the Microsoft Admin Panel open in your browser and email the following address: uc@t-mobile.pl. For the subject line, use "Autoryzacja domeny". In the body of the email, type the value of the TXT record, for example, "MS=ms74966152".
Once you receive a confirmation message from T-Mobile that the record has been created on the DNS servers, you can move on to the next step.
4. Now, return to the Microsoft Admin Panel page and verify the domain by clicking the Verify button.
If the following message appears after verification, wait about 10 minutes and try again. If the verification fails again, wait an hour and try again.
5. After verifying the TXT record, you will be asked "How do you want to connect your domain?". Select More options.
6. Then, select Skip and do this later (not recommended) and then click Continue.
7. When the domain setup is complete, click Done.
8. Once the domain setup is complete, go to Settings > Domains. The correct value in the Status column is "No service selected". This means that the domain has been configured correctly.
Now you can proceed to the next instruction.
Creating a user for integration with the telephony network
To integrate a tenant with the T-Mobile network, you need to create a user and assign them a license with the Teams Phone add-on. After the integration work is complete, this user can be deleted. This will allow you to recover the license.
2. Select Add a user.
3. Fill in the user's information and select the password settings. Enter the domain that was assigned to your company by T-Mobile, for example: T10012345.teams.t-mobile.pl.
4. Assign the user a license that includes Microsoft Teams. For example:
- Microsoft 365 E5,
- M365 Business Basic,
- M365 Business Standard.
5. Follow the next steps until the user creation is complete.
Once you have finished adding the user, you can proceed to the next instruction.
Teams Voice Services Configuration
The configuration will be performed in Windows PowerShell.
You should have the .NET Framework add-on version 4.7.2 or later installed on your computer. If you don't have it, click the following link and install it: https://docs.microsoft.com/en-us/dotnet/framework/install/
Starting PowerShell
Checking the version of PowerShell
To make sure that you will be able to execute the commands described in the following sections, check the version of the PowerShell. Open PowerShell and enter the following command:
$PSVersionTable.PSVersion
The PowerShell application should have version 5.1 (Major: 5, Minor: 1) or higher. If it is lower, update PowerShell according to the instructions on the following page:
If the version information does not appear after issuing the $PSVersionTable.PSVersion command, use the following command:
$host.Version.
Installing required modules
Install the required modules to properly configure the service. Individually copy the following commands highlighted in blue, paste them into PowerShell and execute by pressing Enter.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Register-PSRepository -Default
Install-Module -Name PowerShellGet -Force -AllowClobber
Install-Module -Name MicrosoftTeams -Force -AllowClobber
Update-Module MicrosoftTeams
Set-ExecutionPolicy RemoteSigned
Import-Module -Name MicrosoftTeams
Set-ExecutionPolicy Restricted
Logging in to the tenant in the MS Teams organization
Copy the following command, paste it into the PowerShell and execute by pressing Enter.
Connect-MicrosoftTeams
Log in with a user account with administrator privileges in the tenant. The account with administrator privileges is the one used to create the new domain in the Adding a New Domain to the Microsoft 365 Administration Center instructions.
Configuring routing for phone calls
Individually copy the following commands highlighted in blue, paste them into PowerShell and execute by pressing Enter.
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="TMobileRouting"}
Set-CsOnlineVoiceRoutingPolicy -Identity Global -OnlinePSTNUsages "TMobileRouting"
In the last command, the domain T10012345.teams.t-mobile.pl should be replaced with the one that was assigned by T-Mobile.
New-CsOnlineVoiceRoute -Identity "TMobileRouting“ -NumberPattern ".*" -OnlinePstnGatewayList T10012345.teams.t-mobile.pl -Priority 1 -OnlinePstnUsages "TMobileRouting"
Do not close PowerShell it will be needed in the next instruction.
After successfully executing this command, you can proceed to the next instruction.
Assigning Phone Numbers to User Accounts
The final step in configuring Numer w Teams service is connecting users to the phone numbers provided by T-Mobile. Assigning numbers to a specific user or multiple users is done using commands executed in PowerShell.
Single User Configuration
Run the following command, changing uzytkownik@domenafirmowa.pl to the username of the user who should be assigned the phone number provided by T-Mobile, which you should insert in place of +48000000000.
Set-CsPhoneNumberAssignment -Identity uzytkownik@domenafirmowa.pl -PhoneNumber +48000000000 -PhoneNumberType DirectRouting
Multiple Users Configuration
To configure multiple users at once , prepare a CSV file (comma-separated value text file) containing the user names and phone numbers you want to assign to them. The file should be created according to the format below.
Email,Phone
uzytkownika@domenafirmowa.pl,+48000000000
uzytkownika@domenafirmowa.pl,+48000000000
uzytkownika@domenafirmowa.pl,+48000000000
Replace uzytkownik@domenafirmowa.pl with the actual usernames of the users you want to assign phone numbers to. Replace +48000000000 with the corresponding T-Mobile phone numbers. Add more rows to the file following the same format for each additional user you want to configure.
Finished file should look like this:
Before saving the file, make sure that the phone numbers have the correct format. The number should start with a "+" sign followed by 11 digits, starting with 48. An example number is: +48123456789.
Save the file with the name Voice.CSV (Voice is the filename and CSV is the file extension).
Next, open the file location, right-click on the file, select Properties and copy the file location.
In the following command, replace C:\Users\<file path> with the value you copied earlier. Then, execute it in PowerShell.
$teams = Import-Csv C:\Users\<file path>\Voice.csv
foreach ($team in $teams)
{
Set-CsPhoneNumberAssignment -Identity $team.email -PhoneNumber $team.phone -PhoneNumberType DirectRouting
}
Once the configuration is complete, it is possible to make phone calls in the MS Teams application. To do this, log into the account of a user to whom you have assigned a phone number and who has a license with the Teams Phone add-on.