Summary:ASTERISK-00650: [patch] Hold Time Functionality
Reporter:jjanzer (jjanzer)Labels:
Date Opened:2003-12-10 16:52:19.000-0600Date Closed:2011-06-07 14:05:07
Versions:Frequency of
Environment:Attachments:( 0) astHoldPatches3.tar.gz
Description:I wanted to find out the time & counts that people are on hold for, so I created a patch that keeps a linked list of hold times associated with the cdr.

Included in [astHoldPatches.tar.gz] are two files:
[astHold.patch] which updates cdr.c cdr.h and res_musiconhold.c
[astHoldMYSQL.patch] which updates the cdr_addon_mysql.c and cdr_mysql.txt from the user addon mysql cdr tracker

I've tested this quite a bit, and it seems to be working out pretty well, let me know if something looks strange or fishy.
Comments:By: Brian West (bkw918) 2003-12-14 11:06:13.000-0600

have you run this under valgrind yet?

By: jjanzer (jjanzer) 2003-12-15 12:02:19.000-0600

Yes, I have run it through valgrind, though I'm not a pro with valgrind, I didn't see any problems caused by the patch.

By: Olle Johansson (oej) 2004-03-21 16:10:10.000-0600

Anyone tested this, needs supporters to move ahead.

By: jjanzer (jjanzer) 2004-03-22 10:56:19.000-0600

I have uploaded a second version (one that we currently use in production). It does not use the linked list macro in asterisk. It still, however, uses linked lists. There are two catches with this patch; you must have music on hold turned on, and it seems to only work on the callee side.

I'm sure there is a better spot to add the hold times than in res_musiconhold.c but I was in a bit of a hurry, when this was originally written.

By: jjanzer (jjanzer) 2004-03-22 10:57:17.000-0600

holdtime.diff.gz contains the patch for cdr_addon_mysql (mantis stripped the filename down)

By: jjanzer (jjanzer) 2004-03-22 11:05:38.000-0600

I forgot to do a unified diff on the earlier patches. I also removed some of the debugging messages. astHoldPatches3.tar.gz contains patches for the cdr_addon_mysql as well as the core.

By: Olle Johansson (oej) 2004-04-15 08:29:52

Do you still have to have musiconhold turned on?

Any more test results from other users?

By: jjanzer (jjanzer) 2004-04-15 14:13:59

Musiconhold must be turned on for this to work. I have figured out that this hack really isn't good, I would recomend closing this bug out unless someone wants to write the suport "deeper/earlier" into the management of the call (ie: not in res_musiconhold).

By: Olle Johansson (oej) 2004-04-15 14:28:58

Closing on jjanzer's request. The idea is still interesting - the patch is not approved by the programmer himself :-) Report stays in archive for new attacks to solve this, but is closed until new code turns up.