summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
AgeCommit message (Collapse)Author
2009-06-01Add the ability to execute connected line interception macros.Mark Michelson
When connected line updates are received or generated in the middle of an application call, it is now possible to execute a macro to manipulate the connected line data. This way, phone numbers may be manipulated to be more presentable to users, names may be changed for...whatever reason, or whatever else needs to be done may be. Review: https://reviewboard.asterisk.org/r/256 AST-165 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01Remove extra lock from app_queue.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26Add a missing unref for queues in handle_statechange.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22Implement a new element in AstXML for AMI actions documentation.Eliel C. Sardanons
A new xml element was created to manage the AMI actions documentation, using AstXML. To register a manager action using XML documentation it is now possible using ast_manager_register_xml(). The CLI command 'manager show command' can be used to show the parsed documentation. Example manager xml documentation: <manager name="ami action name" language="en_US"> <synopsis> AMI action synopsis. </synopsis> <syntax> <xi:include xpointer="xpointer(...)" /> <-- for ActionID <parameter name="header1" required="true"> <para>Description</para> </parameter> ... </syntax> <description> <para>AMI action description</para> </description> <see-also> ... </see-also> </manager> git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes: - CLI command handlers - CLI command handler arguments - AGI command handlers - AGI command handler arguments - Dialplan application handler arguments - Speech engine API function arguments In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing. Review: https://reviewboard.asterisk.org/r/251/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18Recorded merge of revisions 195366 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@195370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12Merged revisions 194028 via svnmerge from Matthew Nicholson
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: https://origsvn.digium.com/svn/asterisk/trunk@194057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12add 'const' qualifiers in various places where they should have beenKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-08Reset the members' call counts when resetting queue statistics.Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@193349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-05Fixed crashes from issue8824 review board channel locking changes.Richard Mudgett
The local struct ast_party_connected_line connected_caller variable was uninitialized when the copy function was called. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@192590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29Fix app_queue XML documentation.Russell Bryant
I think it would behoove us to force "make validate-docs" to be run after the XML documentation has been generated if dev-mode is enabled. (closes issue #14989) Reported by: tzafrir Patches: app_queue_xml.diff uploaded by tzafrir (license 46) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27Allow for a position to be specified when entering a queue.Mark Michelson
This would allow for one to add a caller to a specific place in the queue instead of just placing the caller in the back every time. To help facilitate some interesting manipulations, a new channel variable called QUEUEPOSITION has been added. When a caller is removed from a queue, his position in that queue is stored in the QUEUEPOSITION variable. One such strategy an administrator can employ is to allow for the removal of a caller from one queue followed by the insertion of the same caller into a separate queue in the same position. Review: http://reviewboard.digium.com/r/189 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27Update warning message to not have pipes and contain all options.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-23Fix reversed behavior of leavewhenempty option in queues.conf.Mark Michelson
(closes issue #14650) Reported by: alecdavis Patches: 14650.patch uploaded by mmichelson (license 60) Tested by: mmichelson, lmadsen git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@190250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-14Fix a couple of queue member reference leaks.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@188470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-13Set all queue variables on both the caller and member channels.Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@188032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03This commit introduces COLP/CONP and Redirecting party information into ↵Mark Michelson
Asterisk. The channel drivers which have been most heavily tested with these enhancements are chan_sip and chan_misdn. Further work is being done to add Q.SIG support and will be introduced in a later commit. chan_skinny has code added to it here, but according to user pj, the support on chan_skinny is not working as of now. This will be fixed in a later commit. A special thanks goes out to bugtracker user gareth for getting the ball rolling and providing the initial support for this work. Without his initial work on this, this would not have been nearly as painless as it was. This functionality has been tested by Digium's product quality department, as well as a customer site running thousands of calls every day. In addition, many many many many bugtracker users have tested this, too. (closes issue #8824) Reported by: gareth Review: http://reviewboard.digium.com/r/201 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@186525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31Fix trunk's compilation.Mark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31Merged revisions 185599 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@185600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-31Don't free() an astobj2 object.Russell Bryant
(closes issue #14672) Reported by: makoto git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-30Merged revisions 185031 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@185072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27Change global_app_buf to ast_str_thread_global_buf.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@184693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-19Fix a memory leak associated with queues.Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@183244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-13Change faulty comparison used when announcing average hold minutes and secondsMark Michelson
(closes issue #14227) Reported by: caspy git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182121 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12Run the macro on the queue member's channel when he answers, not the ↵Mark Michelson
caller's channel. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-11Fix segfault when dialing a typo'd queueMark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@181244 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03Merged revisions 180006 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@180007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Fix a race condition that caused device states to become incorrect for hints.Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@176557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-13Merge queue-reset branch to AsteriskMark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@175663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11Fix a bit of odd logic for announcing position. Sync with 1.6.0's logicMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-11Fix odd "thank you" sound playing behavior in app_queue.cMark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@174948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05Merged revisions 173692 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@173693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-04Fix some areas where the incorrect interface was passed to ast_device_stateMark Michelson
I swear it feels like I already did this once... (closes issue #14359) Reported by: francesco_r git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-29Fix "cancel answered elsewhere" through app_queue with members in chan_local.Olle Johansson
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: https://origsvn.digium.com/svn/asterisk/trunk@172318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28Add final part of previously committed work for answered elsewhere in queue ↵Olle Johansson
- 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: https://origsvn.digium.com/svn/asterisk/trunk@171924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-27Fix queue crashes that would occur after the calling channel was masqueraded.Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@171618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-21Fix device state parsing issues for channel names with multiple slashesMark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@169611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-20Use the default timeout for a queue instead of -1Mark Michelson
(closes issue #14272) Reported by: timking git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15Add support for setting the Reason header when cancelling a call in the queue Olle Johansson
because someone else answered. Previously, only dial() was supported. EDV-102 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15Merged revisions 168628 via svnmerge from Mark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@168629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13Clarify a message that app_queue prints and change to a debug-level messageMark Michelson
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: https://origsvn.digium.com/svn/asterisk/trunk@168579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08Add the average talk time for a queueMark Michelson
This patch adds the functionality to app_queue of calculating the average amount of time that channels are bridged for a queue. The algorithm used to calculate the average is the same exponential average currently used to calculate the average holdtime. See the CHANGES file to see the methods you may use to view this information. (closes issue #13960) Reported by: coolmig Patches: app_queue.c.diff.trunk-r158840 uploaded by coolmig (license 621) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@167792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-29Update app_queue to deal with the removal of AST_PBX_KEEPALIVEMark Michelson
When placing a call to a queue which ran a gosub on the member's channel, Asterisk would crash every time, stemming from the fact that the member's channel was being hung up unexpectedly when the Gosub completed. The necessary change was pretty much copied and pasted from app_dial's similar changes made last week. I also took the opportunity to change a LOG_DEBUG message in app_dial to use ast_debug. I am guessing this was due to a direct merge from 1.4 that was not corrected to use trunk's preferred syntax. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23Merged revisions 166093 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 In order to merge this 1.4 patch into trunk, I had to resolve some conflicts and wait for Russell to make some changes to res_agi. I re-ran all the tests; 39 calls in all, and made fairly careful notes and comparisons: I don't want this to blow up some aspect of asterisk; I completely removed the KEEPALIVE from the pbx.h decls. The first 3 scenarios involving feature park; feature xfer to 700; hookflash park to Park() app call all behave the same, don't appear to leave hung channels, and no crashes. ........ r166093 | murf | 2008-12-19 15:30:32 -0700 (Fri, 19 Dec 2008) | 131 lines This merges the masqpark branch into 1.4 These changes eliminate the need for (and use of) the KEEPALIVE return code in res_features.c; There are other places that use this result code for similar purposes at a higher level, these appear to be left alone in 1.4, but attacked in trunk. The reason these changes are being made in 1.4, is that parking ends a channel's life, in some situations, and the code in the bridge (and some other places), was not checking the result code properly, and dereferencing the channel pointer, which could lead to memory corruption and crashes. Calling the masq_park function eliminates this danger in higher levels. A series of previous commits have replaced some parking calls with masq_park, but this patch puts them ALL to rest, (except one, purposely left alone because a masquerade is done anyway), and gets rid of the code that tests the KEEPALIVE result, and the NOHANGUP_PEER result codes. While bug 13820 inspired this work, this patch does not solve all the problems mentioned there. I have tested this patch (again) to make sure I have not introduced regressions. Crashes that occurred when a parked party hung up while the parking party was listening to the numbers of the parking stall being assigned, is eliminated. These are the cases where parking code may be activated: 1. Feature one touch (eg. *3) 2. Feature blind xfer to parking lot (eg ##700) 3. Run Park() app from dialplan (eg sip xfer to 700) (eg. dahdi hookflash xfer to 700) 4. Run Park via manager. The interesting testing cases for parking are: I. A calls B, A parks B a. B hangs up while A is getting the numbers announced. b. B hangs up after A gets the announcement, but before the parking time expires c. B waits, time expires, A is redialed, A answers, B and A are connected, after which, B hangs up. d. C picks up B while still in parking lot. II. A calls B, B parks A a. A hangs up while B is getting the numbers announced. b. A hangs up after B gets the announcement, but before the parking time expires c. A waits, time expires, B is redialed, B answers, A and B are connected, after which, A hangs up. d. C picks up A while still in parking lot. Testing this throroughly involves acting all the permutations of I and II, in situations 1,2,3, and 4. Since I added a few more changes (ALL references to KEEPALIVE in the bridge code eliimated (I missed one earlier), I retested most of the above cases, and no crashes. H-extension weirdness. Current h-extension execution is not completely correct for several of the cases. For the case where A calls B, and A parks B, the 'h' exten is run on A's channel as soon as the park is accomplished. This is expected behavior. But when A calls B, and B parks A, this will be current behavior: After B parks A, B is hung up by the system, and the 'h' (hangup) exten gets run, but the channel mentioned will be a derivative of A's... Thus, if A is DAHDI/1, and B is DAHDI/2, the h-extension will be run on channel Parked/DAHDI/1-1<ZOMBIE>, and the start/answer/end info will be those relating to Channel A. And, in the case where A is reconnected to B after the park time expires, when both parties hang up after the joyful reunion, no h-exten will be run at all. In the case where C picks up A from the parking lot, when either A or C hang up, the h-exten will be run for the C channel. CDR's are a separate issue, and not addressed here. As to WHY this strange behavior occurs, the answer lies in the procedure followed to accomplish handing over the channel to the parking manager thread. This procedure is called masquerading. In the process, a duplicate copy of the channel is created, and most of the active data is given to the new copy. The original channel gets its name changed to XXX<ZOMBIE> and keeps the PBX information for the sake of the original thread (preserving its role as a call originator, if it had this role to begin with), while the new channel is without this info and becomes a call target (a "peer"). In this case, the parking lot manager thread is handed the new (masqueraded) channel. It will not run an h-exten on the channel if it hangs up while in the parking lot. The h exten will be run on the original channel instead, in the original thread, after the bridge completes. See bug 13820 for our intentions as to how to clean up the h exten behavior. Review: http://reviewboard.digium.com/r/29/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-18Numerous documentation updates.Joshua Colp
(closes issue #13970) Reported by: pkempgen Patches: __20081217_cli_usage_fixes.patch.txt uploaded by blitzrage (license 10) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17Merged revisions 165255 via svnmerge from Mark Michelson
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines Fix some memory leaks found while looking at how realtime configs are handled. Also cleaned up some coding guidelines violations in app_realtime.c, mostly related to spacing ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Fix a compile warning and a logic error that could have been badMark Michelson
for non-realtime queues git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15Fix up a few issues with regards to queuesMark Michelson
* Fix reference counting used in the __queues_show function * Add code to be sure that the "queue show" command does not print information for a realtime queue which has been deleted from the backend * Add a missing unref to the realtime queue loading function for the case where a queue is in the module's container but has been deleted from the realtime backend (closes issue #14033) Reported by: cristiandimache Patches: 14033.patch uploaded by putnopvut (license 60) Tested by: cristiandimache git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-12When using realtime queues, app_queue wasn't updating the strategy if it was ↵Terry Wilson
changed in the realtime backend. This patch resolves the issue for almost all situations. It is currently not supported to switch to the linear strategy via realtime since the ao2_container for members will have been set to have multiple buckets and therefore the members would be unordered. (closes issue #14034) Reported by: cristiandimache Tested by: otherwiseguy, cristiandimache git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163873 65c4cc65-6c06-0410-ace0-fbb531ad65f3