I’ll be very grateful if you help solve the problem. Periodically, in the asterisk logs there are “Exceptionally long voice queue length queuing” messages. I re-read a bunch of forms, nobody has a single answer. But for myself, I concluded that such messages occur when Asterisk can not send the packet on time and they are in the time queue. Source code
if ((queued_frames + new_frames > 128 || queued_voice_frames + new_voice_frames > 96)) {
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_LIST_TRAVERSE_SAFE_BEGIN(ast_channel_readq(chan), cur, frame_list) {
/* Save the most recent frame */
if (!AST_LIST_NEXT(cur, frame_list)) {
break;
} else if (cur->frametype == AST_FRAME_VOICE || cur->frametype == AST_FRAME_VIDEO || cur->frametype == AST_FRAME_NULL) {
if (++count > 64) {
break;
}
AST_LIST_REMOVE_CURRENT(frame_list);
ast_frfree(cur);
}
}
AST_LIST_TRAVERSE_SAFE_END;
}
Explain how to periodically look at the value of queued_voice_frames? When can the variable be greater than 96?
How can I find out the reason?
This will happen if the thread which is supposed to be reading the frames is delayed or is deadlocked. Without a backtrace and environment details it’s hard to say why.
Unfortunately, I can not compile with the support of BETTER_BACKTRACES, the server is far away and is used 24x7. But here are the parameters of the environment and statistics I can provide, where to start?
Could you clarify that the thread that the frames it reads is system? How can I see the lock?
Well, you haven’t provided yet what version of Asterisk you are using which is important. You also haven’t stated what your Asterisk is doing/how you are using it.
You can’t see what is going on reliably or what is blocked without a backtrace.
Version
Asterisk 13.18.0 built by mockbuild @ jenkins2.schmoozecom.net on a x86_64 running Linux on 2017-10-30 20:56:23 UTC
Aster is involved in organizing sales manager calls. Using AMI, the call is initialized to the client, when it is sent, it is sent to the queue. Parallel, Asterisk receives incoming calls to the queue for technical support.
Simultaneous call an average of 60-70. Below is a graph showing the parameters
active channels
active calls
commands “core show channels