你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ACSCallSummaryUpdates 表的查询

有关在 Azure 门户中使用这些查询的信息,请参阅 Log Analytics 教程。 有关 REST API,请参阅查询

每次通话的参与者人数

计算每个通话的平均参与者数。

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

参与者电话号码

列出通话中参与者的电话号码。 (电话号码来自 ACSBillingUsage 表)。

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

每次群组通话的参与者人数

生成群组通话中参与者人数的直方图。

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")

通话类型比率

生成通话类型比例(P2P 和群组通话)的饼图。

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

通话持续时间直方图

生成通话持续时间的直方图(以秒为单位)。

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")

呼叫持续时间百分位数

计算平均通话持续时间(以秒为单位),以及 50%、90% 和 99% 的通话持续时间百分位数。

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)

每日通话

生成上周每天通话的直方图。

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"

每小时通话

生成最后一天每小时通话的直方图。

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"

每个通话的终节点

计算每次调用中不同终结点的平均数量。

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 版本比率

生成参与者使用的 SDK 版本比例的饼图。

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"

操作系统版本比率

生成参与者使用的操作系统版本比例的饼图。

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"

每次通话的流数

计算每次通话的平均流数。

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)

“每次通话的流数”直方图

生成每次通话的流数的直方图。

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"