Forum Discussion
StefanFried
Mar 03, 2020Steel Contributor
PSTN Call Statistics - API
hi
i'm heavily looking for a way to retrieve PSTN data in an automatic way.
I can't find anything in terms of Graph HOWEVER i have seen a vendor which can pull this data "somehow". So i'm wondering how they can do that.
https://docs.microsoft.com/en-us/microsoftteams/teams-analytics-and-reports/pstn-usage-report
https://docs.microsoft.com/en-us/microsoftteams/teams-analytics-and-reports/pstn-minute-pools-report
thank you
13 Replies
Sort By
- lexcpcCopper Contributor
StefanFried
Not many replies here. Maybe it was too new?
I am looking at the MSGraph API in beta, but struggling to get it working. I hope there will be some full walkthrough soon.- MrDeanoBCopper Contributor
Appreciate this reply may be a little late (and may have been solved) but I've only just come across this thread.
I've been looking into this myself and have solved - or, at least, have found a way of doing this with the beta graph APIs. First, I pull the SKUs to understand how many business voice licenses exist to determine total call minutes available. I then use the API:
/communications/callRecords/getPstnCallsto look for any call type that matches and outbound call and then total the duration for each matching record. From this, you end up with total minutes available for the tenant and total minutes used. If you want an example then let me know.The getPstnCalls takes a date range so you can specify the window you want data for. From this, you could choose to run when needed. As an example, we use this data to provide our customers will daily updates on their calling credits. - Dirk GullentopsFormer Employee
- lexcpcCopper Contributor
Dirk Gullentops I've reviewed that during my research, but I couldn't get those commands to run. Permissions taps shows permission as "Not supported" in the Graph explorer. I can't tell if its failing because it's a non-prod environment or permission access.
- David BleeckerCopper Contributor
Hi Stefan - hope all is well.
Keep an eye out here for API updates: https://docs.microsoft.com/en-us/graph/api/resources/communications-api-overview?view=graph-rest-beta
The "Call Records" api hit preview last month. As more topics are added -- they'll appear under "Cloud Communications." And/or - just browse the rest of the Graph api beta area for other areas of interest.
Hope this helps.
David
- Tomasz FoltmanCopper ContributorI came here looking for this same capabilities - we have to charge back costs to projects and teams... any idea how to reach that data with Graph API?
- StefanFriedSteel ContributorVery interesting that there is no single reply so far.
Is nobody interested to analyze PSTN data in order to optimize costs?
The ad-hoc Excel export capability in the admin portal is a way but it is a manual approach which costs time and effort 😞