mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 19:28:53 +00:00
func_frame_trace: Add CLI command to dump frame queue.
This adds a simple CLI command that can be used for
analyzing all frames currently queued to a channel.
A couple log messages are also adjusted to be more
useful in tracing bridging problems.
Resolves: #533
(cherry picked from commit d075a08d7e
)
This commit is contained in:
committed by
Asterisk Development Team
parent
b05169bcac
commit
410909fbfb
@@ -1080,8 +1080,11 @@ static int __ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, in
|
||||
}
|
||||
|
||||
if ((queued_frames + new_frames > 128 || queued_voice_frames + new_voice_frames > 96)) {
|
||||
int total_queued = queued_frames + new_frames;
|
||||
int total_voice = queued_voice_frames + new_voice_frames;
|
||||
int count = 0;
|
||||
ast_log(LOG_WARNING, "Exceptionally long %squeue length queuing to %s\n", queued_frames + new_frames > 128 ? "" : "voice ", ast_channel_name(chan));
|
||||
ast_log(LOG_WARNING, "Exceptionally long %squeue length (%d voice / %d total) queuing to %s\n",
|
||||
queued_frames + new_frames > 128 ? "" : "voice ", total_voice, total_queued, ast_channel_name(chan));
|
||||
AST_LIST_TRAVERSE_SAFE_BEGIN(ast_channel_readq(chan), cur, frame_list) {
|
||||
/* Save the most recent frame */
|
||||
if (!AST_LIST_NEXT(cur, frame_list)) {
|
||||
@@ -1098,6 +1101,9 @@ static int __ast_queue_frame(struct ast_channel *chan, struct ast_frame *fin, in
|
||||
}
|
||||
}
|
||||
AST_LIST_TRAVERSE_SAFE_END;
|
||||
if (count) {
|
||||
ast_debug(4, "Discarded %d frame%s due to queue overload on %s\n", count, ESS(count), ast_channel_name(chan));
|
||||
}
|
||||
}
|
||||
|
||||
if (after) {
|
||||
|
Reference in New Issue
Block a user