aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/features.h
AgeCommit message (Collapse)AuthorFilesLines
2009-03-19Merged revisions 183436 via svnmerge from dvossel1-1/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r183436 | dvossel | 2009-03-19 15:30:39 -0500 (Thu, 19 Mar 2009) | 13 lines Merged revisions 183386 via svnmerge from 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/branches/1.6.1@183438 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-19Merged revisions 183172 via svnmerge from dvossel1-9/+20
https://origsvn.digium.com/svn/asterisk/trunk ................ r183172 | dvossel | 2009-03-19 11:28:33 -0500 (Thu, 19 Mar 2009) | 20 lines Merged revisions 183126 via svnmerge from 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/branches/1.6.1@183198 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-04Merged revisions 173500 via svnmerge from jpeeler1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r173500 | jpeeler | 2009-02-04 15:17:53 -0600 (Wed, 04 Feb 2009) | 23 lines Merged revisions 173211 via svnmerge from 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/branches/1.6.1@173505 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-24Merged revisions 166665 via svnmerge from murf1-5/+0
https://origsvn.digium.com/svn/asterisk/trunk This merged from trunk with no conflicts. I tested mostly the 'tired' cases, and for the most part ignored the tests for reconnecting and dialing in to fetch a parked call, after the first case. ................ r166665 | murf | 2008-12-23 11:13:49 -0700 (Tue, 23 Dec 2008) | 153 lines Merged revisions 166093 via svnmerge from 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: http://svn.digium.com/svn/asterisk/branches/1.6.1@166730 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02Merged revisions 153652 via svnmerge from russell1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r153652 | russell | 2008-11-02 14:06:03 -0600 (Sun, 02 Nov 2008) | 10 lines Merged revisions 153651 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r153651 | russell | 2008-11-02 13:51:17 -0600 (Sun, 02 Nov 2008) | 2 lines features.h depends on linkedlists.h, so include it ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@153653 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29Merged revisions 152536 via svnmerge from murf1-8/+9
https://origsvn.digium.com/svn/asterisk/trunk ................ r152536 | murf | 2008-10-28 23:01:00 -0600 (Tue, 28 Oct 2008) | 57 lines Merged revisions 152535 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines The magic trick to avoid this crash is not to try to find the channel by name in the list, which is slow and resource consuming, but rather to pay attention to the result codes from the ast_bridge_call, to which I added the AST_PBX_NO_HANGUP_PEER_PARKED value, which now are returned when a channel is parked. Why? because CDR's aren't generated via parking, so nothing is needed, but if a transfer occurred, there are critical things I need. If you get AST_PBX_KEEPALIVE, then don't touch the channel pointer. If you get AST_PBX_NO_HANGUP_PEER, or AST_PBX_NO_HANGUP_PEER_PARKED, then don't touch the peer pointer. Updated the several places where the results from a bridge were not being properly obeyed, and fixed some code I had introduced so that the results of the bridge were not overridden (in trunk). All the places that previously tested for AST_PBX_NO_HANGUP_PEER now have to check for both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED. I tested this against the 4 common parking scenarios: 1. A calls B; B answers; A parks B; B hangs up while A is getting the parking slot announcement, immediately after being put on hold. 2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but before the park times out. 3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold. 4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out. No crash. I also ran the scenarios above against valgrind, and accesses looked good. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@152537 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Merged revisions 146923 via svnmerge from jpeeler1-0/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r146923 | jpeeler | 2008-10-06 18:08:21 -0500 (Mon, 06 Oct 2008) | 3 lines Similar to r143204, masquerade the channel in the case of Park being called from AGI. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@146924 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-08Move AST_FEATURE_FLAG_* and FEATURE_RETURN_* to features.h so that they can ↵qwell1-0/+21
be used by modules. (closes issue #12384) Reported by: fnordian Patches: features.patch uploaded by fnordian (license 110) (patch modified by me, to give FEATURE_RETURN_* an AST_ prefix) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113452 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-23Move code from res_features into (new file) main/features.cqwell1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@100039 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-05Doxygen cleanups/fixes.qwell1-2/+4
Closes issue #10654, patch by snuffy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@81560 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23Merged revisions 80573 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80573 | russell | 2007-08-23 15:16:41 -0500 (Thu, 23 Aug 2007) | 5 lines When executing a dynamic feature, don't look it up a second time by digit pattern after we already looked it up by name. This causes broken behavior if there is more than one feature defined with the same digit pattern. (closes issue #10539, reported by bungalow, patch by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80574 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-07Add another big set of doxygen documentation improvements from snuffy.russell1-19/+25
(closes issue #9892) (closes issue #10395) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵murf1-1/+1
universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵murf1-1/+1
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Constify the return values of ast_parking_ext() and ast_pickup_ext()russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67853 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-08I noted this on the dev list but got no response, so I just did it myself.russell1-1/+4
Lock the call features when being used in chan_sip. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63447 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04a small upgrade to the coding standard, and an update to the code that ↵murf1-2/+2
triggered the upgrade. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63048 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-04Added a small bit of code to support the SNOM 360's Record button. Made the ↵murf1-0/+4
find_feature func in res_features.c public, so I could use it to find the automon dial sequence as configured by the user. When the INFO packet has a Record: header with on/off, the sequence is sent as consecutive DTMF frames on the phone's channel, triggering the automon functionality. The user has to configure the automon in features.conf, and set up his dialplan accordingly. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63046 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29add one remaining bit of functionality to the features.conf applicationmap ↵kpfleming1-0/+2
(from Matt Nicholson in Digium Express Services) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41281 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-31remove useless 'extern' in function declarations.rizzo1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16611 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-13/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.kpfleming1-9/+15
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6454 f38db490-d61c-443f-a65b-d21fe96a405b
2005-08-23add ability to map feature sequences to applications (issue #3764)kpfleming1-0/+32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6374 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-15Repair // comments to /* */ comments (bug #3347)markster1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4806 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-17Oops, make that ast_featuresmarkster1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3468 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-17Fix the name :)markster1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3467 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-17rename "parking" to "features" in preparation for some more (possibly post ↵markster1-0/+54
1.0) feature additions git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3463 f38db490-d61c-443f-a65b-d21fe96a405b