แก้ไข

แชร์ผ่าน


Queries for the ACSCallSummaryUpdates table

For information on using these queries in the Azure portal, see Log Analytics tutorial. For the REST API, see Query.

Participants per call

Calculates the average number of participants per call.

ACSCallSummaryUpdates
// Get the distinct participants in a call
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId, EndpointId
// Count the participants and distinct calls
| summarize num_participants=count(), num_calls=dcount(CorrelationId)
// Calculate the average number of distinct participants per call
| extend avg_participants = toreal(num_participants) / toreal(num_calls)
| project num_participants, num_calls, avg_participants

Participant Phone Numbers

Lists the phone numbers of the participants in the call. (Phone numbers come from ACSBillingUsage table).

ACSCallSummaryUpdates
// Get the calls with CallType as Group
| where CallType == 'Group'
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId, ParticipantStartTime, ParticipantDuration, EndpointType, CallType, CallStartTime, PstnParticipantCallType
| project CorrelationId, ParticipantId, ParticipantStartTime, ParticipantDuration, EndpointType, CallType, CallStartTime, PstnParticipantCallType
// Join with ACSBillingUsage data on ParticipantId
| join kind=leftouter (ACSBillingUsage
                        | where isnotempty(ParticipantId)
                        | project ParticipantId, UserIdA, UserIdB, StartTime, Quantity)
    on ParticipantId
// Combine with calls of CallType P2P
| union (ACSCallSummaryUpdates
| where CallType == 'P2P'
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId, ParticipantStartTime, ParticipantDuration, EndpointType, CallType, CallStartTime, PstnParticipantCallType
| project CorrelationId, ParticipantId, ParticipantStartTime, ParticipantDuration, EndpointType, CallType, CallStartTime, PstnParticipantCallType
// Join with ACSBillingUsage data on CorrelationId
| join kind=leftouter (ACSBillingUsage
                        | where isnotempty(ParticipantId)
                        | project CorrelationId, ParticipantId, UserIdA, UserIdB, StartTime, Quantity)
    on CorrelationId)
| order by CallStartTime, ParticipantStartTime

Participants per group call

Produces a histogram of the number of participants in group calls.

ACSCallSummaryUpdates
// Filter out all P2P calls to calculate only participants in Group calls
| where CallType == 'Group'
// Get the distinct participants in a call
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId
// Count the number of participants per call
| summarize num_participants=count() by CorrelationId
// Aggregate the numbers of participants per call (e.g. if there are three calls
// with 5 participants, this will produce a row [num_participants=5, participant_counts=3])
| summarize participant_counts=count() by num_participants
| order by num_participants asc 
| render columnchart with (xcolumn = num_participants, title="Number of participants per group call")

Call type ratio

Produces a pie chart of the proportion of call types (P2P and group calls).

ACSCallSummaryUpdates
// Count distinct calls (dcount(CorrelationId)) per call type
| summarize call_types=dcount(CorrelationId) by CallType
| render piechart title="Call Type Ratio"

Call duration histogram

Produces a histogram of call durations in seconds.

ACSCallSummaryUpdates
// Get the distinct combinations of CorrelationId, CallDuration
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, CallDuration
// Count call duration bins (60 second intervals)
| summarize duration_counts=count() by bin(CallDuration, 60)
| order by CallDuration asc
| render columnchart with (xcolumn = CallDuration, title="Call duration histogram")

Call duration percentiles

Calculates the average call duration in seconds, as well as the 50%, 90%, and 99% call duration percentiles.

ACSCallSummaryUpdates
// Get the distinct combinations of CorrelationId, CallDuration
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, CallDuration
// Calculate average and percentiles (50%, 90%, and 99%) of call durations (in seconds)
| summarize avg(CallDuration), percentiles(CallDuration, 50, 90, 99)

Daily calls

Produces a histogram of calls made per day in the last week.

ACSCallSummaryUpdates
// To filter out calls made over a week ago, uncomment the next line
// | where CallStartTime > ago(7d)
// Get the distinct combinations of CorrelationId and CallStartTime
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, CallStartTime
// Adds a new column with the call start day
| extend day = floor(CallStartTime, 1d)
// Count the number of calls per day
| summarize event_count=count() by day
| sort by day asc
| render columnchart title="Number of calls per day"

Hourly calls

Produces a histogram of calls made per hour in the last day.

ACSCallSummaryUpdates
// Get the distinct combinations of CorrelationId and CallStartTime
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, CallStartTime
// Adds a new column with the call start hour
| extend hour = floor(CallStartTime, 1h)
// Count the number of calls per hour
| summarize event_count=count() by hour
| sort by hour asc
| render columnchart title="Number of calls per hour in last day"

Endpoints per call

Calculates the average number of distinct endpoints per call.

ACSCallSummaryUpdates
// Get the distinct combinations of CorrelationId and EndpointId
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, EndpointId
// Count all endpoints and distinct calls
| summarize num_endpoints=count(), num_calls=dcount(CorrelationId)
// Calculate the average number of distinct endpoints per call
| extend avg_endpoints = toreal(num_endpoints) / toreal(num_calls)
| project num_endpoints, num_calls, avg_endpoints

SDK version ratio

Produces a pie chart of the proportion of SDK versions used by participants.

ACSCallSummaryUpdates
// Get the distinct participants in a call
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId, EndpointId, SdkVersion
// Count participants that are using a particular SDK
| summarize sdk_counts=count() by SdkVersion
| order by SdkVersion asc
| render piechart title="SDK Version Ratio"

OS version ratio

Produces a pie chart of the proportion of OS versions used by participants.

ACSCallSummaryUpdates
// Get the distinct participants in a call
| summarize arg_max(CallUpdatesVersion, *) by CorrelationId, ParticipantId, EndpointId, OsVersion
// Simplified OS version name by searching for a specific OS keyword
// and performs a different string split operation per OS type
| extend simple_os = case(  indexof(OsVersion, "Android") != -1, tostring(split(OsVersion, ";")[0]),
                            indexof(OsVersion, "Darwin") != -1, tostring(split(OsVersion, ":")[0]),
                            indexof(OsVersion, "Windows") != -1, tostring(split(OsVersion, ".")[0]),
                            OsVersion
                        )
// Count the participants that are using a particular OS version
| summarize os_counts=count() by simple_os
| order by simple_os asc
| render piechart title="OS Version Ratio"

Streams per call

Calculates the average number of streams per call.

ACSCallDiagnosticsUpdates
// Count the streams and distinct calls
| summarize num_streams=count(), num_calls=dcount(CorrelationId)
// Calculate the average number of streams per call
| extend avg_streams = toreal(num_streams) / toreal(num_calls)

Streams per call histogram

Produces a histogram of number of streams per call.

ACSCallDiagnosticsUpdates
// Counts the number of streams per call 
| summarize streams_per_call=count() by CorrelationId
// Aggregates the numbers of streams per call (e.g. if there are 7 calls that have 6 streams,
// this will produce a row [streams_per_call=6, stream_counts=7])
| summarize stream_counts=count() by streams_per_call
| order by streams_per_call asc
| render columnchart title="Streams per call histogram"