aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
AgeCommit message (Collapse)AuthorFilesLines
2007-07-26Do a massive conversion for using the ast_verb() macrorussell1-10/+5
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23You need to put static in front of a static RWLIST declaration to make it ↵file1-2/+1
really static... and don't call AST_RWLIST_HEAD_DESTROY on a statically declared list. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76711 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Enhance AGI with several fixes:tilghman1-170/+194
- Makes the structures handling external AGI commands a bit more thread-safe - Makes AGI transparently work with both live and hungup channels - DeadAGI is hence no longer necessary and is deprecated - CLI bug fixes - Commands will refuse to run if the channel is dead and the command is nonsensical for dead channels. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76707 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Missed one conversion to comma delimiter (thanks, Juggie) and add ↵tilghman1-7/+10
documentation on the change to the Local channel name. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76704 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19(closes issue #10210, reported and patched by juggie)russell1-4/+13
This merges the trunk only part of the patches from this issue. In 1.4, res_agi will issue a warning if you try to use DeadAGI on a channel that is not hung up. Now, in trunk, it just plain won't let you do it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17Merged revisions 75401 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r75401 | russell | 2007-07-17 14:45:07 -0500 (Tue, 17 Jul 2007) | 3 lines Remove a duplicated newline character in AGI debug output. (closes issue #10207, patch by seanbright) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75402 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16It is no longer required for each module that deals with a channel to call ↵file1-1/+0
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-11Code cleanup of res_agifile1-111/+81
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74713 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02After some discussion on the asterisk-dev list, we determined that this approachrussell1-72/+0
for extracting application, function, manager, and agi documentation is the wrong one to take. The most severe problem is that the output depends on which modules are loaded as well as compile time options, which both determine which parts are available. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72986 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Fix up the AGI doc dump CLI command and update the AGI commands tex file to notrussell1-0/+3
include a bunch of empty entries. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72939 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Add a CLI command to export the AGI command docsrussell1-0/+69
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72931 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-02Add a note that the AGI commands array is not handled in a thread-safe wayrussell1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-25Merged revisions 71657 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71657 | tilghman | 2007-06-25 13:14:59 -0500 (Mon, 25 Jun 2007) | 10 lines Merged revisions 71656 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71656 | tilghman | 2007-06-25 13:12:37 -0500 (Mon, 25 Jun 2007) | 2 lines Issue 10035 - handle_exec returns a result inconsistent with all of the other AGI commands ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71658 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-25Minor header inclusion tweak for new usage of stat()file1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Use stat to determine whether the file exists or not. (issue #10038 reported ↵file1-2/+3
by Mike Anikienko) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71158 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-22Merged revisions 71068 via svnmerge from qwell1-15/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r71068 | qwell | 2007-06-22 10:00:30 -0500 (Fri, 22 Jun 2007) | 12 lines Merged revisions 71065 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r71065 | qwell | 2007-06-22 09:52:18 -0500 (Fri, 22 Jun 2007) | 4 lines Fix a few silly usages of ast_playstream() - it only ever returns 0... Issue 10035 ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@71069 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21Expand AGISTATUS variable to include NOTFOUND which is set when the AGI file ↵file1-2/+13
could not be found. (issue #9285 reported by srdjan) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70731 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.russell1-8/+4
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-08Add an option for ControlPlayback to be able to start at an offset fromrussell1-1/+1
the beginning of the file. Also, add a channel variable that indicates the location in the file where the Playback was stopped. (closes issue #7655, patch from sharkey) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68502 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-2/+2
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Merged revisions 67597 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r67597 | file | 2007-06-06 08:34:06 -0400 (Wed, 06 Jun 2007) | 2 lines Make the new "agi debug off" CLI command work. (issue #9890 reported by eliel) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67598 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-20Merged revisions 65250 via svnmerge from file1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r65250 | file | 2007-05-20 13:59:58 -0400 (Sun, 20 May 2007) | 2 lines res_agi needs to export two symbols (ast_agi_register and ast_agi_unregister) for usage by others. (issue #9755 reported by mnicholson) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65253 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-11Add gender support for AGI SAY NUMBER.russell1-4/+3
(issue #9537, patch by chappell) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@63901 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Issue #9068 - make sure we quote HTML characters correctly too (seanbright)oej1-3/+39
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54774 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Merged revisions 54772 via svnmerge from oej1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r54772 | oej | 2007-02-16 12:39:55 +0100 (Fri, 16 Feb 2007) | 10 lines Merged revisions 54771 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r54771 | oej | 2007-02-16 12:38:03 +0100 (Fri, 16 Feb 2007) | 2 lines Issue #9069 - If we open with TH we should not close with /TD. (seanbright) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54773 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-21a quick fix to app_sms.c to get rid of cursed compiler warnings so I can ↵murf1-1/+1
compile under --enable-dev-mode git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48767 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-11Merged revisions 48375 via svnmerge from tilghman1-6/+18
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r48375 | tilghman | 2006-12-10 18:47:21 -0600 (Sun, 10 Dec 2006) | 13 lines Merged revisions 48374 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48374 | tilghman | 2006-12-10 18:33:59 -0600 (Sun, 10 Dec 2006) | 5 lines When doing a fork() and exec(), two problems existed (Issue 8086): 1) Ignored signals stayed ignored after the exec(). 2) Signals could possibly fire between the fork() and exec(), causing Asterisk signal handlers within the child to execute, which caused nasty race conditions. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48376 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06Constify a bunch of usage strings for CLI commands.russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48305 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-04useless cast removal...rizzo1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47187 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Merged revisions 47053 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47053 | tilghman | 2006-11-02 17:49:13 -0600 (Thu, 02 Nov 2006) | 2 lines More changes making the CLI more consistent with "category verb arguments" (continuation of issue 8236) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47054 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-02Merged revisions 47051 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r47051 | tilghman | 2006-11-02 17:00:20 -0600 (Thu, 02 Nov 2006) | 2 lines Reverse change of "show" to "list" and make several other commands more consistent with "category verb arguments" ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-31Merged revisions 46558 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r46558 | russell | 2006-10-31 01:14:13 -0500 (Tue, 31 Oct 2006) | 11 lines Merged revisions 46557 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r46557 | russell | 2006-10-31 01:13:09 -0500 (Tue, 31 Oct 2006) | 3 lines fix some copy/paste bugs in the checking of arguments for the "control stream file" AGI command (issue #8255, mnicholson) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46559 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-27Merged revisions 46363 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46363 | russell | 2006-10-27 12:39:31 -0500 (Fri, 27 Oct 2006) | 5 lines We should always be using _exit() after a fork() or vfork() instead of exit(). This is because exit() does some extra cleanup which in some implementations of vfork(), for example, can actually modify the state of the parent process, causing very weird bugs or crashes. (issue #7971, Nick Gavrikov) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Fix FastAGI to not wait for the non-existant pidmarkster1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46141 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-17As per bug 6779, this patch is now applied to trunk; while I was at it, I ↵murf1-5/+14
corrected a reference to a CLI command, to follow the new regime. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45426 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03bug #8076 check option_debug before printing to debug channel.mogorman1-3/+4
patch provided in bugnote, with minor changes. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-21Lots more removal of deprecated thingstilghman1-27/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43452 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20move more API into the ast_ namespacekpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43310 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-23/+47
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-06Merged revisions 42148 via svnmerge from file1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r42148 | file | 2006-09-06 16:02:59 -0400 (Wed, 06 Sep 2006) | 2 lines Don't close the second file descriptor if it's the same as the first one, as it will have already been closed elsewhere and could cause massive panic. (issue #7699 reported by bn999) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42149 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵file1-0/+2
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-23Merged revisions 40901 via svnmerge from tilghman1-4/+5
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r40901 | tilghman | 2006-08-23 11:05:26 -0500 (Wed, 23 Aug 2006) | 2 lines Revert last change - breaks retrieval of builtin variables ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40904 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-20/+7
- 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-15Merged revisions 39935 via svnmerge from russell1-5/+4
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r39935 | russell | 2006-08-15 18:49:41 -0400 (Tue, 15 Aug 2006) | 3 lines use pbx_builtin_getvar_helper() so that GET VARIABLE can retrieve global variables (issue #7609) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39936 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08Merge team/russell/ast_verbose_threadstoragerussell1-1/+1
- 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-07-20add a verbose message to the AGI command, STREAM FILE, similar to therussell1-1/+9
verbose messages when using Playback, Background, or the GET DATA command (issue #7297, softins) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38021 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵kpfleming1-1/+1
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-07-12Merged revisions 37419 via svnmerge from kpfleming1-5/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37419 | kpfleming | 2006-07-12 08:54:10 -0500 (Wed, 12 Jul 2006) | 2 lines remove some more bad examples of using printf ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37433 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-12Merged revisions 33693 via svnmerge from russell1-1/+0
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r33693 | russell | 2006-06-12 16:40:11 -0400 (Mon, 12 Jun 2006) | 2 lines fix a place where a frame would be free'd twice ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33694 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-12Merged revisions 33615 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r33615 | tilghman | 2006-06-12 10:27:18 -0500 (Mon, 12 Jun 2006) | 4 lines Move set priority up, because at this point in the code, stdout is no longer the console. If we're unable to set priority, the error goes to Asterisk as if it were an AGI command (issue 7335). ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33616 f38db490-d61c-443f-a65b-d21fe96a405b