Integrating with Microsoft Teams: Difference between revisions

From MiRTA PBX documentation
Jump to navigation Jump to search
Created page with "The integration with MS Teams is experimental. On the Microsoft side: Configure Microsoft Teams for DirectRouting 1. Microsoft 365 admin center → Settings → Domains → Add domain (as example sbc.v-pbx.site) 800px 2. Select method, I used verify by add TXT record in DNS 800px 3. Receive data for verification 800px 4. Add TXT record with data from MS File:M..."
 
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
The integration with MS Teams is experimental.  
The integration with MS Teams is experimental.  


On the Microsoft side:
First step, [[Microsoft Teams configuration]]


Configure Microsoft Teams for DirectRouting
Second step, [[OpenSips configuration]]


1. Microsoft 365 admin center → Settings → Domains → Add domain (as example sbc.v-pbx.site)
Third step, [[Asterisk teams configuration]]


[[File:MS Teams - Integrazione 1.png|800px]]
Fourth step, [[MiRTA PBX teams configuration]]


2. Select method, I used verify by add TXT record in DNS
Fifth step, [[MiRTA PBX teams extension configuration]]


[[File:MS Teams - Integrazione 2.png|800px]]
== Debugging ==


3. Receive data for verification
Check to see if OpenSIPS is listening to port 5091


[[File:Msteams3.png|800px]]
netstat -nap | grep 5091


4. Add TXT record with data from MS
Check to see if OpenSIPS has made the connection to Teams


[[File:Msteams4.png|800px]]
== Further integration ==


5. If you use domain only voice call, uncheck “Exchange and Exchange Online Protection” and complete verification
One of the problem with the MS Teams integration is the lack of presence indication. Receiving extension status update from MS Teams is complex and it is currently not possible, BUT, it is possible to check for the Teams extension status BEFORE dialing any Teams extension. This will avoid receiving a MiRTA PBX call while on a call over Teams.


[[File:Msteams5.png|800px]]
In Admin/Settings, fill the Client ID and Client Secret


6. Add user with created domain. Users -> Active users -> Add a user
In Admin/Tenant, fill the Tenant ID


[[File:Msteams6.png|800px]]
In Configuration/Extension, fill the Teams Extension ID


7. Select necessary licenses Phone Standart + (Buisness Basic or if you have E3)
Now in Status/Peers you'll see the MIRTA PBX state for each of the Custom Extension and also the Teams extension
 
[[File:Msteams7.png|800px]]
 
8. Now you need go to “Microsoft Teams admin center” Voice -> Direct Routing
 
[[File:Msteams8.png|800px]]
 
9. At the top right of the page, select “Manage PSTN usage records” and add “sbc”
 
[[File:Msteams9.png|800px]]
 
10. Next  Voice -> Direct Routing ->SBCs -> Add
 
[[File:Msteams10.png|800px]]
 
make sure you have selected “Enabled” and “Send SIP options”
 
11. You will see that the domain has been added but is inactive.
 
[[File:Msteams11.png|800px]]
 
12. Next  Voice -> Direct Routing -> Voice routes -> Add
 
[[File:Msteams12.png|800px]]
 
Add regular expression to “Dialed number pattern”  ^(\+[0-9]{7,15})$. Add SBC and Add PSTN that we created
 
13. Next Voice -> Voice routing policies->Add
 
[[File:Msteams13.png|800px]]
 
Create new Policy and add our PSTN
 
14. Users -> Manage users and edit our user
 
[[File:Msteams14.png|800px]]
 
15. Policies->Voice routing policy-> Edit
 
[[File:Msteams15.png|800px]]
 
Select created “my rp”
 
16. Account -> General information -> Edit
 
[[File:Msteams16.png|800px]]
 
17. Assign phone number -> Phone number type=Direct routing -> Assigned phone number = your number
 
[[File:Msteams17.png|800px]]
 
[[File:Msteams17b.png|800px]]
 
Congratulations, the MS Teams configuration is complete! Once we configure Asterisk as the SBC, it will go into an active mode. Users will then be able to make and receive calls.

Latest revision as of 16:08, 8 December 2025

The integration with MS Teams is experimental.

First step, Microsoft Teams configuration

Second step, OpenSips configuration

Third step, Asterisk teams configuration

Fourth step, MiRTA PBX teams configuration

Fifth step, MiRTA PBX teams extension configuration

Debugging

Check to see if OpenSIPS is listening to port 5091

netstat -nap | grep 5091

Check to see if OpenSIPS has made the connection to Teams

Further integration

One of the problem with the MS Teams integration is the lack of presence indication. Receiving extension status update from MS Teams is complex and it is currently not possible, BUT, it is possible to check for the Teams extension status BEFORE dialing any Teams extension. This will avoid receiving a MiRTA PBX call while on a call over Teams.

In Admin/Settings, fill the Client ID and Client Secret

In Admin/Tenant, fill the Tenant ID

In Configuration/Extension, fill the Teams Extension ID

Now in Status/Peers you'll see the MIRTA PBX state for each of the Custom Extension and also the Teams extension