aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
AgeCommit message (Collapse)AuthorFilesLines
2010-02-18Merged revisions 247736 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r247736 | dvossel | 2010-02-18 14:58:41 -0600 (Thu, 18 Feb 2010) | 7 lines fixes Queue with C option crash (closes issue #16475) Reported by: okrief Patches: queue_crash.diff uploaded by dvossel (license 671) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@247737 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-17Merged revisions 247169 via svnmerge from mmichelson1-3/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r247169 | mmichelson | 2010-02-17 10:24:54 -0600 (Wed, 17 Feb 2010) | 9 lines Merged revisions 247168 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r247168 | mmichelson | 2010-02-17 10:24:17 -0600 (Wed, 17 Feb 2010) | 3 lines Make sure that when autofill is disabled that callers not in the front of the queue cannot place calls. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@247172 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Merged revisions 246116 via svnmerge from dvossel1-6/+7
https://origsvn.digium.com/svn/asterisk/trunk ................ r246116 | dvossel | 2010-02-10 11:49:34 -0600 (Wed, 10 Feb 2010) | 14 lines Merged revisions 246115 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r246115 | dvossel | 2010-02-10 11:44:20 -0600 (Wed, 10 Feb 2010) | 8 lines fixes random deadlock in app_queue with use_weight during reload (closes issue #16677) Reported by: tim_ringenbach Patches: app_queue_use_weight_deadlock.diff uploaded by tim ringenbach (license 540) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@246117 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-27Merged revisions 243693 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r243693 | jpeeler | 2010-01-27 14:37:33 -0600 (Wed, 27 Jan 2010) | 12 lines Merged revisions 243691 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r243691 | jpeeler | 2010-01-27 14:35:56 -0600 (Wed, 27 Jan 2010) | 5 lines Revert 243570, I should have looked at this closer. Will reopen the issue, but am leaving the review closed as the change was pointless. (issue #16488) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@243696 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-27Merged revisions 243571 via svnmerge from jpeeler1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r243571 | jpeeler | 2010-01-27 12:49:52 -0600 (Wed, 27 Jan 2010) | 16 lines Merged revisions 243570 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r243570 | jpeeler | 2010-01-27 12:47:34 -0600 (Wed, 27 Jan 2010) | 9 lines Extend announcement URL used with Queue from 80 chars to PATH_MAX. (closes issue #16488) Reported by: syspert Patches: soundfilelen.pacth-2 uploaded by syspert (license 938) Review: https://reviewboard.asterisk.org/r/475/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@243573 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-18Merged revisions 240842 via svnmerge from dvossel1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r240842 | dvossel | 2010-01-18 09:52:55 -0600 (Mon, 18 Jan 2010) | 2 lines fixes spelling error. s/memeber/member ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@240843 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-07Merged revisions 238361 via svnmerge from dvossel1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r238361 | dvossel | 2010-01-07 12:58:23 -0600 (Thu, 07 Jan 2010) | 8 lines cli 'queue show' formatting fix. queue name was truncated over 12 characters (closes issue #16078) Reported by: RoadKill Patches: quequename_limit.patch uploaded by ppyy (license 906) Tested by: dvossel ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@238362 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-05Merged revisions 237920 via svnmerge from dvossel1-5/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r237920 | dvossel | 2010-01-05 17:08:50 -0600 (Tue, 05 Jan 2010) | 16 lines fixes holdtime playback issue in app_queue When reporting hold time, the number of seconds should be mod 60. Otherwise audio playback could be something like "2 minutes 123 seconds" rather than "2 minutes 3 seconds". Also, the "minute" sound file is missing, so for the moment until that file can be created the "minutes" file is used instead. (closes issue #16168) Reported by: nickilo Patches: patch-unified-trunk-rev-222176 uploaded by nickilo (license ) Tested by: nickilo, wonderg ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@237921 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-04Merged revisions 237327 via svnmerge from dvossel1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ........ r237327 | dvossel | 2010-01-04 10:39:11 -0600 (Mon, 04 Jan 2010) | 10 lines app_queue segfaults if realtime field uniqueid is NULL (closes issue #16385) Reported by: haakon Patches: app_queue.c.patch uploaded by haakon (license 880) app_queue.c.patch_v2 uploaded by dvossel (license 671) Tested by: haakon ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@237328 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-30Merged revisions 231556 via svnmerge from dvossel1-2/+13
https://origsvn.digium.com/svn/asterisk/trunk ........ r231556 | dvossel | 2009-11-30 12:55:07 -0600 (Mon, 30 Nov 2009) | 11 lines app_queue crashes randomly, often during call-transfers This patch adds a ref to the queue_ent object's parent call_queue in queue_exec() so the call_queue won't be destroyed while the the queue_ent still holds a pointer to it. (closes issue 0015686) Tested by: dvossel, aragon ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@231558 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-24Merged revisions 231134 via svnmerge from tilghman1-68/+85
https://origsvn.digium.com/svn/asterisk/trunk ........ r231134 | tilghman | 2009-11-24 14:31:28 -0600 (Tue, 24 Nov 2009) | 7 lines Found a few places where queue refcounts were counted incorrectly. Also add debug statements. (closes issue #15982, closes issue #15984) Reported by: atis Patches: 20091111__issue15982.diff.txt uploaded by tilghman (license 14) Tested by: atis ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@231136 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Merged revisions 222176 via svnmerge from kpfleming1-3/+44
https://origsvn.digium.com/svn/asterisk/trunk ................ r222176 | kpfleming | 2009-10-05 20:24:24 -0500 (Mon, 05 Oct 2009) | 27 lines Recorded merge of revisions 222152 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines Fix ao2_iterator API to hold references to containers being iterated. See Mantis issue for details of what prompted this change. Additional notes: This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK has become an enum instead of a macro, with a name that fits our naming policy; also, it is now necessary to call ao2_iterator_destroy() on any iterator that has been created. Currently this only releases the reference to the container being iterated, but in the future this could also release other resources used by the iterator, if the iterator implementation changes to use additional resources. (closes issue #15987) Reported by: kpfleming Review: https://reviewboard.asterisk.org/r/383/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@222187 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30Merged revisions 221436 via svnmerge from mnick1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r221436 | mnick | 2009-09-30 16:15:01 -0500 (Wed, 30 Sep 2009) | 2 lines Prevents from division by zero ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221472 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-11Merged revisions 217990 via svnmerge from tilghman1-4/+21
https://origsvn.digium.com/svn/asterisk/trunk ................ r217990 | tilghman | 2009-09-10 18:54:51 -0500 (Thu, 10 Sep 2009) | 10 lines Merged revisions 217989 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r217989 | tilghman | 2009-09-10 18:52:22 -0500 (Thu, 10 Sep 2009) | 3 lines Don't ring another channel, if there's not enough time for a queue member to answer. (Fixes AST-228) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@218052 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-12Merged revisions 211957 via svnmerge from mnicholson1-1/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r211957 | mnicholson | 2009-08-12 18:14:36 -0500 (Wed, 12 Aug 2009) | 17 lines Merged revisions 211953 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r211953 | mnicholson | 2009-08-12 18:04:02 -0500 (Wed, 12 Aug 2009) | 10 lines This patch adds additional checking when generating queue log TRANSFER events. The additional checks prevent generation of false TRANSFER events in certain situations. (closes issue #14536) Reported by: aragon Patches: queue-log-xfer-fix1.diff uploaded by mnicholson (license 96) Tested by: aragon, mnicholson ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211959 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-07Merged revisions 211040 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ................ r211040 | tilghman | 2009-08-07 13:17:41 -0500 (Fri, 07 Aug 2009) | 21 lines Merged revisions 211038 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r211038 | tilghman | 2009-08-07 13:16:28 -0500 (Fri, 07 Aug 2009) | 14 lines QUEUE_MEMBER_LIST _really_ wants the interface name, not the membername. This is a partial revert of revision 82590, which was an attempted cleanup, but in reality, it broke QUEUE_MEMBER_LIST, which has always been intended as a method by which component interfaces could be queried from the queue. Membername isn't useful here, because that field cannot be used to obtain further information about the member. See the documentation on QUEUE_MEMBER_LIST, RemoveQueueMember, QUEUE_MEMBER_PENALTY, and the various AMI commands which take a member argument for further justification. (closes issue #15664) Reported by: rain Patches: app_queue-queue_member_list.diff uploaded by rain (license 327) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211051 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-08Merged revisions 205350 via svnmerge from mmichelson1-2/+3
https://origsvn.digium.com/svn/asterisk/trunk ................ r205350 | mmichelson | 2009-07-08 14:26:55 -0500 (Wed, 08 Jul 2009) | 20 lines Merged revisions 205349 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r205349 | mmichelson | 2009-07-08 14:26:13 -0500 (Wed, 08 Jul 2009) | 14 lines Prevent phantom calls to queue members. If a caller were to hang up while a periodic announcement or position were being said, the return value for those functions would incorrectly indicate that the caller was still in the queue. With these changes, the problem does not occur. (closes issue #14631) Reported by: latinsud Patches: queue_announce_ghost_call2.diff uploaded by latinsud (license 745) (with small modification from me) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@205353 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-26Merged revisions 196792 via svnmerge from seanbright1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r196792 | seanbright | 2009-05-26 12:38:54 -0400 (Tue, 26 May 2009) | 2 lines Add a missing unref for queues in handle_statechange. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@196793 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18Merged revisions 195370 via svnmerge from tilghman1-9/+11
https://origsvn.digium.com/svn/asterisk/trunk ................ r195370 | tilghman | 2009-05-18 15:52:33 -0500 (Mon, 18 May 2009) | 15 lines Recorded merge of revisions 195366 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines Add a similar dependency on SMDI for voicemail as already exists for ADSI. (closes issue #14846) Reported by: pj Patches: 20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14) 20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@195373 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12Merged revisions 194057 via svnmerge from mnicholson1-0/+37
https://origsvn.digium.com/svn/asterisk/trunk ................ r194057 | mnicholson | 2009-05-12 17:32:13 -0500 (Tue, 12 May 2009) | 22 lines Merged revisions 194028 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r194028 | mnicholson | 2009-05-12 17:15:45 -0500 (Tue, 12 May 2009) | 16 lines This change modifies app_queue to properly generate CDR records in failure situations. This involves setting a proper cdr disposition coresponding to the given failure condition and ensuring the proper information is stored in the cdr record. (closes issue #13691) Reported by: dferrer Tested by: mnicholson (closes issue #13637) Reported by: atis Tested by: atis ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@194059 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-08Merged revisions 193349 via svnmerge from mmichelson1-0/+10
https://origsvn.digium.com/svn/asterisk/trunk ........ r193349 | mmichelson | 2009-05-08 14:50:44 -0500 (Fri, 08 May 2009) | 12 lines Reset the members' call counts when resetting queue statistics. This helps to prevent odd scenarios where a queue will claim to have taken 0 calls, but the members appear to have taken a non-zero amount. (closes issue #15068) Reported by: sum Patches: patchreset.patch uploaded by sum (license 766) Tested by: sum ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@193350 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-27Merged revisions 190622 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r190622 | mmichelson | 2009-04-27 11:26:14 -0500 (Mon, 27 Apr 2009) | 3 lines Update warning message to not have pipes and contain all options. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@190625 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-23Merged revisions 190250 via svnmerge from mmichelson1-5/+7
https://origsvn.digium.com/svn/asterisk/trunk ........ r190250 | mmichelson | 2009-04-23 12:45:35 -0500 (Thu, 23 Apr 2009) | 9 lines Fix reversed behavior of leavewhenempty option in queues.conf. (closes issue #14650) Reported by: alecdavis Patches: 14650.patch uploaded by mmichelson (license 60) Tested by: mmichelson, lmadsen ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@190253 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-14Merged revisions 188470 via svnmerge from mmichelson1-1/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r188470 | mmichelson | 2009-04-14 18:28:13 -0500 (Tue, 14 Apr 2009) | 3 lines Fix a couple of queue member reference leaks. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@188474 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-13Merged revisions 188032 via svnmerge from mmichelson1-0/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r188032 | mmichelson | 2009-04-13 09:17:56 -0500 (Mon, 13 Apr 2009) | 6 lines Set all queue variables on both the caller and member channels. This allows for the variables to be accessed if a member macro is run. Thanks to Grigoriy Puzankin for bringing this up on the -dev list. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@188039 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185604 via svnmerge from mmichelson1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r185604 | mmichelson | 2009-03-31 17:12:52 -0500 (Tue, 31 Mar 2009) | 3 lines Fix trunk's compilation. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185605 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185600 via svnmerge from mmichelson1-0/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r185600 | mmichelson | 2009-03-31 17:02:48 -0500 (Tue, 31 Mar 2009) | 12 lines Merged revisions 185599 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185599 | mmichelson | 2009-03-31 17:00:01 -0500 (Tue, 31 Mar 2009) | 6 lines Fix crash that would occur if an empty member was specified in queues.conf. (closes issue #14796) Reported by: pida ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185603 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-31Merged revisions 185261 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r185261 | russell | 2009-03-31 09:53:45 -0500 (Tue, 31 Mar 2009) | 5 lines Don't free() an astobj2 object. (closes issue #14672) Reported by: makoto ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185264 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-30Merged revisions 185072 via svnmerge from mmichelson1-70/+81
https://origsvn.digium.com/svn/asterisk/trunk ................ r185072 | mmichelson | 2009-03-30 11:26:48 -0500 (Mon, 30 Mar 2009) | 45 lines Merged revisions 185031 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r185031 | mmichelson | 2009-03-30 11:17:35 -0500 (Mon, 30 Mar 2009) | 39 lines Fix queue weight behavior so that calls in low-weight queues are not inappropriately blocked. (This is copied and pasted from the review request I made for this patch) Asterisk has some odd behavior when queue weights are used. The current logic used when potentially calling a queue member is: If the member we are going to call is part of another queue and _that other queue has any callers in it_ and has a higher weight than the queue we are calling from, then don't try to contact that member. The issue here is what I have marked with underscores. If the higher-weighted queue has any callers in it at all, then the queue member will be unreachable from the lower-weighted queue. This has the potential to be really really bad if using a queue strategy, such as leastrecent or fewestcalls, with the potential to call the same member repeatedly. The fix proposed by garychen on issue 13220 is very simple and, as far as I can see, works well for this situation. With this set of changes, the logic used becomes: If the member we are going to call is part of another queue, the other queue has a higher weight than the queue we are calling from, and the higher weight queue has at least as many callers as available members, then do not try to contact the queue member. If the higher weighted queue has fewer callers than available members, then there is no reason to deny the call to this member since the other queue can afford to spare a member. Since the fix involved writing a generic function for determining the number of available members in the queue, I also modified the is_our_turn function to make use of the new num_available_members function to determine if it is our turn to try calling a member. There is one small behavior change. Before writing this patch, if you had autofill disabled, then if you were the head caller in a queue, you would automatically be told that it was your turn to try calling a member. This did not take into account whether there were actually any queue members available to take the call. Now we actually make sure there is at least one member available to take the call if autofill is disabled. (closes issue #13220) Reported by: garychen Review: http://reviewboard.digium.com/r/202/ ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@185089 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-27Merged revisions 184693 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r184693 | russell | 2009-03-27 11:21:10 -0500 (Fri, 27 Mar 2009) | 2 lines Change global_app_buf to ast_str_thread_global_buf. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@184707 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183244 via svnmerge from mmichelson1-13/+14
https://origsvn.digium.com/svn/asterisk/trunk ........ r183244 | mmichelson | 2009-03-19 13:10:34 -0500 (Thu, 19 Mar 2009) | 16 lines Fix a memory leak associated with queues. For every attempt that app_queue made to place an outbound call to a queue member, we would allocate a queue_end_bridge structure. When the bridge for the call had completed, we would free the structure. Unfortunately not all call attempts actually end up bridged to a member, so we need to be more selective of when to allocate the structure. With this change, the allocation occurs in an area where we can guarantee that the call will be bridged. (closes issue #14680) Reported by: caspy Patches: 14680.patch uploaded by mmichelson (license 60) Tested by: caspy ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@183247 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Change faulty comparison used when announcing average hold minutes and secondsmmichelson1-2/+2
(closes issue #14227) Reported by: caspy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182121 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-12Run the macro on the queue member's channel when he answers, not the ↵mmichelson1-1/+1
caller's channel. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181846 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Fix segfault when dialing a typo'd queuemmichelson1-5/+7
If trying to dial a non-existent queue, there would be a segfault when attempting to access q->weight, even though q was NULL. This problem was introduced during the queue-reset merge and thus only affects trunk. (closes issue #14643) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181244 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Merged revisions 180006 via svnmerge from mmichelson1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r180006 | mmichelson | 2009-03-03 16:48:18 -0600 (Tue, 03 Mar 2009) | 17 lines Clarify some documentation of queues.conf.sample It had always been possible to explicitly specify a "blank" value for a sound file in queues.conf and have no sound played back. The problem with this is that it would result in some ugly CLI warnings from file.c. This commit introduces a check when playing a file in app_queue to see if the name of the file is zero-length and return early if that is the case. Also, the ability to specify the blank sound files in queues.conf is now mentioned more clearly in queues.conf.sample (closes issue #14227) Reported by: caspy ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@180007 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17Fix a race condition that caused device states to become incorrect for hints.russell1-1/+1
The problem here is that the hint processing code was subscribed to the wrong event type. So, it started processing state for a hint too soon, before the device state cache had been updated. Also, fix a similar bug in app_queue, as it was also subscribed to the wrong event type. (closes issue #14461) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176557 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-13Merge queue-reset branch to Asteriskmmichelson1-226/+530
From a user point-of-view, this adds new CLI commands and Manager Actions to better facilitate the reloading of queues and the resetting of their statistics. The new CLI commands are the "queue reload" and "queue reset stats" commands. The new manager actions are the QueueReload and QueueReset commands. Review: http://reviewboard.digium.com/r/115 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175663 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Fix a bit of odd logic for announcing position. Sync with 1.6.0's logicmmichelson1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174951 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Fix odd "thank you" sound playing behavior in app_queue.cmmichelson1-2/+4
If someone has configured the queue to play an position or holdtime announcement, then it is odd and potentially unexpected to hear a "Thank you for your patience" sound when no position or holdtime was actually announced. This fixes the announcement so that the "thanks" sound is only played in the case that a position or holdtime was actually announced. There is a way that the "thank you" sound can be played without a position or holdtime, and that is to set announce-frequency to a value but keep announce-position and announce-holdtime both turned off. (closes issue #14227) Reported by: caspy Patches: 14227_v3.patch uploaded by putnopvut (license 60) Tested by: caspy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@174948 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-05Merged revisions 173692 via svnmerge from mmichelson1-6/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173692 | mmichelson | 2009-02-05 14:29:09 -0600 (Thu, 05 Feb 2009) | 12 lines Fix situations where queue members could be autopaused unexpectedly Specifically, this patch prevents us from autopausing members when we receive a busy or congestion frame from them. (closes issue #14376) Reported by: fiddur Patches: 14376.patch uploaded by putnopvut (license 60) Tested by: fiddur ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173693 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Fix some areas where the incorrect interface was passed to ast_device_statemmichelson1-3/+3
I swear it feels like I already did this once... (closes issue #14359) Reported by: francesco_r git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173507 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-29Fix "cancel answered elsewhere" through app_queue with members in chan_local.oej1-4/+14
Also, implement a private cause code (as suggested by Tilghman). This works with chan_sip, but doesn't propagate through chan_local. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172318 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-28Add final part of previously committed work for answered elsewhere in queue ↵oej1-5/+12
- the missing piece that started with app_dial() earlier on. This is to avoid having the list and counter of missed calls being touched by queue calls. Add the C option to queue() and nothing will be logged on phones that support the Reason: header on SIP cancel, like the SNOM phones. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171924 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-27Fix queue crashes that would occur after the calling channel was masqueraded.mmichelson1-16/+44
The data passed to the end_bridge_callback was assumed to be data which was still stack'd. The problem was that with some call features, attended transfers in particular, a new bridge thread is started once the feature completes, meaning that when the end_bridge_callback is called, the end_bridge_callback_data was invalid. To fix this problem, there are two measures taken 1. Instead of pointing to stacked data, we now used heap-allocated data for passing to the end_bridge_callback in app_queue 2. Since bridges can end multiple times on a single logical call, we wait until the final bridge is broken to actually set any queue variables. This is accomplished through reference-counting and the use of an end_bridge_callback_data_fixup function in app_queue.c (closes issue #14260) Reported by: ccesario Patches: 14260.patch uploaded by putnopvut (license 60) Tested by: ccesario git-svn-id: http://svn.digium.com/svn/asterisk/trunk@171618 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-21Fix device state parsing issues for channel names with multiple slashesmmichelson1-1/+1
The fix being applied is a bit different for trunk and the 1.6.X branches. For trunk, we only wish to strip off the characters beyond the second slash if the channel is a Local channel (i.e. we are removing the /n from the device name). Other channel technologies with multiple slashes (e.g. DAHDI) need the information after the second slash in order to get the proper device state information. In addition to this fix, the 1.6.X branches are receiving a much more important fix as well. The problem in 1.6.X is that the member's device name was being directly changed instead of having a copy changed. This meant that we would strip off the second slash and trailing characters and then leave the member's device name like that permanently thereafter. (closes issue #14014) Reported by: kebl0155 Patches: 14014_number2.patch uploaded by putnopvut (license 60) Tested by: kebl0155 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169611 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-20Use the default timeout for a queue instead of -1mmichelson1-1/+1
(closes issue #14272) Reported by: timking git-svn-id: http://svn.digium.com/svn/asterisk/trunk@169574 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15Add support for setting the Reason header when cancelling a call in the queue oej1-1/+5
because someone else answered. Previously, only dial() was supported. EDV-102 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168636 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15Merged revisions 168628 via svnmerge from mmichelson1-5/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r168628 | mmichelson | 2009-01-14 18:11:01 -0600 (Wed, 14 Jan 2009) | 16 lines Fix some crashes from bad datastore handling in app_queue.c * The queue_transfer_fixup function was searching for and removing the datastore from the incorrect channel, so this was fixed. * Most datastore operations regarding the queue_transfer datastore were being done without the channel locked, so proper channel locking was added, too. (closes issue #14086) Reported by: ZX81 Patches: 14086v2.patch uploaded by putnopvut (license 60) Tested by: ZX81, festr ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168629 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13Clarify a message that app_queue prints and change to a debug-level messagemmichelson1-1/+1
The "No one is answering..." verbose message contained 3 numbers that were not explained in any way to whoever was viewing the message. It is more helpful now since the message explains what the numbers mean. Also, the message has been downgraded to "DEBUG" level. (closes issue #14172) Reported by: caio1982 Patches: queue_answering_debug.diff uploaded by caio1982 (license 22) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168579 f38db490-d61c-443f-a65b-d21fe96a405b