PSTN Call Statistics - API

%3CLINGO-SUB%20id%3D%22lingo-sub-1206918%22%20slang%3D%22en-US%22%3EPSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1206918%22%20slang%3D%22en-US%22%3E%3CP%3Ehi%3C%2FP%3E%3CP%3Ei'm%20heavily%20looking%20for%20a%20way%20to%20retrieve%20PSTN%20data%20in%20an%20automatic%20way.%3CBR%20%2F%3EI%20can't%20find%20anything%20in%20terms%20of%20Graph%20HOWEVER%20i%20have%20seen%20a%20vendor%20which%20can%20pull%20this%20data%20%22somehow%22.%20So%20i'm%20wondering%20how%20they%20can%20do%20that.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-analytics-and-reports%2Fpstn-usage-report%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-analytics-and-reports%2Fpstn-usage-report%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-analytics-and-reports%2Fpstn-minute-pools-report%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fteams-analytics-and-reports%2Fpstn-minute-pools-report%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3Ethank%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1206918%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1214217%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1214217%22%20slang%3D%22en-US%22%3EVery%20interesting%20that%20there%20is%20no%20single%20reply%20so%20far.%3CBR%20%2F%3EIs%20nobody%20interested%20to%20analyze%20PSTN%20data%20in%20order%20to%20optimize%20costs%3F%3CBR%20%2F%3EThe%20ad-hoc%20Excel%20export%20capability%20in%20the%20admin%20portal%20is%20a%20way%20but%20it%20is%20a%20manual%20approach%20which%20costs%20time%20and%20effort%20%3A(%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1246486%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1246486%22%20slang%3D%22en-US%22%3EI%20came%20here%20looking%20for%20this%20same%20capabilities%20-%20we%20have%20to%20charge%20back%20costs%20to%20projects%20and%20teams...%20any%20idea%20how%20to%20reach%20that%20data%20with%20Graph%20API%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1285888%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1285888%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44882%22%20target%3D%22_blank%22%3E%40Stefan%20Fried%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Stefan%20-%20hope%20all%20is%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKeep%20an%20eye%20out%20here%20for%20API%20updates%3A%20%26nbsp%3B%3CFONT%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fcommunications-api-overview%3Fview%3Dgraph-rest-beta%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fcommunications-api-overview%3Fview%3Dgraph-rest-beta%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20%22Call%20Records%22%20api%20hit%20preview%20last%20month.%26nbsp%3B%20As%20more%20topics%20are%20added%20--%20they'll%20appear%20under%20%22Cloud%20Communications.%22%26nbsp%3B%20And%2For%20-%20just%20browse%20the%20rest%20of%20the%20Graph%20api%20beta%20area%20for%20other%20areas%20of%20interest.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1527719%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1527719%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44882%22%20target%3D%22_blank%22%3E%40Stefan%20Fried%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3ENot%20many%20replies%20here.%20Maybe%20it%20was%20too%20new%3F%3CBR%20%2F%3EI%20am%20looking%20at%20the%20MSGraph%20API%20in%20beta%2C%20but%20struggling%20to%20get%20it%20working.%26nbsp%3B%20I%20hope%20there%20will%20be%20some%20full%20walkthrough%20soon.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1527735%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1527735%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F319477%22%20target%3D%22_blank%22%3E%40lexcpc%3C%2FA%3E%26nbsp%3BHow%20about%20this%20%3F%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fcallrecords-api-overview%3Fview%3Dgraph-rest-1.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fcallrecords-api-overview%3Fview%3Dgraph-rest-1.0%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1529081%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1529081%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F7075%22%20target%3D%22_blank%22%3E%40Dirk%20Gullentops%3C%2FA%3E%26nbsp%3BI've%20reviewed%20that%20during%20my%20research%2C%20but%20I%20couldn't%20get%20those%20commands%20to%20run.%20Permissions%20taps%20shows%20permission%20as%20%22Not%20supported%22%20in%20the%20Graph%20explorer.%20I%20can't%20tell%20if%20its%20failing%20because%20it's%20a%20non-prod%20environment%20or%20permission%20access.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1675166%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1675166%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F319477%22%20target%3D%22_blank%22%3E%40lexcpc%3C%2FA%3EHi%2C%20we%20have%20integrated%20the%20Graph%20API%20in%20our%20Analytics%20and%20Call%20Accounting%20Solution%20PHONEX%20ONE.%20Feel%20free%20if%20you%20would%20like%20any%20additional%20information%20as%20we%20are%20able%20to%20show%20nice%20Queue%20Statistics%20Dashboard%20and%20Reports%20but%20we%20you%20can%20use%20the%20tool%20also%20for%20Billing%20of%20the%20calls.%20You%20can%20reach%20us%20via%20%3CA%20href%3D%22mailto%3Asales%40evercom.be%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Esales%40evercom.be%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2076589%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2076589%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F319477%22%20target%3D%22_blank%22%3E%40lexcpc%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20this%20reply%20may%20be%20a%20little%20late%26nbsp%3B%20(and%20may%20have%20been%20solved)%20but%20I've%20only%20just%20come%20across%20this%20thread.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20been%20looking%20into%20this%20myself%20and%20have%20solved%20-%20or%2C%20at%20least%2C%20have%20found%20a%20way%20of%20doing%20this%20with%20the%20beta%20graph%20APIs.%20First%2C%20I%20pull%20the%20SKUs%20to%20understand%20how%20many%20business%20voice%20licenses%20exist%20to%20determine%20total%20call%20minutes%20available.%20I%20then%20use%20the%20API%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3E%2Fcommunications%2FcallRecords%2FgetPstnCalls%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3Eto%20look%20for%20any%20call%20type%20that%20matches%20and%20outbound%20call%20and%20then%20total%20the%20duration%20for%20each%20matching%20record.%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EFrom%20this%2C%20you%20end%20up%20with%20total%20minutes%20available%20for%20the%20tenant%20and%20total%20minutes%20used.%20If%20you%20want%20an%20example%20then%20let%20me%20know.%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThe%26nbsp%3BgetPstnCalls%20takes%20a%20date%20range%20so%20you%20can%20specify%20the%20window%20you%20want%20data%20for.%20From%20this%2C%20you%20could%20choose%20to%20run%20when%20needed.%20As%20an%20example%2C%20we%20use%20this%20data%20to%20provide%20our%20customers%20will%20daily%20updates%20on%20their%20calling%20credits.%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2109877%22%20slang%3D%22en-US%22%3ERe%3A%20PSTN%20Call%20Statistics%20-%20API%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2109877%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F935232%22%20target%3D%22_blank%22%3E%40MrDeanoB%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20it%20wont%20be%20too%20much%20trouble%2C%20i%20would%20like%20to%20know%20how%20you%20achieved%20this%20walkaround.%20I'm%20trying%20to%20do%20the%20same%20thing%20on%20my%20end%20but%20it%20amounts%20to%20no%20success%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

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

 

9 Replies
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 :(

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?

@Stefan Fried 

 

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-bet...

 

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 

 

 

 

 

@Stefan Fried 
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.

@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.

@lexcpcHi, we have integrated the Graph API in our Analytics and Call Accounting Solution PHONEX ONE. Feel free if you would like any additional information as we are able to show nice Queue Statistics Dashboard and Reports but we you can use the tool also for Billing of the calls. You can reach us via sales@evercom.be

@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.

@MrDeanoB 

If it wont be too much trouble, i would like to know how you achieved this walkaround. I'm trying to do the same thing on my end but it amounts to no success