Forum Discussion

StefanFried's avatar
StefanFried
Steel Contributor
Mar 03, 2020

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

  • lexcpc's avatar
    lexcpc
    Copper 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.

    • MrDeanoB's avatar
      MrDeanoB
      Copper Contributor

      lexcpc

       

      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/getPstnCalls
       
      to 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.
      • lexcpc's avatar
        lexcpc
        Copper 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.

  • Tomasz Foltman's avatar
    Tomasz Foltman
    Copper Contributor
    I 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?
  • StefanFried's avatar
    StefanFried
    Steel Contributor
    Very 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 😞

Resources