提交 17574a88 authored 作者: Moises Silva's avatar Moises Silva

Add bert stats to mod_bert::lost_sync event

The following values can be read from the event:

sync_lost_percent - Error percentage within the analysis window
sync_lost_count - How many times sync has been lost
cng_count - Counter of confort noise packets
err_samples - Number of samples that did not match the sequence
上级 42acb621
......@@ -297,6 +297,10 @@ SWITCH_STANDARD_APP(bert_test_function)
switch_channel_set_variable(channel, BERT_STATS_VAR_SYNC_LOST, "true");
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, BERT_EVENT_LOST_SYNC) == SWITCH_STATUS_SUCCESS) {
switch_channel_event_set_basic_data(channel, event);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "sync_lost_percent", "%f", err);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "sync_lost_count", "%u", bert.stats_sync_lost_cnt);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "cng_count", "%u", bert.stats_cng_cnt);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "err_samples", "%u", bert.err_samples);
switch_event_fire(&event);
}
if (bert.hangup_on_error) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论