summaryrefslogtreecommitdiff
path: root/res/res_agi.c
AgeCommit message (Collapse)Author
2006-10-24Fix FastAGI to not wait for the non-existant pidMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46141 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-17As per bug 6779, this patch is now applied to trunk; while I was at it, I ↵Steve Murphy
corrected a reference to a CLI command, to follow the new regime. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03bug #8076 check option_debug before printing to debug channel.Matt O'Gorman
patch provided in bugnote, with minor changes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21Lots more removal of deprecated thingsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20move more API into the ast_ namespaceKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18merge qwell's CLI verbification workKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-06Merged revisions 42148 via svnmerge from Joshua Colp
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: https://origsvn.digium.com/svn/asterisk/trunk@42149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31Merge in VLDTMF support with Zaptel/Core done by the ever great Darumkilla ↵Joshua Colp
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: https://origsvn.digium.com/svn/asterisk/trunk@41507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-23Merged revisions 40901 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@40904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-15Merged revisions 39935 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@39936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-08Merge team/russell/ast_verbose_threadstorageRussell Bryant
- 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: https://origsvn.digium.com/svn/asterisk/trunk@39272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-20add a verbose message to the AGI command, STREAM FILE, similar to theRussell Bryant
verbose messages when using Playback, Background, or the GET DATA command (issue #7297, softins) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19merge Russell's 'hold_handling' branch, finally implementing music-on-hold ↵Kevin P. Fleming
handling the way it was decided at AstriDevCon Europe 2006 (and the way people really want it to be) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-12Merged revisions 37419 via svnmerge from Kevin P. Fleming
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: https://origsvn.digium.com/svn/asterisk/trunk@37433 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12Merged revisions 33693 via svnmerge from Russell Bryant
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: https://origsvn.digium.com/svn/asterisk/trunk@33694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-12Merged revisions 33615 via svnmerge from Tilghman Lesher
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: https://origsvn.digium.com/svn/asterisk/trunk@33616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵Kevin P. Fleming
again :-) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-31Merged revisions 31194 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r31194 | russell | 2006-05-31 19:50:00 -0400 (Wed, 31 May 2006) | 3 lines if the connection to a FastAGI server fails because of a timeout, log a more informative log message ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-26Add the video stream for AGI function STREAM FILE (issue #5392 reported by ↵Joshua Colp
areski -- minor mods by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25allow setting a channel variable to disable sending SIGHUP to the AGI processRussell Bryant
(issue #6491, original patch by juggie, channel variable patch by corydon, committed patch modified to change variable name and update documentation) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25Add the ability to retrieve the exit code of the forked AGI process. If thereRussell Bryant
is an error executing the AGI script, or the AGI script itself returns a non-zero value, the AGISTATUS variable will now be set to FAILURE instead of SUCCESS. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-25- add support for setting an AGISTATUS variable that indicates successfulRussell Bryant
execution, failure, or if the channel requested hangup. - only return -1 from the application if the application requested hangup. If there was just a failure in execution of the AGI, just set the status variable appropriately and move on in the dialplan. (issue #7121, original patch by Alessandro Polverini, updated patch by srt, committed patch is heavily modified to allow still returning -1 on hangup) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-24Merged revisions 29973 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r29973 | kpfleming | 2006-05-24 11:59:20 -0500 (Wed, 24 May 2006) | 2 lines support video recording via AGI 'RECORD FILE' command (issue #7068) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18revert bogus changeKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-18Add missing argument to ast_carefulwriteOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@28393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10remove almost all of the checks of the result from ast_strdupa() or alloca().Russell Bryant
As it turns out, all of these checks were useless, because alloca will never return NULL. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05move ast_carefulwrite from manager.c to utils.c so that cli.c andRussell Bryant
res_agi.c no longer depend on manager.h (issue #6397, casper) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25026 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29a bunch of conversion to ast_channel_*lock (issue #7058)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21more NULL "" equivalence in cid fields.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21835 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15We are shaking up trunk tonight! allow data dir to be specified (issue #6967 ↵Joshua Colp
reported by tzafrir) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14This rather large commit changes the way modules are loaded. Luigi Rizzo
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11normalize code in preparation to module changesLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08a few cleanups from the last commitKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08since the module API is changing, it's a good time to const-ify the ↵Kevin P. Fleming
description() and key() return values git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06normalize repeated instances of code as follows:Luigi Rizzo
- if (res >= 0) - return RESULT_SUCCESS; - else - return RESULT_FAILURE; + return (res >= 0) ? RESULT_SUCCESS : RESULT_FAILURE; (we should probably create a macro for this, #define RET(r) ((r) >= 0) ? RESULT_SUCCESS : RESULT_FAILURE) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30as discussed with Mark a few weeks ago, the 'newstack' argumentLuigi Rizzo
in pbx_exec is always 1 so it can be removed. This change also takes away ast_exec_extension(), and lets all switch functions (exists, canmatch, exec, matchmore) all use the same prototype, which makes the code a bit cleaner. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-28Merged revisions 11382 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11382 | russell | 2006-02-28 13:31:04 -0500 (Tue, 28 Feb 2006) | 2 lines add a missing newline in the agi app description (thanks wunderkin!) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@11383 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23add 'consumed' argument to ast_get_time_t, so callers can know how many ↵Kevin P. Fleming
characters were used in the parser update pbx_dundi to use ast_get_time_t eliminate some compiler warnings git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15remove the uses of the deprecated STANDARD_LOCAL_USERRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15Merged revisions 10021,10108 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r10108 | kpfleming | 2006-02-14 18:36:57 -0600 (Tue, 14 Feb 2006) | 2 lines ensure that FastAGI launcher can handle system call interruption (issue #6449) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15add API function for parsing strings to time_t (issue #6320, with mods)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12major dialplan functions updateKevin P. Fleming
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01use string fields for some stuff in ast_channelKevin P. Fleming
const-ify some more APIs remove 'type' field from ast_channel, in favor of the one in the channel's tech structure allow string field module users to specify the 'chunk size' for pool allocations update chan_alsa to be compatible with recent const-ification patches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01reports why an agi script errors out on openingMatt O'Gorman
file git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-21Bug 4872 - Make Asterisk paths available to AGIs via environmental variablesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30update doxygen docs to specify authorsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-20- move the string join() function to utils.c since it is used in both cli.c ↵Russell Bryant
and res_agi.c - reimplement ast_join to be of linear effieciency instead of quadratic - remove some useless checks for "if (e)" - reorder checks for strings starting with '_' to avoid a useless call to ast_join() - check array bounds when parsing arguments to AGI (issue #5868) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-08issue #5648Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7011 65c4cc65-6c06-0410-ace0-fbb531ad65f3