Microsoft Teams PSTN usage report
The Teams PSTN (Public Switched Telephone Network) and SMS usage report in the Microsoft Teams admin center gives you an overview of calling and audio conferencing activity in your organization. You can view detailed calling activity for Calling Plans if you use Microsoft as your telephony carrier and for Direct Routing if you use your own telephony carrier.
The Calling Plans tab shows information including the number of minutes that users spent in inbound and outbound PSTN calls and the cost of these calls. The Direct Routing tab shows you information including the SIP address and call start and end times. Use the information in this report to gain insight into PSTN usage in your organization and help you to investigate, plan, and make business decisions.
Note
If you have a Telstra or Softbank calling plan, you will not see any call detail records in the PSTN usage report. Please contact Telstra or Softbank for your reporting needs.
View the PSTN usage report
- In the left navigation of the Microsoft Teams admin center, click Analytics & reports > Usage reports. On the View reports tab, under Report, select PSTN and SMS (preview) usage.
- Under Date range, select a predefined range of 7 or 28 days, or set a custom range, and then select Run report.
Interpret the report
Calling Plans
Callout | Description |
---|---|
1 | The report can be viewed for trends over the last 7 days, 28 days, or a custom date range that you set. |
2 | Each report has a date for when it was generated. The reports usually reflect a 24 to 48 hour latency from time of activity. |
3 | The X axis is the selected date range for the specific report. The Y axis is the total number of calls over the selected time period. Hover over the dot on a given date to see the total calls on that date. |
4 | The table gives you a breakdown of PSTN usage per call.
|
5 | Select Edit columns to add or remove columns in the table. |
6 | Select Filter to filter the report by username or call type. |
7 | Select Full screen to view the report in full screen mode. |
8 | You can export the report to a CSV file for offline analysis. Click Export to Excel, and then on the Downloads tab, click Download to download the report when it's ready. |
Direct Routing
Callout | Description |
---|---|
1 | The report can be viewed for trends over the last 7 days or 28 days. |
2 | Each report has a date for when it was generated. The reports usually reflect a 24 to 48 hour latency from time of activity. |
3 | The X axis is the selected date range for the specific report. The Y axis is the total number of calls over the selected time period. Hover over the dot on a given date to see the total calls on that date. |
4 | The table gives you a breakdown of PSTN usage per call.
|
5 | Select Edit columns to add or remove columns in the table. |
6 | Select Full screen to view the report in full screen mode. |
7 | Select Export to Excel to download the data in a comma separated file (CSV) for offline analysis or to use it as input for your billing system. |
Caller/Callee fields considerations
Depending on the call direction, the Caller or Callee names can contain non-E164 numbers.
These fields can come from the customer SBC(s). There are three formats that the SBC can send to Direct Routing: E.164 numbers, non-E.164 numbers, and strings.
- E.164 phone number from a user who has an E.164 number to a user who also has an E.164 number.
- Call from a non-E.164 number. A user from a third-party PBX interconnected with Direct Routing makes a call to a Teams user. In this case, the caller number might be any non-E.164 number, for example +1001.
- A spammer calls and doesn't present a number, only a name, for example "Internal Revenue Service". This string will be shown in the reports.
Phone number obfuscation
Per-country/region privacy requirements include the obfuscation of the external (not owned by the customer) phone numbers. The three or four last digits of the phone number are replaced with asterisks (+123 456789***).
For incoming calls, the caller number is obfuscated, for outgoing calls, the callee number is obfuscated. Note that these rules apply to the PSTN and Direct Routing reports in Tenant Admin Center, data export, and the PSTN call logs available via Microsoft Graph. Phone number obfuscation rules in other reports, such as Call Analytics and Call Quality Dashboard, may differ.
The obfuscation is based on the organization's location (country/region). Full phone numbers are shown for the countries/regions that are not listed in the following table:
Country/Region | Number of obfuscation digits |
---|---|
BE – Belgium | 3 |
CH – Switzerland | 4 |
DE – Germany | 3 |
DK – Denmark | 3 |
ES – Spain | 3 |
FI – Finland | 3 |
FR – France | 4 |
IT – Italy | 3 |
NL – Netherlands | 3 |
NO – Norway | 3 |
SE – Sweden | 3 |
About Shared Correlation ID
The Shared Correlation ID only exists in the exported Excel file that you download and indicates that two or more calls are related. The following explains the different scenarios, and when Shared Correlation ID is present.
- PSTN User 1 on a PSTN endpoint called Teams User 1 on Teams client, call type Dr_In, correlation ID 57f28917-42k5-4c0c-9433-79734873f2ac, no shared correlation ID.
- Teams User 1 on Teams client called PSTN User 1 on a PSTN endpoint, call type Dr_Out 2c12b8ca-62eb-4c48-b68d-e451f518ff4, no shared correlation ID.
- PSTN User 1 on a PSTN endpoint called a Teams User 2 on Teams client, call type Dr_In f45e9a25-9f94-46e7-a457-84f5940efde9, shared correlation ID f45e9a25-9f94-46e7-a457-84f5940efde9.
- Existing call 3 with correlation ID "f45e9a25-9f94-46e7-a457-84f5940efde9". PSTN User 1 in a call with Teams User 2. Teams User 2 transferred (blind or consultative) a call to Teams or PSTN User, call type Dr_Out_User_Transfer 45a1da7c-9e97-481a-8a05-3fe19a9a77e0, shared correlation ID f45e9a25-9f94-46e7-a457-84f5940efde9.
Data retention
Per-country regulatory requirements specify data retention of detailed call records. Per-country retention period in days is listed in the following table:
Country | PSTN Calling Plans | Direct Routing |
---|---|---|
CA – Canada | 150 | 150 |
CH – Switzerland | 365 | 365 |
DK – Denmark | 365 | 365 |
FI – Finland | 365 | 365 |
FR – France | 365 | 365 |
IT – Italy | 730 | 730 |
KR – South Korea | 365 | 365 |
MX – Mexico | 720 | 730 |
NL – Netherlands | 180 | 180 |
NO – Norway | 150 | 150 |
SE – Sweden | 180 | 180 |
GB – Great Britain | 450 | 450 |
All other countries | 365 | 150 |
Note that these rules apply to the PSTN and Direct Routing reports in Tenant Admin Center, data export, and the PSTN and Direct Routing call logs available via Microsoft Graph. Data retention in other reports, such as Call Analytics and Call Quality Dashboard, may differ.
The retention period is based on the user's location (country). If the tenant administrator does not set a user's location, the default value for the location of a user is the location of the tenant.
Exporting the reports
Click Export to Excel, and then on the Downloads tab, click Download to download the report when it's ready. Export process can take from a few seconds to several minutes to complete, depending on the quantity of the data.
This exports data of all users and enables you to do simple sorting and filtering for further analysis. Exported files contain additional fields that are not available in the online report. These can be used for troubleshooting and automated workflows.
You'll receive a zip file named "Calls.Export.[identifier]
.zip", with the identifier being a unique ID for the export that can be used for troubleshooting.
If you have both Calling Plans and Direct Routing, the exported file may contain data for both products. PSTN usage report file will have filename "PSTN.calls.[UTC date]
.csv" and Direct Routing "DirectRouting.calls.[UTC date]
.csv".
In addition to PSTN and Direct Routing files, the archive contains file "parameters.json", with the selected export time range and capabilities.
Exported files are in Comma Separated Values (CSV) format, compliant with RFC 4180 standard. The files can be opened in Excel or any other standards-compliant editor without requiring any transformations.
The first row of the CSV contains column names. All dates are UTC and in ISO 8601 format.
Exported PSTN usage report
You can export data up to one year from the current date unless country/region-specific regulations prohibit retention of the data for 12 months.
# | Name | Data type (SQL Server) | Description |
---|---|---|---|
0 | UsageId | uniqueidentifier |
Unique call identifier |
1 | Call ID | nvarchar(64) |
Call identifier. Not guaranteed to be unique |
2 | Conference ID | nvarchar(64) |
ID of the audio conference |
3 | User Location | nvarchar(2) |
Country code of the user, ISO 3166-1 alpha-2 |
4 | Microsoft Entra ObjectId | uniqueidentifier |
Calling user's ID in Microsoft Entra ID. This and other user info will be null/empty for bot call types (ucap_in, ucap_out) |
5 | UPN | nvarchar(128) |
UserPrincipalName (sign-in name) in Microsoft Entra ID. This is usually the same as user's SIP Address, and can be same as user's e-mail address |
6 | User Display Name | nvarchar(128) |
Display name of the user |
7 | Caller ID | nvarchar(128) |
Number that received the call for inbound calls or the number dialed for outbound calls. E.164 format |
8 | Call Type | nvarchar(32) |
Whether the call was a PSTN outbound or inbound call and the type of call such as a call placed by a user or an audio conference |
9 | Call Direction | nvarchar(32) |
Whether the call was a PSTN outbound or inbound call |
10 | Number Type | nvarchar(16) |
User's phone number type, such as a service of toll-free number |
11 | Domestic/International | nvarchar(16) |
Whether the call was domestic (within a country or region) or international (outside a country or region) based on the user's location |
12 | Destination Dialed | nvarchar(64) |
Country or region dialed |
13 | Destination Number | nvarchar(32) |
Number dialed in E.164 format |
14 | External Country | nvarchar(16) |
Two digits country code dialed |
15 | Start Time | datetimeoffset |
Call start time |
16 | End Time | datetimeoffset |
Call end time |
17 | Duration Seconds | int |
How long the call was connected |
18 | Connection Fee | numeric(16, 2) |
Connection fee price |
19 | Charge | numeric(16, 2) |
Amount of money or cost of the call that is charged to your account |
20 | Currency | nvarchar(3) |
Type of currency used to calculate the cost of the call (ISO 4217) |
21 | Capability | nvarchar(32) |
The license used for the call |
22 | Operator | nvarchar(32) |
Microsoft |
23 | Source of Call Duration | nvarchar(32) |
Microsoft |
24 | Administrative Units | uniqueidentifier |
Collection of administrative units associated to a call. |
Exported Direct Routing usage report
You can export data up to five months (150 days) from the current date unless country/region-specific regulations prohibit retention of the data for that period.
# | Name | Data type (SQL Server) | Description |
---|---|---|---|
0 | CorrelationId | uniqueidentifier |
Call identifier. Multiple legs of the same call can share the same CorrelationId |
1 | Microsoft Entra ObjectId | uniqueidentifier |
Calling user's ID in Microsoft Entra ID. This and other user info can be null/empty for bot call types |
2 | UPN | nvarchar(128) |
UserPrincipalName (sign-in name, Microsoft Entra ID) of the user or bot that made or received the call. This is usually the same as user's SIP Address, and can be same as user's e-mail address |
3 | Display Name | nvarchar(128) |
The name of a user or a calling bot (for example, Call Queue or Auto Attendant) as set in Microsoft 365 admin center |
4 | User country | nvarchar(2) |
Country code of the user, ISO 3166-1 alpha-2 |
5 | Invite time | datetimeoffset |
When the initial Invite send on outbound from Teams user or bot call to the SBC, or received on inbound to Teams or bot call by the SIP Proxy component of Direct Routing from the SBC |
6 | Start time | datetimeoffset |
Time when the SIP proxy received the final answer (SIP Message "200 OK") from the SBC on outbound (Teams/Bot to a PSTN User), or after the SIP Proxy send the Invite to the next hop within Teams backend on inbound call (PSTN User to a Teams/Bot). For failed and unanswered calls, this can be equal to invite or failure time |
7 | Failure time | datetimeoffset |
Only exists for failed (not fully established) calls |
8 | End time | datetimeoffset |
Only exists for successful (fully established) calls. Time when call ended |
9 | Duration (seconds) | int |
Duration of the call, from invite to the call end or failure. For call forwarding, duration includes ringing in the Call Queue. |
10 | Success | nvarchar(3) |
Yes/No. Success or attempt |
11 | Caller Number | nvarchar(32) |
Number of the user or bot who made the call. On inbound to a Team user call it will be a PSTN User, on outbound from Teams user call it will be the Teams user number |
12 | Callee Number | nvarchar(32) |
Number of the user or bot who received the call. On inbound to a Team user call it will be the Teams user, on outbound from Teams user call it will be the PSTN User |
13 | Call type | nvarchar(32) |
Call type and direction |
14 | Call Direction | nvarchar(32) |
Whether the call was a PSTN outbound or inbound call |
15 | Azure region for Media | nvarchar(8) |
The datacenter used for media path in non-bypass call |
16 | Azure region for Signaling | nvarchar(8) |
The datacenter used for signaling for both bypass and non-bypass calls |
17 | Final SIP code | int |
The code with which the call ended, RFC 3261 |
18 | Final Microsoft subcode | int |
In addition to the SIP codes, Microsoft has own subcodes that indicate the specific issue |
19 | Final SIP Phrase | nvarchar(256) |
Description of the SIP code and Microsoft subcode |
20 | SBC FQDN | nvarchar(64) |
Fully qualified domain name of the session border controller |
21 | Media bypass | nvarchar(3) |
Yes/No. Indicates if the trunk was enabled for media bypass or not |
22 | Shared correlation ID | uniqueidentifier |
Indicates that two or more calls are related |
23 | Administrative Units | uniqueidentifier |
Collection of administrative units associated to a call. |
24 | Transfer or Correlation ID | uniqueidentifier |
Indicates CorrelationId from call between Transferee and Transferor |