summaryrefslogtreecommitdiff
path: root/apps/app_stack.c
AgeCommit message (Collapse)Author
2009-12-23AGI may be invoked from outside the dialplanTilghman Lesher
(closes issue #16510) Reported by: atis Patches: 20091223__issue16510.diff.txt uploaded by tilghman (license 14) Tested by: atis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@236300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-10When GOSUB is invoked within an AGI, it may not exit correctly.Tilghman Lesher
(closes issue #16216) Reported by: atis Patches: 20091110__atis_work.diff.txt uploaded by tilghman (license 14) Tested by: atis git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@229351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10AST-2009-005Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-09Check for NULL frame, before dereferencing pointer.Tilghman Lesher
(closes issue #15617) Reported by: rain git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-06Allow Gosub to recognize quote delimiters without consuming them.Tilghman Lesher
(closes issue #15557) Reported by: rain Patches: 20090723__issue15557.diff.txt uploaded by tilghman (license 14) Tested by: rain Review: https://reviewboard.asterisk.org/r/316/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@210908 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15Last batch of 'static' qualifiers for module-level global variables.Kevin P. Fleming
Fix up modules in the 'apps' directory, and also correct the bad example of enum definitions in include/asterisk/app.h, which many developers followed (thanks for reading the documentation!). In addition, add some basic usage examples of the 'pahole' and 'pglobal' tools to the coding guidelines. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15Redesigned 'optional API' support.Kevin P. Fleming
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-06Move AGI command 'gosub' static documentation to XML.Eliel C. Sardanons
Move AGI command 'gosub' statis documentation to the new AstXML form. (issue #15245) Reported by: eliel Patches: app_stack_static_conversion.txt uploaded by lmadsen (license 10) (with minor changes by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20If a variable had a blank value upon the initial setting, then it would do ↵Tilghman Lesher
nothing. Identified by Dmitry Andrianov via private email, fixed by me. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-12add 'const' qualifiers in various places where they should have beenKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10Fix0ring buildTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-10Remove the usage of the KeepAlive app, as it no longer exists.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-031. Make OS X compile cleanly with app_stack.Tilghman Lesher
2. Use curl to download sound files, as curl is installed natively on OS X, whereas wget and fetch are not. (closes issue #14332) Reported by: oej Tested by: Corydon76 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@173130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05If the autoloop flag is set on a channel, then we need to Mark Michelson
add 1 to the priority when checking if the extension exists. Otherwise, gosubs will fail. This was discovered when investigating an asterisk-users mailing list post made by Gary Hawkins. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03Add some safety measures when using gosub, especially when using the optionsMark Michelson
for app_dial and app_queue to run a gosub when the call is answered. * Check for the existence of the gosub target in gosub_exec. If it is nonexistent, then this will cause errors when we attempt to actually run the gosub, including a definite memory leak and potential crashes. Return an error in this situation * Check the return value of pbx_exec in app_dial and app_queue before attempting to actually run the gosub routine. If there was an error, we should not attempt to run the gosub. * Change a '|' to a ',' in app_queue. * Add some extra curly braces where they had been missing previously. (closes issue #13548) Reported by: fiddur git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03- Avoid setting .synopsis and .syntax if we are using XML documentation (or theEliel C. Sardanons
xml documentation wont be loaded). - Use <variable></variable> to refer to a dialplan variable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02Add LOCAL_PEEK function, as requested by lmadsen.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26improve handling of API calls provided by loaded modules through use of some ↵Kevin P. Fleming
GCC features; this makes app_stack's usage of AGI APIs even cleaner, and will allow it to work 'as expected' either with or without res_agi being loaded reviewed at http://reviewboard.digium.com/r/62 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19make some corrections to the ast_agi_register_multiple(), ↵Kevin P. Fleming
ast_agi_unregister_multiple() and ast_agi_fdprintf() API calls to be consistent with API guidelines also, move UPGRADE.txt to UPGRADE-1.6.txt and make the new UPGRADE.txt contain information about upgrading between Asterisk 1.6 releases git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-05- Add more <see-also> based on TFOT.Eliel C. Sardanons
- Add the 'filename' type to the see-also ref. To be able to reference a filename. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-03Add LOCAL() function XML documentation.Eliel C. Sardanons
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02instead of trying to forcibly load res_agi when app_stack is loaded (even if ↵Kevin P. Fleming
the administrator didn't want it loaded), use GCC weak symbols to determine whether it was loaded already or not; if it was loaded, then use it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵Kevin P. Fleming
branch, and add the ones needed for all the new code here too git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01Merge changes from team/group/appdocsxmlRussell Bryant
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27Set ARGC in subroutines with the number of arguments passed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27Oops, only delete the ARG variables once upon release. The following sectionTilghman Lesher
would have removed them again (removing variables from 2 stack frames, instead of just one). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-15building this module depends on res_agi being built as wellKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-05make datastore creation and destruction a generic API since it is not really ↵Kevin P. Fleming
channel related, and add the ability to add/find/remove datastores to manager sessions git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@135680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16(closes issue #12689)Steve Murphy
Reported by: ys Many thanks to ys for doing the research on this problem. I didn't think it would be best to unlock the contexts and then relock them after the remove_extension2() call, so I added an extra arg to remove_extension2() and set it appropriately in each call. There were not that many. I considered forcing the code to lock the contexts before the call to remove_extension2(), but that would require a slightly greater degree of changes, especially since the find_context_locked is local to pbx.c I did a simple sanity test to make sure the code doesn't mess things up in general. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-05Conditionally load the AGI command gosub, depending on whether or not res_agiTilghman Lesher
has been loaded, fix a return value in the loader, and ensure that the help workhorse header does not print on load. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@120602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30Suppress warning about pbx structure already existingTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30Add native AGI command GOSUB, as invoking Gosub with EXEC does not workTilghman Lesher
properly. (closes issue #12760) Reported by: Corydon76 Patches: 20080530__bug12760.diff.txt uploaded by Corydon76 (license 14) Tested by: tim_ringenbach, Corydon76 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@119296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-30Lock around variables retrieved, and copy the values, if they stay persistent,Tilghman Lesher
since another thread could remove them. (closes issue #12541) Reported by: snuffy Patches: bug_12156_apps.diff uploaded by snuffy (license 35) Several additional changes by me git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10Several manager changes:Tilghman Lesher
1) Add the Dialplan class, for NewExten and VarSet events, which should cut down on the volume of traffic in the Call class. 2) Permit some commands to be run from multiple classes, such as allowing DBGet to be run from either the System or the Reporting class. 3) Heavily document each class in the sample config, as there were several that made no sense to be in the write= line, and two that made no sense to be in the read= line (since they controlled no permissions there). (Closes issue #10386) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22shuffle a little bit the content of header files to reduce dependencies.Luigi Rizzo
In this commit: - move the ast_register/unregister_app functions to module.h to avoid the need to include pbx.h for the simpler apps; - move the ast_group structure to channel.h to remove the dependency of app.h on linkedlists.h Note, this is a long process that I am doing in small steps. The main difficulty is that now for each subsystem we have a single header (e.g. channel.h) included by the subsystem provider (usually one file, e.g. channel.c) and by its clients (dozens of them, e.g. we have some 70+ apps and 30+ functions). This requires the clients to include all the extra headers required by the provider (eg. lock.h, linkedlists.h, definitions of substructures...) even though many of the clients would be just happy with opaque struct declarations and function prototypes. The long term plan is to eventually rectify this structure so that the compilation can become faster, and also APIs are more stable. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89522 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22more removal of redundant headersLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove another set of redundant #include "asterisk/options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyLuigi Rizzo
were included almost everywhere. Remove some of the instances. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06"show application <foo>" changes for clarity.Mark Michelson
(closes issue #11171, reported and patched by blitzrage) Many thanks! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵Tilghman Lesher
few other formatting cleanups, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16Applications no longer need to call ast_module_user_add and ↵Joshua Colp
ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16It is no longer required for each module that deals with a channel to call ↵Joshua Colp
ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20Oops, shouldn't have taken that last shortcut (also add some checks)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20Another method of doing local variables, hopefully a little closer to what ↵Tilghman Lesher
codefreeze had in mind git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20Local variables for codefreezeTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@70253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.Russell Bryant
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-30Issue 9477 - Improve menuselect labelsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-06Debug control, debug control.Olle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58054 65c4cc65-6c06-0410-ace0-fbb531ad65f3