summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
AgeCommit message (Collapse)Author
2007-06-20Fix trunk brokenness; also, optimize application registrationTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20Cleaning up a small disaster I created earlierSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20As per 9228, now app_queue should have the proper machinery to do gosubs.Steve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19Via bug9228, no way to create macros via AEL, and some of the apps allow you ↵Steve Murphy
to call macros..., I modded the apps that allow macro calls to allow gosubs calls also, to make them AEL compliant. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18Fixed issue where 'stop gracfeully' was hanging ...Brett Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12Completely remove all of the code related to jumping to priority n + 101. yay!Russell Bryant
(issue #9926, caio1982) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-07Merged revisions 68280 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r68280 | russell | 2007-06-07 16:16:07 -0500 (Thu, 07 Jun 2007) | 4 lines Fix loading persistent queue members when using realtime configuration for queues. Also, remove an unneeded leading slash for the astdb family. (issue #9911, patch by atis) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-01Merge major changes to the way device state is passed around Asterisk. The twoRussell Bryant
places that cared about device states were app_queue and the hint code in pbx.c. The changes include converting it to use the Asterisk event system, as well as other efficiency improvements. * app_queue: This module used to register a callback into devicestate.c to monitor device state changes. Now, it is just a subscriber to Asterisk events with the type, device state. * pbx.c hints: Previously, the device state processing thread in devicestate.c would call ast_hint_state_changed() each time the state of a device changed. Then, that code would go looking for all the hints that monitor that device, and call their callbacks. All of this blocked the device state processing thread. Now, the hint code is a subscriber of Asterisk events with the type, device state. Furthermore, when this code receives a device state change event, it queues it up to be processed by another thread so that it doesn't block one of the event processing threads. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22Fix a couple of spots in the handling of device states that could lead to aRussell Bryant
double free. (issue #9772, reported by Mike Anikienko, fix by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-21I know we have talked about rewriting app_queue for Asterisk 1.6, but once IRussell Bryant
saw this, I couldn't help myself from changing it. Previously, for *every* device state change, app_queue would spawn a thread to handle it. Now, the device state callback just puts the state change in a queue and it gets handled by a single state change processing thread. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18Merged revisions 64868 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r64868 | russell | 2007-05-17 21:48:51 -0500 (Thu, 17 May 2007) | 5 lines Fix a small bug I noticed while working on something else. app_queue did not unregister its device state monitoring callback in unload_module(). So, this would make Asterisk crash on the first device state change after you unload the module. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14Don't allow rounding seconds to weird values that may cause "unexpected" ↵Jason Parker
results. Issue 9514. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-14Add 'c' option to app_queue which allows for continuing in the dialplan if ↵Jason Parker
the callee hangs up. Issue 9284, patch by lyl, modified a little bit by me (I felt 'continue' was better than 'keepalive') git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@64243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-30This patch adds additional information to the EXITWITHKEY and EXITWITHTIMEOUTRussell Bryant
entries in the queue log. (issue #7561, reported and originally patched by fkasumovic, patch slightly modified and updated to trunk by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-27Add a min-announce-frequency option to queues.conf which allows you to ↵Russell Bryant
control the minimum amount of time between queue announcements for use when the caller's queue position changes frequently. (issue #9604, patch by Matthew Roth) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-20Merged revisions 61694 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r61694 | qwell | 2007-04-20 14:51:49 -0500 (Fri, 20 Apr 2007) | 13 lines Merged revisions 61692 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r61692 | qwell | 2007-04-20 14:49:54 -0500 (Fri, 20 Apr 2007) | 5 lines If the '* to hangup' option is not enabled, we don't need to disable * as a valid exit key. If it was enabled, this statement would've never been checked in the first place. Issue #9552 ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61695 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-09Merged revisions 61022 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r61022 | qwell | 2007-04-09 14:05:48 -0500 (Mon, 09 Apr 2007) | 4 lines Use the appropriate interface name with COMPLETECALLER. Issue 9395. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@61023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-08Merged revisions 60762 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60762 | file | 2007-04-08 13:04:44 -0400 (Sun, 08 Apr 2007) | 2 lines Allow app_queue to use MONITOR_EXEC even if MONITOR_OPTIONS is not set. (issue #9495 reported by cduffy) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60763 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06Send a manager AgentComplete event when the agent transfers the call, inRussell Bryant
addition to where it is already sent if either side hangs up. (issue #9219, rgollent) In passing, I put this code in a function so it would not be duplicated a third time. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17Merged revisions 55219 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r55219 | file | 2007-02-17 12:39:32 -0500 (Sat, 17 Feb 2007) | 2 lines Add missing membername option to AddQueueMember documentation. (issue #9088 reported by seanbright) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17We want to skip the queue if the name doesn't match the specified one, not ↵Joshua Colp
if they *do*. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17Increase "queue show" buffer size from 80 to 240. This should be more then ↵Joshua Colp
enough for most cases. (issue #9089 reported by mvanbaak) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-17Merged revisions 55129 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r55129 | file | 2007-02-16 21:59:50 -0500 (Fri, 16 Feb 2007) | 2 lines Make the 'i' option of Queue actually work. (issue #8986 reported by utis) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-13This introduces a new dialplan function, DEVSTATE, which allows you to do someRussell Bryant
pretty cool things. First, you can get the device state of anything in the dialplan: NoOp(SIP/mypeer has state ${DEVSTATE(SIP/mypeer)}) NoOp(The conference room 1234 has state ${DEVSTATE(MeetMe:1234)}) Most importantly, this allows you to create custom device states so you can control phone lamps directly from the dialplan. Set(DEVSTATE(Custom:mycustomlamp)=BUSY) ... exten => mycustomlamp,hint,Custom:mycustomlamp git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09Clean up documentation of Queue application. (issue #9022 reported by ↵Joshua Colp
seanbright) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-01Merged revisions 53081 via svnmerge from Olle Johansson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53081 | oej | 2007-02-01 21:38:58 +0100 (Thu, 01 Feb 2007) | 2 lines Change debug level for state change message that is not really informative when debugging app_queue ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31Merged revisions 53046 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines Merged revisions 53045 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31Merged revisions 53037 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53037 | russell | 2007-01-31 11:39:28 -0600 (Wed, 31 Jan 2007) | 3 lines Only changed the paused status in an existing queue member if the paused column exists. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-31Merged revisions 53035 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53035 | russell | 2007-01-31 11:34:22 -0600 (Wed, 31 Jan 2007) | 4 lines Instead of always creating a realtime queue member as unpaused, read the "paused" column and use that value for the paused status of the member. (issue #8949, jmls) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-27Merged revisions 52416 via svnmerge from Joshua Colp
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r52416 | file | 2007-01-26 21:13:41 -0500 (Fri, 26 Jan 2007) | 10 lines Merged revisions 52415 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r52415 | file | 2007-01-26 21:09:10 -0500 (Fri, 26 Jan 2007) | 2 lines Make COMPLETECALLER and COMPLETEAGENT output to queue_log follow documentation. (issue #7677 reported by amilcar) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05const-ify some more APIs, and fix rev 49710 from branch-1.4 in a better way hereKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49711 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-05Merged revisions 49676 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r49676 | kpfleming | 2007-01-05 16:16:33 -0600 (Fri, 05 Jan 2007) | 2 lines reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most cases ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-18convert the final clients of ast_build_string to use ast_str_*()Luigi Rizzo
Now the only module left using it is chan_sip.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-17replace ast_build_string() with ast_str_*();Luigi Rizzo
simplify __queues_show() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Resolve some pointer signedness compiler warnings in app_osplookup, andRussell Bryant
constify a bunch of usage strings for CLI commands. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-17Add ability to add custom queue log via manager interface.Jason Parker
Issue 7806, patch by alexrch, with slight modifications by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13Add 'loose' option to joinempty and leavewhenempty which is almost exactly ↵Joshua Colp
like 'strict' except it does not count paused queue members as unavailable. (issue #8263 reported by gnarf) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10Merged revisions 47433 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47433 | kpfleming | 2006-11-10 10:36:49 -0600 (Fri, 10 Nov 2006) | 2 lines if adding a queue member is LOG_NOTICE, then removing them should be LOG_NOTICE, not LOG_DEBUG ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-10Merged revisions 47432 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47432 | kpfleming | 2006-11-10 10:34:04 -0600 (Fri, 10 Nov 2006) | 2 lines reflect addition/removal of dynamic queue members in queue_log, so that people using dialplan replacement for AgentCallbackLogin can still track login/logout (issue #7736, reported/patched by whoiswes but this commit was written by me and covers all three paths for AQM/RQM) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-07%ld and time_t don't match, so cast the argument to longLuigi Rizzo
to ease portability problems git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02Merged revisions 47051 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments" ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 Let's make sure we hold the mutex lock before we go looking at values in ↵BJ Weschke
the queue structure that could potentially be changing while we're running. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-27 * Added option to run macro when a queue member is connected to a caller,BJ Weschke
see queues.conf.sample for details. * Added QUEUE_VARIABLES function to set queue variables added setqueuevar and setqueueentryvar options for each queue, see queues.conf.sample for details. (#8216, jmls reported and submitted) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25Merged revisions 46249 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46249 | russell | 2006-10-25 14:08:18 -0500 (Wed, 25 Oct 2006) | 2 lines update warning message to include "agi" option (issue #8225, jmls) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25Merged revisions 46200 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-04Merged revisions 44378 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44378 | kpfleming | 2006-10-04 14:47:22 -0500 (Wed, 04 Oct 2006) | 4 lines update thread creation code a bit reduce standard thread stack size slightly to allow the pthreads library to allocate the stack+data and not overflow a power-of-2 allocation in the kernel and waste memory/address space add a new stack size for 'background' threads (those that don't handle PBX calls) when LOW_MEMORY is defined ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03Merged revisions 44298 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r44298 | kpfleming | 2006-10-03 15:18:29 -0500 (Tue, 03 Oct 2006) | 10 lines Merged revisions 44296 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r44296 | kpfleming | 2006-10-03 15:14:13 -0500 (Tue, 03 Oct 2006) | 2 lines fix a logic error in my previous fix to the queue reload code ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03Strat becomes Strategy based on feedback from two nameless fellowsJoshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44297 65c4cc65-6c06-0410-ace0-fbb531ad65f3