aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_features.c
AgeCommit message (Collapse)AuthorFilesLines
2007-02-16Clean up a few coding guidelines issues - spaces to tabs, use sizeof() to passrussell1-9/+9
the size of a static buffer, add spaces ... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54888 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-23this mod from 8593 (dstchannel in cdr is empty when transfer call).murf1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51716 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-16Merged revisions 51145 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r51145 | file | 2007-01-16 12:36:50 -0500 (Tue, 16 Jan 2007) | 2 lines Return previous behavior. ParkedCalls will be able to do DTMF based transfers again. trunk however will get an option to allow this to be set on/off. (issue #8804 reported by nortex) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@51148 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06Save 1 whopping byte of allocated memory!qwell1-1/+1
This looks like it may have been a chicken/egg scenario.. You had to call a cleanup func, because everything was allocated. Then since you had to call a cleanup func, you were forced to allocate - ie; strdup(""). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49742 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-05reduce stack consumption for AMI and AMI/HTTP requests by nearly 20K in most ↵kpfleming1-6/+6
cases git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49676 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-30Merged revisions 48154 via svnmerge from file1-6/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48154 | file | 2006-11-30 14:04:11 -0500 (Thu, 30 Nov 2006) | 2 lines Do not listen for DTMF on the bridge that comes into existence when ParkedCall is executed. This means native bridging can now occur for this. (issue #8406 reported by kebl0155) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@48155 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-07These mods are to solve the problem in bug 7506. It's a lot of rework to ↵murf1-7/+3
solve a fairly small problem... such is life. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47303 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Reverse change of "show" to "list" and make several other commands more ↵tilghman1-1/+1
consistent with "category verb arguments" git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47051 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27Merged revisions 43778 via svnmerge from russell1-5/+7
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r43778 | russell | 2006-09-27 12:54:30 -0400 (Wed, 27 Sep 2006) | 42 lines Fix a problem that occurred if a user entered a digit that matched a bridge feature that was configured using multiple digits, and the digit that was pressed timed out in the feature digit timeout period. For example, if blind transfer is configured as '##', and a user presses just '#'. In this situation, the call would lock up and no longer pass any frames. (issue #7977 reported by festr, and issue #7982 reported by michaels and valuable input provided by mneuhauser and kuj. Fixed by me, with testing help and peer review from Joshua Colp). There are a couple of issues involved in this fix: 1) When ast_generic_bridge determines that there has been a timeout, it returned AST_BRIDGE_RETRY. Then, when ast_channel_bridge gets this result, it calls ast_generic_bridge over again with the same timestamp for the next event. This results in an endless loop of nothing until the call is terminated. This is resolved by simply changing ast_generic_bridge to return AST_BRIDGE_COMPLETE when it sees a timeout. 2) I also changed ast_channel_bridge such that if in the process of calculating the time until the next event, it knows a timeout has already occured, to immediately return AST_BRIDGE_COMPLETE instead of attempting to bridge the channels anyway. 3) In the process of testing the previous two changes, I ran into a problem in res_features where ast_channel_bridge would return because it determined that there was a timeout. However, ast_bridge_call in res_features would then determine by its own calculation that there was still 1 ms before the timeout really occurs. It would then proceed, and since the bridge broke out and did *not* return a frame, it interpreted this as the call was over and hung up the channels. The reason for this was because ast_bridge_call in res_features and ast_channel_bridge in channel.c were using different times for their calculations. channel.c uses the start_time on the bridge config, which is the time that the feature digit was recieved. However, res_features had another time, 'start', which was set right before calling ast_channel_bridge. 'start' will always be slightly after start_time in the bridge config, and sometimes enough to round up to one ms. This is fixed by making ast_bridge_call use the same time as ast_channel_bridge for the timeout calculation. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@43779 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20move ADSI functionality into ast_ namespacekpfleming1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43309 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-10/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31everything that loads a config that needs a config file to runmogorman1-137/+139
now reports AST_MODULE_LOAD_DECLINE when loading if config file is not there, also fixed an error in res_config_pgsql where it had a non static function when it should. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵file1-3/+3
Russell Bryant and the RTP portion done by myself, Muffinlicious Joshua Colp. This has gone through so many discussions/revisions it's not funny but we finally have it! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29add one remaining bit of functionality to the features.conf applicationmap ↵kpfleming1-10/+35
(from Matt Nicholson in Digium Express Services) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41281 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-31/+32
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-20Properly check to see if parkingnum is a number (issue #7762 reported by robf)file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40599 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08Merge team/russell/ast_verbose_threadstoragerussell1-12/+3
- instead of defining a free() wrapper in a bunch of files, define it as ast_free() in utils.h and remove the copies from all the files. - centralize and abstract the code used for doing thread storage. The code lives in threadstorage.h, with one function being implemented in utils.c. This new API includes generic thread storage as well as special functions for handling thread local dynamic length string buffers. - update ast_inet_ntoa() to use the new threadstorage API - update ast_state2str() to use the new threadstorage API - update ast_cli() to use the new threadstorage API - Modify manager_event() to use thread storage. Instead of using a buffer of 4096 characters as the workspace for building the manager event, use a thread local dynamic string. Now there is no length limitation on the length of the body of a manager event. - Significantly simplify the handling of ast_verbose() ... - Instead of using a static char buffer and a lock to make sure only one thread can be using ast_verbose() at a time, use a thread local dynamic string as the workspace for preparing the verbose message. Instead of locking around the entire function, the only locking done now is when the message has been built and is being deliviered to the list of registered verbose message handlers. - This function was doing a strdup() on every message passed to it and keeping a queue of the last 200 messages in memory. This has been completely removed. The only place this was used was that if there were any messages in the verbose queue when a verbose handler was registered, all of the messages in the queue would be fed to it. So, I just made sure that the console verbose handler and the network verbose handler (for remote asterisk consoles) were registered before any verbose messages. pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at startup, but I didn't feel the performance hit of this message queue was worth saving the initial verbose output for these very rarely used modules. - I have removed the last three arguments to the verbose handlers, leaving only the string itself because they aren't needed anymore. For example, ast_verbose had some logic for telling the verbose handler to add a newline if the buffer was completely full. Now that the buffer can grow as needed, this doesn't matter anymore. - remove unused function, ast_verbose_dmesg() which was to dispatch the message queue - Convert the list of verbose handlers to use the linked list macros. - add missing newline characters to a few ast_verbose() calls - convert the list of log channels to use the linked list macros in logger.c - fix close_logger() to close all of the files it opened for logging - update ast_log() to use a thread local dynamic string for its workspace for preparing log messages instead of a buffer of size BUFSIZ (8kB on my system) allocated on the stack. The dynamic string in this case is limited to only growing to a maximum size of BUFSIZ. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07Merge my applicationmap_fixup branch to address the issues described in thisrussell1-68/+88
post to the asterisk-dev mailing list: http://lists.digium.com/pipermail/asterisk-dev/2006-August/022174.html This implements full control over both which channel(s) can activate a dynamic feature, as well as which channel to run the application on. I also updated the documentation on the applicationmap in features.conf.sample in hopes that the configuration is more clear. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39109 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01Merged revisions 38686 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r38686 | kpfleming | 2006-08-01 18:07:06 -0500 (Tue, 01 Aug 2006) | 2 lines ensure that the 'feature digit timeout' value is taken into account when deciding how long the bridge should run (this fixes a problem report where a digit press that did not invoke a feature is never passed across the bridge) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38687 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-27fix seg fault when the parked call that timed out was the last one in the listrussell1-1/+1
of parked calls (fixes issue #7565) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38330 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵kpfleming1-23/+23
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37988 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-26METERMAIDS:oej1-57/+156
----------- - Adding devicestate providers, a new architecture to add non-channel related device state information, like parking lots, queues, meetmes, vending machines and Windows 98 reboots (lots of blinking on those lights) - Adding provider for parking lots, so you can subscribe to the status of a parking lot - Adding provider for meetme, so you can have a blinking lamp for a meetme ( Example: exten => edvina,hint,meetme:1234 ) - Adding support for directed parking - set the PARKINGEXTEN before you manually call Park() and you will be parked on that space. If it's occupied, dialplan execution will continue. This work was sponsored by Voop A/S - www.voop.com git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36055 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-21- Doxygen and some formatting fixes in res_featuresoej1-51/+49
- Get rid of compiler warnings in chan_sip git-svn-id: http://svn.digium.com/svn/asterisk/trunk@35210 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-26attended transfer use transferer context first and set who is transfering at ↵file1-2/+3
the beginning (issue #6752 reported by moy -- minor mods done by myself) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30548 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-23allows for configurable answer timeout on attended transfermogorman1-1/+11
patch 0006763 with minor changes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29766 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-23Merged revisions 29696 via svnmerge from bweschke1-3/+4
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r29696 | bweschke | 2006-05-23 11:58:24 -0400 (Tue, 23 May 2006) | 3 lines Fix a potential leak and correct (hopefully) a segfault under certain conditions. #6784 (vovan and perry testing) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29706 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-22Merged revisions 29512 via svnmerge from file1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r29512 | file | 2006-05-22 17:15:04 -0300 (Mon, 22 May 2006) | 2 lines Use the correct language when playing the transfer sound (issue #7109 reported by casper) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29514 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-22 This is part 2/2 of the patches for #7090. Adds one-step call parking to ↵bweschke1-0/+32
/trunk via builtin functions and 'k' 'K' application options added to app_dial. This also resolves #6340. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29467 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-21Merged revisions 29196 via svnmerge from bweschke1-3/+10
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r29196 | bweschke | 2006-05-21 10:16:59 -0500 (Sun, 21 May 2006) | 3 lines When an application that is executed via applicationmap and exits non-zero, make sure that we pass through the correct return value from the application to make sure a segfault doesn't occur by a bridge trying to continue when it should not. Also, when executing applications via applicationmap, make sure that the application is executed against the channel whose DTMF caused it to be fired off in the first place. (part 1/2 of #7090 - this is the only fix that will be applied to both 1.2 and /trunk) acunningham and blitzrage on testing... ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29197 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-11 - The recent change to linklists.h broke the build on linux for some reason.russell1-2/+1
So, I have removed all of the uses of AST_LIST_HEAD_INIT and replaced them with the equivalent static initializations. - On passing, fix a memory leak in the unload_module() function of chan_agent. The agents list mutex was never destroyed, and the elements in the agents list were not freed. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26990 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().russell1-32/+29
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26451 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-08Incorrect log statement when playing transfer sounds (issue #7008 reported ↵file1-2/+2
and fixed by nathan) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25444 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-03 Correct call parking behavior when there is no courtesytone specified. ↵bweschke1-1/+4
#6306 (murf) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24605 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-29a bunch of conversion to ast_channel_*lock (issue #7058)russell1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23355 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21move wait_and_stream to ast_wait_and_stream() because equivalentrizzo1-32/+12
code is replicated in way too many places not to have a global function for that. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22075 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21comment a possible memory leakrizzo1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21988 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21merge some common code into a functionrizzo1-18/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21986 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-21more NULL / "" equivalence for CID fields.rizzo1-26/+26
Mark an inconsistency in empty string handling. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21819 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-18simplify the flow of builtin_atxfer().rizzo1-111/+106
There is still a lot of similarity with builtin_blindtransfer() which should be removed by definining functions for the common pieces of code (eg in the first part). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21097 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-17- Doxygen formattingoej1-25/+34
Please place a Doxygen todo marker before things that needs to be checked up later by someone - it's like /*! \todo We really need to implement this in C++ */ - option_debug checking before logging to DEBUG channel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20790 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16preparation for reduction of the nesting of a large functionrizzo1-21/+26
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20733 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16more usages of stream_and_waitrizzo1-28/+12
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20707 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16more usages of function 'finishup()'rizzo1-24/+18
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20705 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16one more instance of stream_and_wait, and remove an extrarizzo1-9/+2
'error = 1' line put in by miustake git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20693 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16more replaceemnt of dup code with functions.rizzo1-51/+23
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20678 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16localize several variables, and simplify the last part of park_exec()rizzo1-58/+46
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20653 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16more formatting cleanup including removal of a useless checkrizzo1-7/+6
for f == NULL git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20652 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16rename a variable same as used in a very similar function,rizzo1-10/+10
to reduce code differences. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20627 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-16s/pu->chan/chan in a few places;rizzo1-37/+31
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20626 f38db490-d61c-443f-a65b-d21fe96a405b