Summary:ASTERISK-15710: [patch] app_queue: Log failed attempts to call members
Reporter:Håkon Nessjøen (haakon)Labels:patch
Date Opened:2010-02-27 06:31:41.000-0600Date Closed:
Versions:Frequency of
Environment:Attachments:( 0) issue0016925-app_queue.c.patch
( 1) rev295023-issue0016925-app_queue.c.patch
( 2) tringenbach_rna_hangupcause.diff
( 3) tringenbach_rna_hangupcause2.diff
Description:This patch enables logging of all call attempts from a queue. Not only the ones that do not fail.

The patch also introduces a new parameter "congestion" to both RINGNOANSWER in queue_log and AgentRingNoAnswer AMI event, which is set to 1 if the call failed to go through because of technical difficulties.

This makes it easier to make queue_log statistics with information about problems with an agent. For example if an agent has a faulty line, or your telco/dahdi connection is having problems.

I am however unsure if everyone want this marked as an congestion from the "AST_CONTROL_CONGESTION" frame. Since in my experience, this can come if a SIP UA doesn't want to let you ring more than x seconds, etc. Most real congestion problems come before this frame is generated. (read: before a new channel is up at all) So if this patch should be applied, maybe it should be configurable, or let out.
Comments:By: Paul Belanger (pabelanger) 2010-06-14 15:43:01

Added to reviewboard.

By: Tim Ringenbach at Asteria Solutions Group (tim_ringenbach) 2010-06-22 15:53:49

I just attached a similar patch that instead of having a congestion flag, adds the hangupcause. What do you think about doing that instead?

By: Håkon Nessjøen (haakon) 2010-06-22 17:02:20

I just looked quickly through your new patch from my iPhone here. I might be wrong, but it seems like you have ignored the different values for the pause argument in your patch.
Two occurences where pause was previously 1, is set to 0 after your patch.

By: Tim Ringenbach at Asteria Solutions Group (tim_ringenbach) 2010-06-22 17:31:55

haakon: You are correct. Looks like the last rna() call was especially messed up. Sorry about that. I've uploaded another version that fixes that, and patches the queuelog.tex file.

I also don't think Reason is the right header I should be using, but I haven't figured out the right one yet.

Do you like the approach of including the hangupcause instead of just a congestion flag?

By: Håkon Nessjøen (haakon) 2010-11-15 09:28:41.000-0600

I have just uploaded a new patch, which includes the hangup-cause instead of only a boolean of "CONGESTION" state.

Please give me access to update the reviewboard with the latest patch.

The documentation of queuelog must be updated when this is committed:

 RINGNOANSWER - rnatime|hangup-reason

Manager api - AgentRingNoAnswer:
 AgentRingNoAnser - Reason: hangup-reason

Where hangup-reason in both cases are textual representation of the asterisk internal hangup reason/cause of the outgoing call.

By: Håkon Nessjøen (haakon) 2010-11-21 17:20:29.000-0600

New reviewboard link:

By: Håkon Nessjøen (haakon) 2010-11-21 17:49:11.000-0600

The issue description should be updated I think, to reflect the latest changes to the patch. Instead of returning 0 or 1 if the call was congested or not, it now returns the hangup-reason of the call, as described in the latest reviewboard link.

By: Physis Heckman (physis) 2017-01-14 06:21:29.842-0600

I try to use your patch, but some errors occurred to asterisk-11-current (11.25.1)

/usr/src/asterisk-11.25.1# patch apps/app_queue.c < /usr/src/rev295023-issue0016925-app_queue.c.patch
patching file apps/app_queue.c
Hunk #1 succeeded at 1366 with fuzz 2 (offset 335 lines).
Hunk #2 FAILED at 2884.
Hunk #3 FAILED at 2967.
Hunk #4 FAILED at 3189.
Hunk #5 FAILED at 3209.
Hunk #6 FAILED at 3216.
Hunk #7 FAILED at 3515.
Hunk #8 FAILED at 3533.
Hunk #9 succeeded at 4636 with fuzz 1 (offset 1033 lines).
Hunk #10 FAILED at 3648.
8 out of 10 hunks FAILED -- saving rejects to file apps/app_queue.c.rej
patching file apps/app_queue.c
Hunk #1 FAILED at 30.
1 out of 1 hunk FAILED -- saving rejects to file apps/app_queue.c.rej

link app_queue.c.rej http://pastebin.com/qFVtF7Rr
link app_queue.c asterisk-11.25.1 http://pastebin.com/GJWG5vMT