aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_config.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-20Merged revision 278274 fromrmudgett1-3/+4
https://origsvn.digium.com/svn/asterisk/trunk .......... r278274 | rmudgett | 2010-07-20 17:38:13 -0500 (Tue, 20 Jul 2010) | 1 line Reference correct struct member for unlikely event PRI_EVENT_CONFIG_ERR. .......... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@283123 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-04Parse global variables or expressions in hint extensionsmnick1-6/+20
Parse global variables or expressions in hint extensions. Like: exten => 400,hint,DAHDI/i2/${GLOBAL(var)} (closes issue #16166) Reported by: rmudgett Tested by: mnick, rmudgett git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@233091 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-5/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29Patch to fix tab-completion crash on "remove extension"dbrooks1-90/+5
This patch simply removes some old code back before Asterisk used editline. This fixes the crash that occurred when tab-completing "remove extension". (closes issue #14689) Reported by: isaacgal git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@191096 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-11Fix malloc debug macros to work properly with h323.jpeeler1-5/+5
The main problem here was that cstdlib was undefining free thereby causing the proper debug macros to not be used. ast_h323.cxx has been changed to call ast_free instead to avoid the issue. Because using the ast prefix calls are a better choice, ast_free_ptr is the new wrapper for free to pass to functions. Also, a little bit of clean up was done to avoid the debug macros intentionally being redefined. (closes issue #13593) Reported by: pj git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@181133 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22Allow global variables after substitution to be as long as other variables.tilghman1-0/+4
(closes issue #14263) Reported by: markd Patches: 20090120__bug14263.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@170158 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03somehow missed a bunch of gcc 4.3.x warnings in this branch on the first passkpfleming1-4/+16
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153823 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-19Adjust for technology when generating user extensiondbailey1-1/+1
(issue #13332) Reported by: wizzy Tested by: bkruse git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@143612 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-04Move the free down onetilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@128029 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-04Fix the 'dialplan remove extension' logic, so that it a) works with cidmatch,tilghman1-33/+82
and b) completes contexts correctly when the extension is ambiguous. (closes issue #12980) Reported by: licedey Patches: 20080703__bug12980.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@127973 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff ↵jpeeler1-6/+16
should continue working. Release announcement to follow. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-04Make the "dialplan remove include" CLI command actually work. Also, tweakrussell1-3/+6
some formatting, and make the success message a little bit more clear. (closes AST-52) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120371 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-04Fix a log message and add a message for when the dialplan is done reloading.file1-0/+1
(closes issue #12716) Reported by: chappell Patches: dialplan_reload_2.diff uploaded by chappell (license 8) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120282 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Convert locks of the contexts list in pbx_config to the appropriate rdlock ↵russell1-25/+25
or wrlock git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96024 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is ↵file1-2/+2
enabled. (closes issue #11347) Reported by: ys Patches: pbx.pbx_config.c.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89592 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31closes issue #11108 -- where the 'dialplan save' cli command saves a file ↵murf1-1/+1
where the semicolon is not escaped. Fixed this; User also wanted comments to be preserved across dialplan save, but this is impossible at this point in time, because comments are not stored in the dialplan. They are 'compiled' out of extensions.conf. The only way to preserve those comments is to use the config file reader/writer that the GUI uses to allow online user edits. extensions.conf is first and foremost, a config file, and is read in by the normal config-file reading routines. Then, it is processed into a dialplan (context/exten structs). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87849 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-14Don't create the context for users in users.conf until we know at least one ↵russell1-4/+11
user exists. (closes issue #10971) Reported by: dimas Patches: pbxconfig.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Add a few sanity checks when writing out the dialplan. (issue #10157 ↵file1-2/+2
reported by dome) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@73930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-27Merged revisions 72267 via svnmerge from russell1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72267 | russell | 2007-06-27 16:06:45 -0500 (Wed, 27 Jun 2007) | 5 lines Fix a minor issue with parsing the priority number. You could have as much whitespace as you want around a numeric priority, but you couldn't have any whitespace around a special priority like "n" or "hint". (issue #10039, reported by mitheloc, fixed by me) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@72272 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-11"dialplan save" produced garbage in the config filetilghman1-8/+19
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@68595 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-26Merged revisions 56850 via svnmerge from file1-0/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r56850 | file | 2007-02-26 15:05:02 -0500 (Mon, 26 Feb 2007) | 2 lines Obey the clearglobalvars option in extensions reload (or dialplan reload depending on your version). (issue #9146 reported by ramonpeek) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@56856 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-16Fix setting "autofallthrough" to yes by default. It was set to enabled inrussell1-2/+4
pbx.c. However, if the option was not present in extensions.conf, then pbx_config.c would set it back to disabled. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@54898 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-29Argument number correctiontilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@52679 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
2006-12-30IAX has been deprecated for quite some time so we had better use IAX2 when ↵file1-1/+1
creating the dial string for users. (issue #8697 reported by ssokol) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49073 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-02Missed part of userconf functionality for chan_h323pcadach1-0/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44186 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-3/+3
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18merge qwell's CLI verbification workkpfleming1-106/+925
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-16merge markster's usersconf branch with some slight changeskpfleming1-2/+104
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43052 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31everything that loads a config that needs a config file to runmogorman1-4/+6
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-29Merged revisions 41269 via svnmerge from russell1-18/+13
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r41269 | russell | 2006-08-29 09:33:34 -0400 (Tue, 29 Aug 2006) | 3 lines clean up last commit ... most notably, there is no reason to do heap allocations here, and it also included a potential memory leak ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41270 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Bugfix for 7813 applied to trunk as per patch supplied by stevensmurf1-4/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41267 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-15/+8
- 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-08Merge team/russell/ast_verbose_threadstoragerussell1-10/+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-12Merged revisions 37417 via svnmerge from kpfleming1-4/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r37417 | kpfleming | 2006-07-12 08:18:21 -0500 (Wed, 12 Jul 2006) | 2 lines get rid of some more printf's (although most of these were ifdef-ed out) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37418 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-06-05it's time... only enable global priority jumping if the config file says to ↵kpfleming1-1/+1
do so git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32281 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-09various doxygen fixeskpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26170 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-15/+8
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: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11Merged revisions 19345 via svnmerge from kpfleming1-2/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r19345 | kpfleming | 2006-04-11 16:14:42 -0500 (Tue, 11 Apr 2006) | 2 lines don't destroy the entire dialplan during 'reload', just atomically replace it like 'extensions reload' does (issue #6047) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19346 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06whitespace and formatting fix postponed from last commit:rizzo1-143/+133
fix indentation of a large function, localize some variables and add/remove whitespace where needed. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17827 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06split pbx_load_module so we can reduce the indentation depth.rizzo1-10/+24
Also convert to MOD_1 style. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17825 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-06use FREE instead of free as pointer to the destructor function.rizzo1-1/+1
This way the MALLOC_DEBUG code will always get the correct argument. (bug introduced in SVN15818) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17824 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-29Whitespace fix forgotten by someone who added a note about needing to fix ↵oej1-119/+118
this... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16234 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28as reported in mantis #6066, fix a bunch of cli bugs andrizzo1-898/+627
inconsistencies. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15818 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-24Reverting revision 10998 that was accidentaly committed to trunk. My apologies.oej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10989 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-24Update to trunkoej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10988 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-18constify arguments in more places where strings should not be modified ↵russell1-7/+10
(issue #6286) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8203 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-06Merged revisions 7831 via svnmerge fromtilghman1-4/+4
/branches/1.2 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7832 f38db490-d61c-443f-a65b-d21fe96a405b