callRecord: getDirectRoutingCalls
Namespace: microsoft.graph.callRecords
Get a log of direct routing calls as a collection of directRoutingLogRow entries.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type | Permissions (from least to most privileged) |
---|---|
Delegated (work or school account) | Not supported. |
Delegated (personal Microsoft account) | Not supported. |
Application | CallRecord-PstnCalls.Read.All, CallRecords.Read.All |
HTTP request
GET /communications/callRecords/getDirectRoutingCalls
Request headers
Name | Description |
---|---|
Authorization | Bearer {token}. Required. |
Function parameters
In the request URL, provide the following query parameters with values. The following table shows the parameters that can be used with this function.
Parameter | Type | Description |
---|---|---|
fromDateTime | DateTimeOffset | Start of time range to query. UTC, inclusive. Time range is based on the call start time. |
toDateTime | DateTimeOffset | End of time range to query. UTC, exclusive. |
Response
If successful, this function returns a 200 OK
response code and a collection of directRoutingLogRow entries in the response body.
If there are more than 1000 entries in the date range, the body also includes an @odata.NextLink
with a URL to query the next page of call entries. The last page in the date range does not have @odata.NextLink
. For more information, see paging Microsoft Graph data in your app.
Example
The following example shows getting a collection of records for direct routing calls that occurred in the specified date range. The response includes "@odata.count": 1000
to enumerate the number of records in this first response, and @odata.NextLink
to get records beyond the first 1000. For readability, the response shows only a collection of 1 record. Please assume there are more than 1000 calls in that date range.
Request
GET https://graph.microsoft.com/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=2019-11-01,toDateTime=2019-12-01)
Response
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.callRecords.directRoutingLogRow)",
"@odata.count": 1000,
"value": [{
"id": "9e8bba57-dc14-533a-a7dd-f0da6575eed1",
"correlationId": "c98e1515-a937-4b81-b8a8-3992afde64e0",
"userId": "db03c14b-06eb-4189-939b-7cbf3a20ba27",
"userPrincipalName": "richard.malk@contoso.com",
"userDisplayName": "Richard Malk",
"startDateTime": "2019-11-01T00:00:25.105Z",
"inviteDateTime": "2019-11-01T00:00:21.949Z",
"failureDateTime": "0001-01-01T00:00:00Z",
"endDateTime": "2019-11-01T00:00:30.105Z",
"duration": 5,
"callType": "ByotIn",
"successfulCall": true,
"callerNumber": "+12345678***",
"calleeNumber": "+01234567***",
"mediaPathLocation": "USWE",
"signalingLocation": "EUNO",
"finalSipCode": 0,
"callEndSubReason": 540000,
"finalSipCodePhrase": "BYE",
"trunkFullyQualifiedDomainName": "tll-audiocodes01.adatum.biz",
"mediaBypassEnabled": false
}],
"@odata.nextLink": "https://graph.microsoft.com/v1.0/communications/callRecords/getDirectRoutingCalls(fromDateTime=2019-11-01,toDateTime=2019-12-01)?$skip=1000"
}
See also
- Microsoft Teams direct routing usage report in the Microsoft Teams admin center.
- Health Dashboard for direct routing in the Microsoft Teams admin center.
- PSTN call report in Microsoft Graph.
Feedback
Submit and view feedback for