aboutsummaryrefslogtreecommitdiffstats
path: root/main/features.c
AgeCommit message (Collapse)AuthorFilesLines
2009-09-14Do not attempt to add a parking extension if an error occurred while reading ↵file1-1/+1
the configuration. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@218295 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-02- lock channel before looking for a channel variablemvanbaak1-0/+3
- Init the parkings list member of struct parkinglot. Thanks Sean for the explanation why this should be here. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@215622 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-26Add two new dialplan variables when using featuresjpeeler1-0/+7
Added DYNAMIC_FEATURENAME which holds the last triggered dynamic feature. Added DYNAMIC_PEERNAME which holds the unique channel name on the other side and is set when a dynamic feature is triggered. (closes issue #14663) Reported by: tamiel Patches: 20090313_features.diff uploaded by tamiel (license 712) Tested by: tamiel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@214309 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-20Fix a crash by checking the proper pointer for validity before deferencing it.mnicholson1-1/+1
(closes issue #15751) Reported by: atis Patches: ast_bridge_call_peer_cdr.patch uploaded by atis (license 242) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@213327 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-19Don't blow up on a NULL cdr.russell1-1/+3
Reported in #asterisk-dev. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@213046 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-13/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-04Fix broken call pickupjpeeler1-2/+2
The find_channel_by_group callback was only looking at the channel that was attempting to make the pickup instead of the other channels in the container. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@210302 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-27Fixing typos. Replaces "recieved" with "received" and "initilize" with ↵dbrooks1-1/+1
"initialize" (closes issue #15571) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209098 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-08Fixes Park() argument handlingdbrooks1-8/+21
Park() was not respecting the arguments passed to it. Any extension/context/priority given to it was being ignored. This patch remedies this. (closes issue #15380) Reported by: DLNoah git-svn-id: http://svn.digium.com/svn/asterisk/trunk@205254 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-02Moved trigger for BRIDGE_END CEL event so that it is more accurate.mnicholson1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@204807 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-26Merge the new Channel Event Logging (CEL) subsystem.russell1-8/+62
CEL is the new system for logging channel events. This was inspired after facing many problems trying to represent what is possible to happen to a call in Asterisk using CDR records. For more information on CEL, see the built in HTML or PDF documentation generated from the files in doc/tex/. Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard work developing this code. Also, thanks to Matt Nicholson (mnicholson) and Sean Bright (seanbright) for their assistance in the final push to get this code ready for Asterisk trunk. Review: https://reviewboard.asterisk.org/r/239/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203638 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-25Merged revisions 203375 via svnmerge from russell1-1/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r203375 | russell | 2009-06-25 16:02:18 -0500 (Thu, 25 Jun 2009) | 9 lines Fix a case where CDR answer time could be before the start time involving parking. (closes issue #13794) Reported by: davidw Patches: 13794.patch uploaded by murf (license 17) 13794.patch.160 uploaded by murf (license 17) Tested by: murf, dbrooks ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@203376 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-19Merged revisions 201828 via svnmerge from tilghman1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r201828 | tilghman | 2009-06-18 19:40:41 -0500 (Thu, 18 Jun 2009) | 6 lines If the "h" extension fails, give it another chance in main/pbx.c. If the "h" extension fails, give it another chance in main/pbx.c, when it returns from the bridge code. Fixes an issue where the "h" extension may occasionally not fire, when a Dial is executed from a Macro. Debugged in #asterisk with user tompaw. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@201829 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-15More 'static' qualifiers on module global variables.kpfleming1-7/+7
The 'pglobal' tool is quite handy indeed :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@200620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-02Generic call forward api, ast_call_forward()dvossel1-0/+6
The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string. After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one. I have included this api call in both channel.c's ast_request_and_dial() and feature.c's feature_request_and_dial(). App_dial and app_queue already contain call forward logic specific for their application and options. (closes issue #13630) Reported by: festr Review: https://reviewboard.asterisk.org/r/271/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198856 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01Add the ability to execute connected line interception macros.mmichelson1-7/+52
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: http://svn.digium.com/svn/asterisk/trunk@198727 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-22Implement a new element in AstXML for AMI actions documentation.eliel1-18/+58
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: http://svn.digium.com/svn/asterisk/trunk@196308 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Const-ify the world (or at least a good part of it)kpfleming1-19/+18
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: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21Pass connected line updates along during a bridge.mmichelson1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195992 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-20Merged revisions 195688 via svnmerge from file1-5/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r195688 | file | 2009-05-20 14:30:25 -0300 (Wed, 20 May 2009) | 5 lines Fix some code that wrongly assumed a pointer would always be non-NULL when dealing with CDRs after a bridge. (closes issue #15079) Reported by: barryf ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195698 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-14Fix a typo where an equality check should be an assignment.russell1-1/+1
(closes issue #15103) Reported by: lmsteffan Patches: transfer_crash.patch uploaded by lmsteffan (license 779) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@194477 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-12add 'const' qualifiers in various places where they should have beenkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@193832 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-06Merged revisions 192858 via svnmerge from jpeeler1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r192858 | jpeeler | 2009-05-06 17:15:19 -0500 (Wed, 06 May 2009) | 10 lines Make ParkedCall application stop execution of the dialplan after hang up Just changed park_exec to always return non-zero. I really wasn't entirely sure at first if this was a bug. Decided it was since it would be surprising when not using ParkedCall in the dialplan to hang up and have dialplan execution continue. (closes issue #14555) Reported by: francesco_r ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@192861 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05Fixed crashes from issue8824 review board channel locking changes.rmudgett1-1/+2
The local struct ast_party_connected_line connected_caller variable was uninitialized when the copy function was called. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@192590 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-05Merged revisions 192454 via svnmerge from file1-4/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r192454 | file | 2009-05-05 15:22:27 -0300 (Tue, 05 May 2009) | 8 lines Fix an incorrect assumption that certain values on the channel will always exist when they may not. The CDR code involved with bridges wrongly assumed that the currently executing application and data values will always exist. It is possible for this to be false when call forwarding is involved. (closes issue #14984) Reported by: gincantalupo ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@192462 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-24Convert the ast_channel data structure over to the astobj2 framework.russell1-85/+116
There is a lot that could be said about this, but the patch is a big improvement for performance, stability, code maintainability, and ease of future code development. The channel list is no longer an unsorted linked list. The main container for channels is an astobj2 hash table. All of the code related to searching for channels or iterating active channels has been rewritten. Let n be the number of active channels. Iterating the channel list has gone from O(n^2) to O(n). Searching for a channel by name went from O(n) to O(1). Searching for a channel by extension is still O(n), but uses a new method for doing so, which is more efficient. The ast_channel object is now a reference counted object. The benefits here are plentiful. Some benefits directly related to issues in the previous code include: 1) When threads other than the channel thread owning a channel wanted access to a channel, it had to hold the lock on it to ensure that it didn't go away. This is no longer a requirement. Holding a reference is sufficient. 2) There are places that now require less dealing with channel locks. 3) There are places where channel locks are held for much shorter periods of time. 4) There are places where dealing with more than one channel at a time becomes _MUCH_ easier. ChanSpy is a great example of this. Writing code in the future that deals with multiple channels will be much easier. Some additional information regarding channel locking and reference count handling can be found in channel.h, where a new section has been added that discusses some of the rules associated with it. Mark Michelson also assisted with the development of this patch. He did the conversion of ChanSpy and introduced a new API, ast_autochan, which makes it much easier to deal with holding on to a channel pointer for an extended period of time and having it get automatically updated if the channel gets masqueraded. Mark was also a huge help in the code review process. Thanks to David Vossel for his assistance with this branch, as well. David did the conversion of the DAHDIScan application by making it become a wrapper for ChanSpy internally. The changes come from the svn/asterisk/team/russell/ast_channel_ao2 branch. Review: http://reviewboard.digium.com/r/203/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@190423 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-22Fix call parking callback. Pipes -> Commas.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@189951 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-10Modify headers and macros, according to Russell's suggestions on the -dev listtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187599 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08Add timer for features so that backup bridge config can go awayjpeeler1-45/+19
The biggest change done here was elimination of the backup_config for use with features. Previously, the bridging code upon detecting a feature would set the start time of the bridge to the start time of the feature. Then after the feature had either expired or timed out the start time would be reset to the true bridge start time from the backup_config. Now, the time differences are calculated with respect to the newly added feature_start_time timeval instead. There should be no behavior changes from the previous functionality aside from the bridge timing being unaffected by either valid or partial feature matches. Previously the timing would be increased by the length of time configured for featuredigittimeout, which was probably never noticed. (closes issue #14503) Reported by: KNK Tested by: jpeeler Review: http://reviewboard.digium.com/r/179/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@187211 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03This commit introduces COLP/CONP and Redirecting party information into ↵mmichelson1-1/+60
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: http://svn.digium.com/svn/asterisk/trunk@186525 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183386 via svnmerge from dvossel1-6/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183386 | dvossel | 2009-03-19 14:40:07 -0500 (Thu, 19 Mar 2009) | 6 lines Cleaning up a few things in detect disconnect patch Initialized ast_call_feature in detect_disconnect to avoid accessing uninitialized memory. Cleaned up /param tags in features.h. No longer send dynamic features in ast_feature_detect. issue #11583 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183436 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183126 via svnmerge from dvossel1-41/+80
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r183126 | dvossel | 2009-03-19 11:15:16 -0500 (Thu, 19 Mar 2009) | 17 lines Allow disconnect feature before a call is bridged feature.conf has a disconnect option. By default this option is set to '*', but it could be anything. If a user wishes to disconnect a call before the other side answers, only '*' will work, regardless if the disconnect option is set to something else. This is because features are unavailable until bridging takes place. The default disconnect option, '*', was hardcoded in app_dial, which doesn't make any sense from a user perspective since they may expect it to be something different. This patch allows features to be detected from outside of the bridge, but not operated on. In this case, the disconnect feature can be detected before briding and handled outside of features.c. (closes issue #11583) Reported by: sobomax Patches: patch-apps__app_dial.c uploaded by sobomax (license 359) 11583.latest-patch uploaded by murf (license 17) detect_disconnect.diff uploaded by dvossel (license 671) Tested by: sobomax, dvossel Review: http://reviewboard.digium.com/r/195/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@183172 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-17Improve behavior of ast_answer() to not lose incoming frameskpfleming1-2/+5
ast_answer(), when supplied a delay before returning to the caller, use ast_safe_sleep() to implement the delay. Unfortunately during this time any incoming frames are discarded, which is problematic for T.38 re-INVITES and other sorts of channel operations. When a delay is not passed to ast_answer(), it still delays for up to 500 milliseconds, waiting for media to arrive. Again, though, it discards any control frames, or non-voice media frames. This patch rectifies this situation, by storing all incoming frames during the delay period on a list, and then requeuing them onto the channel before returning to the caller. http://reviewboard.digium.com/r/196/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182525 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Remove ast_ prefix from functions which are not public.mmichelson1-19/+19
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182071 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-13Merged revisions 181990 via svnmerge from mmichelson1-6/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r181990 | mmichelson | 2009-03-13 12:12:32 -0500 (Fri, 13 Mar 2009) | 35 lines Check the DYNAMIC_FEATURES of both the chan and peer when interpreting DTMF. Dynamic features defined in the applicationmap section of features.conf allow one to specify whether the caller, callee, or both have the ability to use the feature. The documentation in the features.conf.sample file could be interpreted to mean that one only needs to set the DYNAMIC_FEATURES channel variable on the calling channel in order to allow for the callee to be able to use the features which he should have permission to use. However, the DYNAMIC_FEATURES variable would only be read from the channel of the participant that pressed the DTMF sequence to activate the feature. The result of this was that the callee was unable to use dynamic features unless the dialplan writer had taken measures to be sure that the DYNAMIC_FEATURES variable was set on the callee's channel. This commit changes the behavior of ast_feature_interpret to concatenate the values of DYNAMIC_FEATURES from both parties involved in the bridge. The features themselves determine who has permission to use them, so there is no reason to believe that one side of the bridge could gain the ability to perform an action that they should not have the ability to perform. Kevin Fleming pointed out on the asterisk-users list that the typical way that this was worked around in the past was by setting _DYNAMIC_FEATURES on the calling channel so that the value would be inherited by the called channel. While this works, the documentation alone is not enough to figure out why this is necessary for the callee to be able to use dynamic features. In this particular case, changing the code to match the documentation is safe, easy, and will generally make things easier for people for future installations. This bug was originally reported on the asterisk-users list by David Ruggles. (closes issue #14657) Reported by: mmichelson Patches: 14657.patch uploaded by mmichelson (license 60) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182029 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Fix malloc debug macros to work properly with h323.jpeeler1-1/+1
The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. A few other issues were addressed: - There were a few instances of functions improperly passing ast_free instead of ast_free_ptr. - Some clean up was done to avoid the debug macros intentionally being redefined. (copied below from Kevin's commit, appreciate the help) - disable astmm.h from doing anything when STANDALONE is defined, which is used by the tools in the utils/ directory that use parts of Asterisk header files in hackish ways; also ensure that utils/extconf.c and utils/conf2ael.c are compiled with STANDALONE defined. (closes issue #13593) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181135 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03Merged revisions 179840 via svnmerge from file1-2/+7
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r179840 | file | 2009-03-03 14:27:09 -0400 (Tue, 03 Mar 2009) | 9 lines Do not assume that the bridge_cdr is still attached to the channel when the 'h' exten is finished executing. It is possible for a masquerade operation to occur when the 'h' exten is operating. This operation moves the CDR records around causing the bridge_cdr to no longer exist on the channel where it is expected to. We can not safely modify it afterwards because of this, so don't even try. (closes issue #14564) Reported by: meric ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179841 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-27Merged revisions 178956 via svnmerge from murf1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 In this case, it's just a matter of reducing the default timeouts from 2000 to 1000 msec, as the max def feature digit timeout is no longer halved. ........ r178956 | murf | 2009-02-26 14:27:32 -0700 (Thu, 26 Feb 2009) | 18 lines This change moves the default feature digit timeout to 1000 ms from the previous default of 500. As per bug 14515, a dev discussion arrived at a "mediated concensus" of a default feature digit timeout of 1.0 sec. Some voted for 1300; ctooley thought 1500 for distracted phone users in phone booths; kpfleming put his foot down at 1.0 sec. Users who found the previous default max delay of 250 msec perfect, are welcome to override the new default. Notice that I said that 250 msec was the default; wait a minute, you might say, the config file said it was 500 msec!; well, because of the bug fix for 14515, we found that 500 msec was actually enforcing a max of 250. The bug fix would restore 500 msec, but we felt even that was a bit tight for most users... 2000 msec was pushed earlier by mmichelson, so that reduces to 1000 msec after the bug fix. Enjoy! ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178986 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26Sound confirmation of call pickup success.tilghman1-0/+14
(closes issue #13826) Reported by: azielke Patches: pickupsound2-trunk.patch uploaded by azielke (license 548) __20081124_bug_13826_updated.patch uploaded by lmadsen (license 10) Tested by: lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178919 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-26Merged revisions 178804 via svnmerge from murf1-2/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r178804 | murf | 2009-02-26 10:09:03 -0700 (Thu, 26 Feb 2009) | 28 lines This patch prevents the feature detection timeout from being cut in half. Because the ast_channel_bridge() call will return 0 and pass a frame pointer for both DTMF_BEGIN and DTMF_END, the feature_timer field in hte config struct is getting decremented twice, which effectively cuts the digittimeout in half. I added conditions to the if statement to only let DTMF_END frames to flow thru, which solved the problem. Also, when the frame pointer is null, let control flow thru-- this usually happens on timeouts. I added a comment to the code to explain what's going on and why. Many thanks to sodom for reporting this problem. Personnally, it always seemed like something was wrong with the featuredigittimeout, but I never could quite decide what... and was too busy to investigate. This bug forced the issue, and now we know. Sodom had other issues in 14515, but I couldn't reproduce them. If he still has problems, and wants to get them solved, he is welcome to reopen 14515. (closes issue #14515) Reported by: sodom Patches: 14515.patch uploaded by murf (license 17) Tested by: murf, sodom ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@178828 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19Fix mismerge from revision 176708 pointed out by Kaloyan Kovachev on thejpeeler1-1/+0
asterisk-dev mailing list. Thanks! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177356 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18Locking issue in action_bridge and bridge_execdvossel1-30/+45
action_bridge() and bridge_exec() both search for the channels to bridge to, and then immediately drop the lock. Instead, they should hold the lock until the masquerade is complete. This will guarantee the channel remains and prevent any other weirdness from occurring. In action_bridge() some more weirdness comes into play. Both channels are needlessly locked at the same time and perform the exact same logic. It makes sense from a coding organizational standpoint, but could cause a theoretical deadlock so I split the code up. There is an issue associated with this, but since its a rather complicated thing to reproduce I'm not certain this alone will close it. issue# 14296 Review: http://reviewboard.digium.com/r/167/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177226 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17Merged revisions 176701 via svnmerge from jpeeler1-0/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r176701 | jpeeler | 2009-02-17 15:54:34 -0600 (Tue, 17 Feb 2009) | 17 lines Modify bridging to properly evaluate DTMF after first warning is played The main problem is currently if the Dial flag L is used with a warning sound, DTMF is not evaluated after the first warning sound. To fix this, a flag has been added in ast_generic_bridge for playing the warning which ensures that if a scheduled warning is missed, multiple warrnings are not played back (due to a feature evaluation or waiting for digits). ast_channel_bridge was modified to store the nexteventts in the ast_bridge_config structure as that information was lost every time ast_channel_bridge was reentered, causing a hangup due to incorrect time calculations. (closes issue #14315) Reported by: tim_ringenbach Reviewed on reviewboard: http://reviewboard.digium.com/r/163/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176708 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12Merged revisions 175294 via svnmerge from jpeeler1-1/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175294 | jpeeler | 2009-02-12 14:34:36 -0600 (Thu, 12 Feb 2009) | 9 lines Fix ParkedCall event information for From field in the case of a blind transfer If the parker information can not be obtained from the peer, try and see if the BLINDTRANSFER channel variable has been set. Previously, a blind transfer to the ParkAndAnnounce app would return nothing for the From. Closes AST-189 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175298 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-12Merged revisions 175187 via svnmerge from jpeeler1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r175187 | jpeeler | 2009-02-12 11:57:10 -0600 (Thu, 12 Feb 2009) | 6 lines Fix crash in event of failed attempt to transfer to parking The peer may not necessarily exist, such as in the case of a transfer to ParkAndAnnounce. In this case don't try to play a sound to it. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@175188 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173211 via svnmerge from jpeeler1-49/+75
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173211 | jpeeler | 2009-02-03 15:57:01 -0600 (Tue, 03 Feb 2009) | 17 lines Parking attempts made to one end of a bridge no longer will hang up due to a parking failure. Parking attempts made using either one-touch, or doing either a blind or assisted transfer to the parking extension now keep up the bridge instead of hanging up the attempted parked party. Normal causes for the parking attempt to fail includes the specific specified extension (via PARKINGEXTEN) not being available or if all the parking spaces are currently in use. To avoid having to reverse a masquerade park_space_reserve was made to provide foresight if a parking attempt will succeed and if so reserve the parking space. (closes issue #13494) Reported by: mdu113 Reviewed by Russell: http://reviewboard.digium.com/r/133/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173500 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02Merged revisions 173066 via svnmerge from twilson1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r173066 | twilson | 2009-02-02 17:48:06 -0600 (Mon, 02 Feb 2009) | 2 lines Fix a feature inheritance bug I added after code review ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@173067 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02This reverts the changes I made for 11583; willmurf1-84/+46
reviewboard this before committing again... reopened 11583 until all Russell's issues are resolved. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172929 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-02This change allows the disconnect feature (as in "one-touch" in features.c)murf1-46/+84
to be used within the dial app, before a call is bridged. Many thanks to sobomax for submitting this patch. Quoting from bug 11582: "So the goal of the patch was to use the user configured feature code during the call setup phase. The original ast_feature_interpret() function is not well suited for this purpose as it uses much call bridge specific data and doesn't separate a detection of feature from a feature handler call. So a new function ast_feature_detect() has been extracted off the ast_feature_interpret() function but keeping the original logic intact except some insignificant changes to locking. "Having created the ast_feature_detect() function the possibility to use feature detection in almost any place of the asterisk code. So a call to this function has been added to wait_for_answer() function of app_dial.so module. This code doesn't call the feature handler however and uses old call leg disconnect logic to make the changes as small and simple as possible to prevent unexpected problems. A disconnect feature currently is the only one supported during call setup as other features as call parking and call transfer don't make much sense during call setup. However if need in some of the features would arise it is much easier to implement as the infrastructure changes are already in place with this patch." I have cleaned up the patch somewhat, and verified that the existing functionality is not harmed, and that the new functionality works. Terry has committed his stuff, and there were no conflicts (see 14274). (closes issue #11583) Reported by: sobomax Patches: patch-apps__app_dial.c uploaded by sobomax (license 359) patch-include__asterisk__features.h uploaded by sobomax (license 359) patch-res__res_features.c uploaded by sobomax (license 359) enable-features-during-call-setup.diff uploaded by sobomax (license 359) 11583.newdiff uploaded by murf (license 17) enable-features-during-call-setup-1.diff uploaded by sobomax (license 359) 11583.latest-patch uploaded by murf (license 17) Tested by: sobomax, murf git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172890 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-30Merged revisions 172517 via svnmerge from twilson1-15/+266
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r172517 | twilson | 2009-01-30 11:47:41 -0600 (Fri, 30 Jan 2009) | 37 lines Fix feature inheritance with builtin features When using builtin features like parking and transfers, the AST_FEATURE_* flags would not be set correctly for all instances when either performing a builtin attended transfer, or parking a call and getting the timeout callback. Also, there was no way on a per-call basis to specify what features someone should have on picking up a parked call (since that doesn't involve the Dial() command). There was a global option for setting whether or not all users who pickup a parked call should have AST_FEATURE_REDIRECT set, but nothing for DISCONNECT, AUTOMON, or PARKCALL. This patch: 1) adds the BRIDGE_FEATURES dialplan variable which can be set either in the dialplan or with setvar in channels that support it. This variable can be set to any combination of 't', 'k', 'w', and 'h' (case insensitive matching of the equivalent dial options), to set what features should be activated on this channel. The patch moves the setting of the features datastores into the bridging code instead of app_dial to help facilitate this. 2) adds global options parkedcallparking, parkedcallhangup, and parkedcallrecording to be similar to the parkedcalltransfers option for globally setting features. 3) has builtin_atxfer call builtin_parkcall if being transfered to the parking extension since tracking everything through multiple masquerades, etc. is difficult and error-prone 4) attempts to fix all cases of return calls from parking and completed builtin transfers not having the correct permissions (closes issue #14274) Reported by: aragon Patches: fix_feature_inheritence.diff.txt uploaded by otherwiseguy (license 396) Tested by: aragon, otherwiseguy Review http://reviewboard.digium.com/r/138/ ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172580 f38db490-d61c-443f-a65b-d21fe96a405b