summaryrefslogtreecommitdiff
path: root/main/config_options.c
AgeCommit message (Collapse)Author
2018-03-17aco: Use ast_cli_completion_add for 'config show help'.Corey Farrell
In addition this removes: * RAII_VAR usage * Duplicate check of pos * Unneeded arguments. Change-Id: I2da8eac2670d1d8d6474c04037129804f55ebf39
2018-01-04aco: Fix NULL dereference in error path.Corey Farrell
Change-Id: Id505167cf0f9414a3c144fa2c1e181a2cf288694
2018-01-02aco: Add missing aco_option_type_string for OPT_TIMELEN_T.Corey Farrell
ASTERISK-27117 Change-Id: I8f6c34bb30830be9f7a40823723eb4dcaaa91c61
2017-12-15aco: Create ways to minimize use of regex.Corey Farrell
ACO uses regex in many situations where it is completely unneeded. In some cases this doubles the total processing performed by aco_process_config. * Create ACO_IGNORE category type for use in place of skip_category regex source string. * Create additional aco_category_op values to allow specifying category filter using either a single plain string or a NULL terminated array of plain strings. * Create ACO_PREFIX to allow matching option names to case insensitive prefixes. Change-Id: I66a920dcd8e2b0301f73f968016440a985e72821
2017-12-01config: Speed up ACO & sorcery initializationSean Bright
When starting Asterisk in the foreground, there is a perceptible delay when loading modules that use the ACO and sorcery config frameworks. For example, a lightly configured res_pjsip took 853ms to load on my VM. I tracked down the slowness to the XPath queries used to associate the relevant documentation with the config options. One improvement was adding a call to xmlXPathOrderDocElems after loading an XML document. From the libxml2 docs: Call this routine to speed up XPath computation on static documents. The second change was to remove recursive descent and wildcard operators from the XPath queries. After these changes, res_pjsip takes 85ms to load on my VM and there is no longer a perceptible delay when starting Asterisk in the foreground. Change-Id: I45d457f1580e26bf5a2b0dab16e8e9ae46dcbd82
2017-10-25Build System: Fix --disable-xmldoc option.Corey Farrell
The configure option to disable XML documentation does not currently work. This patch makes it effective, but also causes an ABI change by removing the ast_xmldoc_* symbols. Disabling xmldoc also prevents docs from being automatically generated, but they can still be manually generated with 'make doc/core-en_US.xml'. ASTERISK-26639 Change-Id: Ifac562340c09f80c83e0203de098fcac93bf8c44
2017-07-13core: Add PARSE_TIMELEN support to ast_parse_arg and ACO.Corey Farrell
This adds support for parsing timelen values from config files. This includes support for all flags which apply to PARSE_INT32. Support for this parser is added to ACO via the OPT_TIMELEN_T option type. Fixes an issue where extra characters provided to ast_app_parse_timelen were ignored, they now cause an error. Testing is included. ASTERISK-27117 #close Change-Id: I6b333feca7e3f83b4ef5bf2636fc0fd613742554
2017-05-04app_confbridge: Fix reference to cfg in menu_template_handlerGeorge Joseph
menu_template_handler wasn't properly accounting for the fact that it might be called both during a load/reload (which isn't really valid but not prevented) and by a dialplan function. In both cases it was attempting to use the "pending" config which wasn't valid in the latter case. aco_process_config is also partly to blame because it wasn't properly cleaning "pending" up when a reload was done and no changes were made. Both of these contributed to a crash if CONFBRIDGE(menu,template) was called in a dialplan after a reload. * aco_process_config now sets info->internal->pending to NULL after it unrefs it although this isn't strictly necessary in the context of this fix. * menu_template_handler now uses the "current" config and silently ignores any attempt to be called as a result of someone uses the "template" parameter in the conf file. Luckily there's no other place in the codebase where aco_pending_config is used outside of aco_process_config. ASTERISK-25506 #close Reported-by: Frederic LE FOLL Change-Id: Ib349a17d3d088f092480b19addd7122fcaac21a7
2016-10-27Remove ASTERISK_REGISTER_FILE.Corey Farrell
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
2016-06-22Fix Alembic upgrades.Mark Michelson
A non-existent constraint was being referenced in the upgrade script. This patch corrects the problem by removing the reference. In addition, the head of the alembic branch referred to a non-existent revision. This has been fixed by referring to the proper revision. This patch fixes another realtime problem as well. Our Alembic scripts store booleans as yes or no values. However, Sorcery tries to insert "true" or "false" instead. This patch introduces a new boolean type that translates to "yes" or "no" instead. ASTERISK-26128 #close Change-Id: I51574736a881189de695a824883a18d66a52dcef
2016-05-04config_options.c: Expand #ifdef to contain whole if statement.Chris Trobridge
ASTERISK-25956 #close Change-Id: If6961ec54be276d5ab4f012ee7e7b420cb45de38
2016-03-24config: fix flags in uint option handlerGianluca Merlo
The configuration unsigned integer option handler sets flags for the parser as if the option should be a signed integer (PARSE_INT32), leading to errors on "out of range" values. Fix flags (PARSE_UINT32). A fix to res_pjsip is also present which stops invalid flags from being passed when registering sorcery object fields for qualify status. ASTERISK-25612 #close Change-Id: I96b539336275e0e72a8e8033487d2c3344debd3e
2016-01-28Merge "config: Allow options to register when documentation is unavailable."Mark Michelson
2016-01-28config_options.c: Fix warning message wording.Richard Mudgett
Change-Id: I915ea437936320393afde0e7552cf0a980a6b2e4
2016-01-26config: Allow options to register when documentation is unavailable.Joshua Colp
The config options framework is strict in that configuration options must be documented unless XML documentation support is not available. In practice this is useful as it ensures documentation exists however in off-nominal cases this can cause strange problems. If it is expected that a config option has a non-zero or non-empty default value but the config option documentation is unavailable this reasonable expectation will not be met. This can cause obscure crashes and weirdness depending on how the code handles it. This change tweaks the behavior to ensure that the config option is still allowed to register, apply default values, and be set when devmode is not enabled. If devmode is enabled then the option can NOT be set. This also does not remove the initial documentation error message that is output on load when registering the configuration option. ASTERISK-25725 #close Change-Id: Iec42fca6b35f31326c33fcdc25473f6fd7bc8af8
2015-09-11main/config_options: Check for existance of internal object before derefingMatt Jordan
Asterisk can load and register an object type while still having an invalid sorcery mapping. This can cause an issue when a creation call is invoked. For example, mis-configuring PJSIP's endpoint identifier by IP address mapping in sorcery.conf will cause the sorcery mechanism to be invalidated; however, a subsequent ARI invocation to create the object will cause a crash, as the internal type may not be registered as sorcery expects. Merely checking for a NULL pointer here solves the issue. Change-Id: I54079fb94a1440992f4735a9a1bbf1abb1c601ac
2015-04-13git migration: Refactor the ASTERISK_FILE_VERSION macroMatt Jordan
Git does not support the ability to replace a token with a version string during check-in. While it does have support for replacing a token on clone, this is somewhat sub-optimal: the token is replaced with the object hash, which is not particularly easy for human consumption. What's more, in practice, the source file version was often not terribly useful. Generally, when triaging bugs, the overall version of Asterisk is far more useful than an individual SVN version of a file. As a result, this patch removes Asterisk's support for showing source file versions. Specifically, it does the following: * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and remove passing the version in with the macro. Other facilities than 'core show file version' make use of the file names, such as setting a debug level only on a specific file. As such, the act of registering source files with the Asterisk core still has use. The macro rename now reflects the new macro purpose. * main/asterisk: - Refactor the file_version structure to reflect that it no longer tracks a version field. - Remove the "core show file version" CLI command. Without the file version, it is no longer useful. - Remove the ast_file_version_find function. The file version is no longer tracked. - Rename ast_register_file_version/ast_unregister_file_version to ast_register_file/ast_unregister_file, respectively. * main/manager: Remove value from the Version key of the ModuleCheck Action. The actual key itself has not been removed, as doing so would absolutely constitute a backwards incompatible change. However, since the file version is no longer tracked, there is no need to attempt to include it in the Version key. * UPGRADE: Add notes for: - Modification to the ModuleCheck AMI Action - Removal of the "core show file version" CLI command Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-03-26Replace most uses of ast_register_atexit with ast_register_cleanup.Corey Farrell
Since 'core stop now' and 'core restart now' do not stop modules, it is unsafe for most of the core to run cleanups. Originally all cleanups used ast_register_atexit, and were only changed when it was shown to be unsafe. ast_register_atexit is now used only when absolutely required to prevent corruption and close child processes. Exceptions that need to use ast_register_atexit: * CDR: Flush records. * res_musiconhold: Kill external applications. * AstDB: Close the DB. * canary_exit: Kill canary process. ASTERISK-24142 #close Reported by: David Brillert ASTERISK-24683 #close Reported by: Peter Katzmann ASTERISK-24805 #close Reported by: Badalian Vyacheslav ASTERISK-24881 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4500/ Review: https://reviewboard.asterisk.org/r/4501/ ........ Merged revisions 433495 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433497 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433498 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24AMI: Allow for command response documentationKinsey Moore
Allow for responses to AMI actions/commands to be documented properly in XML and displayed via the CLI. Response events are documented exactly as standard AMI events are documented. Review: https://reviewboard.asterisk.org/r/3812/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-20media formats: re-architect handling of media for performance improvementsMatthew Jordan
In the old times media formats were represented using a bit field. This was fast but had a few limitations. 1. Asterisk was limited in how many formats it could handle. 2. Formats, being a bit field, could not include any attribute information. A format was strictly its type, e.g., "this is ulaw". This was changed in Asterisk 10 (see https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal for notes on that work) which led to the creation of the ast_format structure. This structure allowed Asterisk to handle attributes and bundle information with a format. Additionally, ast_format_cap was created to act as a container for multiple formats that, together, formed the capability of some entity. Another mechanism was added to allow logic to be registered which performed format attribute negotiation. Everywhere throughout the codebase Asterisk was changed to use this strategy. Unfortunately, in software, there is no free lunch. These new capabilities came at a cost. Performance analysis and profiling showed that we spend an inordinate amount of time comparing, copying, and generally manipulating formats and their related structures. Basic prototyping has shown that a reasonably large performance improvement could be made in this area. This patch is the result of that project, which overhauled the media format architecture and its usage in Asterisk to improve performance. Generally, the new philosophy for handling formats is as follows: * The ast_format structure is reference counted. This removed a large amount of the memory allocations and copying that was done in prior versions. * In order to prevent race conditions while keeping things performant, the ast_format structure is immutable by convention and lock-free. Violate this tenet at your peril! * Because formats are reference counted, codecs are also reference counted. The Asterisk core generally provides built-in codecs and caches the ast_format structures created to represent them. Generally, to prevent inordinate amounts of module reference bumping, codecs and formats can be added at run-time but cannot be removed. * All compatibility with the bit field representation of codecs/formats has been moved to a compatibility API. The primary user of this representation is chan_iax2, which must continue to maintain its bit-field usage of formats for interoperability concerns. * When a format is negotiated with attributes, or when a format cannot be represented by one of the cached formats, a new format object is created or cloned from an existing format. That format may have the same codec underlying it, but is a different format than a version of the format with different attributes or without attributes. * While formats are reference counted objects, the reference count maintained on the format should be manipulated with care. Formats are generally cached and will persist for the lifetime of Asterisk and do not explicitly need to have their lifetime modified. An exception to this is when the user of a format does not know where the format came from *and* the user may outlive the provider of the format. This occurs, for example, when a format is read from a channel: the channel may have a format with attributes (hence, non-cached) and the user of the format may last longer than the channel (if the reference to the channel is released prior to the format's reference). For more information on this work, see the API design notes: https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite Finally, this work was the culmination of a large number of developer's efforts. Extra thanks goes to Corey Farrell, who took on a large amount of the work in the Asterisk core, chan_sip, and was an invaluable resource in peer reviews throughout this project. There were a substantial number of patches contributed during this work; the following issues/patch names simply reflect some of the work (and will cause the release scripts to give attribution to the individuals who work on them). Reviews: https://reviewboard.asterisk.org/r/3814 https://reviewboard.asterisk.org/r/3808 https://reviewboard.asterisk.org/r/3805 https://reviewboard.asterisk.org/r/3803 https://reviewboard.asterisk.org/r/3801 https://reviewboard.asterisk.org/r/3798 https://reviewboard.asterisk.org/r/3800 https://reviewboard.asterisk.org/r/3794 https://reviewboard.asterisk.org/r/3793 https://reviewboard.asterisk.org/r/3792 https://reviewboard.asterisk.org/r/3791 https://reviewboard.asterisk.org/r/3790 https://reviewboard.asterisk.org/r/3789 https://reviewboard.asterisk.org/r/3788 https://reviewboard.asterisk.org/r/3787 https://reviewboard.asterisk.org/r/3786 https://reviewboard.asterisk.org/r/3784 https://reviewboard.asterisk.org/r/3783 https://reviewboard.asterisk.org/r/3778 https://reviewboard.asterisk.org/r/3774 https://reviewboard.asterisk.org/r/3775 https://reviewboard.asterisk.org/r/3772 https://reviewboard.asterisk.org/r/3761 https://reviewboard.asterisk.org/r/3754 https://reviewboard.asterisk.org/r/3753 https://reviewboard.asterisk.org/r/3751 https://reviewboard.asterisk.org/r/3750 https://reviewboard.asterisk.org/r/3748 https://reviewboard.asterisk.org/r/3747 https://reviewboard.asterisk.org/r/3746 https://reviewboard.asterisk.org/r/3742 https://reviewboard.asterisk.org/r/3740 https://reviewboard.asterisk.org/r/3739 https://reviewboard.asterisk.org/r/3738 https://reviewboard.asterisk.org/r/3737 https://reviewboard.asterisk.org/r/3736 https://reviewboard.asterisk.org/r/3734 https://reviewboard.asterisk.org/r/3722 https://reviewboard.asterisk.org/r/3713 https://reviewboard.asterisk.org/r/3703 https://reviewboard.asterisk.org/r/3689 https://reviewboard.asterisk.org/r/3687 https://reviewboard.asterisk.org/r/3674 https://reviewboard.asterisk.org/r/3671 https://reviewboard.asterisk.org/r/3667 https://reviewboard.asterisk.org/r/3665 https://reviewboard.asterisk.org/r/3625 https://reviewboard.asterisk.org/r/3602 https://reviewboard.asterisk.org/r/3519 https://reviewboard.asterisk.org/r/3518 https://reviewboard.asterisk.org/r/3516 https://reviewboard.asterisk.org/r/3515 https://reviewboard.asterisk.org/r/3512 https://reviewboard.asterisk.org/r/3506 https://reviewboard.asterisk.org/r/3413 https://reviewboard.asterisk.org/r/3410 https://reviewboard.asterisk.org/r/3387 https://reviewboard.asterisk.org/r/3388 https://reviewboard.asterisk.org/r/3389 https://reviewboard.asterisk.org/r/3390 https://reviewboard.asterisk.org/r/3321 https://reviewboard.asterisk.org/r/3320 https://reviewboard.asterisk.org/r/3319 https://reviewboard.asterisk.org/r/3318 https://reviewboard.asterisk.org/r/3266 https://reviewboard.asterisk.org/r/3265 https://reviewboard.asterisk.org/r/3234 https://reviewboard.asterisk.org/r/3178 ASTERISK-23114 #close Reported by: mjordan media_formats_translation_core.diff uploaded by kharwell (License 6464) rb3506.diff uploaded by mjordan (License 6283) media_format_app_file.diff uploaded by kharwell (License 6464) misc-2.diff uploaded by file (License 5000) chan_mild-3.diff uploaded by file (License 5000) chan_obscure.diff uploaded by file (License 5000) jingle.diff uploaded by file (License 5000) funcs.diff uploaded by file (License 5000) formats.diff uploaded by file (License 5000) core.diff uploaded by file (License 5000) bridges.diff uploaded by file (License 5000) mf-codecs-2.diff uploaded by file (License 5000) mf-app_fax.diff uploaded by file (License 5000) mf-apps-3.diff uploaded by file (License 5000) media-formats-3.diff uploaded by file (License 5000) ASTERISK-23715 rb3713.patch uploaded by coreyfarrell (License 5909) rb3689.patch uploaded by mjordan (License 6283) ASTERISK-23957 rb3722.patch uploaded by mjordan (License 6283) mf-attributes-3.diff uploaded by file (License 5000) ASTERISK-23958 Tested by: jrose rb3822.patch uploaded by coreyfarrell (License 5909) rb3800.patch uploaded by jrose (License 6182) chan_sip.diff uploaded by mjordan (License 6283) rb3747.patch uploaded by jrose (License 6182) ASTERISK-23959 #close Tested by: sgriepentrog, mjordan, coreyfarrell sip_cleanup.diff uploaded by opticron (License 6273) chan_sip_caps.diff uploaded by mjordan (License 6283) rb3751.patch uploaded by coreyfarrell (License 5909) chan_sip-3.diff uploaded by file (License 5000) ASTERISK-23960 #close Tested by: opticron direct_media.diff uploaded by opticron (License 6273) pjsip-direct-media.diff uploaded by file (License 5000) format_cap_remove.diff uploaded by opticron (License 6273) media_format_fixes.diff uploaded by opticron (License 6273) chan_pjsip-2.diff uploaded by file (License 5000) ASTERISK-23966 #close Tested by: rmudgett rb3803.patch uploaded by rmudgetti (License 5621) chan_dahdi.diff uploaded by file (License 5000) ASTERISK-24064 #close Tested by: coreyfarrell, mjordan, opticron, file, rmudgett, sgriepentrog, jrose rb3814.patch uploaded by rmudgett (License 5621) moh_cleanup.diff uploaded by opticron (License 6273) bridge_leak.diff uploaded by opticron (License 6273) translate.diff uploaded by file (License 5000) rb3795.patch uploaded by rmudgett (License 5621) tls_fix.diff uploaded by mjordan (License 6283) fax-mf-fix-2.diff uploaded by file (License 5000) rtp_transfer_stuff uploaded by mjordan (License 6283) rb3787.patch uploaded by rmudgett (License 5621) media-formats-explicit-translate-format-3.diff uploaded by file (License 5000) format_cache_case_fix.diff uploaded by opticron (License 6273) rb3774.patch uploaded by rmudgett (License 5621) rb3775.patch uploaded by rmudgett (License 5621) rtp_engine_fix.diff uploaded by opticron (License 6273) rtp_crash_fix.diff uploaded by opticron (License 6273) rb3753.patch uploaded by mjordan (License 6283) rb3750.patch uploaded by mjordan (License 6283) rb3748.patch uploaded by rmudgett (License 5621) media_format_fixes.diff uploaded by opticron (License 6273) rb3740.patch uploaded by mjordan (License 6283) rb3739.patch uploaded by mjordan (License 6283) rb3734.patch uploaded by mjordan (License 6283) rb3689.patch uploaded by mjordan (License 6283) rb3674.patch uploaded by coreyfarrell (License 5909) rb3671.patch uploaded by coreyfarrell (License 5909) rb3667.patch uploaded by coreyfarrell (License 5909) rb3665.patch uploaded by mjordan (License 6283) rb3625.patch uploaded by coreyfarrell (License 5909) rb3602.patch uploaded by coreyfarrell (License 5909) format_compatibility-2.diff uploaded by file (License 5000) core.diff uploaded by file (License 5000) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messagesMatthew Jordan
This patch addresses some aesthetic issues in Asterisk. These are all just minor tweaks to improve the look of the CLI when used in a variety of settings. Specifically: * A number of chatty verbose messages were removed or demoted to DEBUG messages. Verbose messages with a verbosity level of 5 or higher were - if kept as verbose messages - demoted to level 4. Several messages that were emitted at verbose level 3 were demoted to 4, as announcement of dialplan applications being executed occur at level 3 (and so the effects of those applications should generally be less). * Some verbose messages that only appear when their respective 'debug' options are enabled were bumped up to always be displayed. * Prefix/timestamping of verbose messages were moved to the verboser handlers. This was done to prevent duplication of prefixes when the timestamp option (-T) is used with the CLI. * Verbose magic is removed from messages before being emitted to non-verboser handlers. This prevents the magic in multi-line verbose messages (such as SIP debug traces or the output of DumpChan) from being written to files. * _Slightly_ better support for the "light background" option (-W) was added. This includes using ast_term_quit in the output of XML documentation help, as well as changing the "Asterisk Ready" prompt to bright green on the default background (which stands a better chance of being displayed properly than bright white). Review: https://reviewboard.asterisk.org/r/3547/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Allow Asterisk to compile under GCC 4.10Kinsey Moore
This resolves a large number of compiler warnings from GCC 4.10 which cause the build to fail under dev mode. The vast majority are signed/unsigned mismatches in printf-style format strings. ........ Merged revisions 413586 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413587 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413588 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-07config_options: Display the see-also information for CLI config option helpMatthew Jordan
The config option help information has always parsed the <see-also> tags in the XML documentation. Unfortunately, it just never bothered displaying them on the CLI. With this patch, when you execute 'config show help [module] [obj] [option]', it will display what other options are useful to you. (closes issue ASTERISK-22008) Reported by: Richard Mudgett ........ Merged revisions 410209 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-20Ensure global types in the config framework are initializedKinsey Moore
If a config object was allocated but one of its global objects was never encountered, then the global object's defaults were never applied. Ensure that global objects are initialized properly upon allocation instead of on configuration. Review: https://reviewboard.asterisk.org/r/2866/ ........ Merged revisions 399564 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399565 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-18Make config framework able to reload module configs with multiple config files.Richard Mudgett
The config framework is supposed to be able to load configs that come from multiple config files. The principle example is chan_sip's sip.conf and users.conf. Unfortunately, it only does this correctly on initial load. This patch causes the module's config to be reloaded entirely if any of the config files change. (closes issue ASTERISK-22009) Reported by: Richard Mudgett Review: https://reviewboard.asterisk.org/r/2859/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399352 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30features_config: Ignore parkinglots in features.conf instead of failing to loadJonathan Rose
Parkinglots are defined in res_features.conf now, but this patch fixes features_config so that features don't fail to load when parkinglots are present in features.conf Review: https://reviewboard.asterisk.org/r/2801/ ........ Merged revisions 398068 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-29Memory leaks fixKevin Harwell
(closes ASTERISK-22376) Reported by: John Hardin Patches: memleak.patch uploaded by jhardin (license 6512) memleak2.patch uploaded by jhardin (license 6512) ........ Merged revisions 397946 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-25Fix the config_options_testMatthew Jordan
The config options test requires the entire configuration item to be transparent from the documentation system. So we let it do that too. As an aside, please do not use this power for evil. Documentation is your friend, and you really should document your configurations. Hiding your module's configuration information from the system attempting to enforce some sanity in the universe is something only a Bond villain would contemplate. ........ Merged revisions 397628 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Add the bucket API.Joshua Colp
Bucket is a URI based API for the creation, retrieval, updating, and deletion of "buckets" and files contained within them. Review: https://reviewboard.asterisk.org/r/2715/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Prevent seg fault in off nominal path when registered option fails to validateMatthew Jordan
If an option is registered to a type and it is the last known type in the list of registered types, and the option fails to register, an overrun of the types array can occur due to the index variable having been already incremented. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23Update config framework/sorcery with types/options without documentationMatthew Jordan
There are times when a configuration option should not have documentation. 1. Some options are registered with a particular object merely as a warning to users. These options aren't even really 'deprecated' - which has its own separate API call - they are actually provided by a different configuration file. The options are merely registered so that the user gets a warning that a different configuration file provides the item. 2. Some object types - most notably some used by modules that use sorcery - are completely internal and should never be shown to the user. 3. Sorcery itself has several 'hidden' fields that should never be shown to a user. This patch updates the configuration framework and sorcery with additional API calls that allow a module to register types as internal and options as not requiring documentation. This bypasses the XML documentation checking. This patch also re-enables the strict XML documentation checking in trunk, as well as updates some documentation that was missing. Review: https://reviewboard.asterisk.org/r/2785/ (closes issue ASTERISK-22359) Reported by: Matt Jordan (closes issue ASTERISK-22112) Reported by: Rusty Newton git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397524 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-15Changed some BUGBUG tags to associated JIRA issue tags.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03Add BUGBUG note for ASTERISK-22009Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03Revert accidental overcommit.Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-03Add BUGBUG note for ASTERISK-22009Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-27Add config framework non-empty string validation requirement option.Richard Mudgett
Add config framework OPT_CHAR_ARRAY_T and OPT_STRINGFIELD_T non-empty requirement option. There are cases were you don't want a config option string to be empty. To require the option string to be non-empty, just set the aco_option_register() flags parameter to non-zero. * Updated some config framework enum aco_option_type comments. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-25Fix memory/ref counting leaks in a variety of locationsMatthew Jordan
This patch fixes the following memory leaks: * http.c: The structure containing the addresses to bind to was not being deallocated when no longer used * named_acl.c: The global configuration information was not disposed of * config_options.c: An invalid read was occurring for certain option types. * res_calendar.c: The loaded calendars on module unload were not being properly disposed of. * chan_motif.c: The format capabilities needed to be disposed of on module unload. In addition, this now specifies the default options for the maxpayloads and maxicecandidates in such a way that it doesn't cause the invalid read in config_options.c to occur. (issue ASTERISK-21906) Reported by: John Hardin patches: http.patch uploaded by jhardin (license 6512) named_acl.patch uploaded by jhardin (license 6512) config_options.patch uploaded by jhardin (license 6512) res_calendar.patch uploaded by jhardin (license 6512) chan_motif.patch uploaded by jhardin (license 6512) ........ Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-06-13Refactor CEL channel events on top of Stasis-CoreKinsey Moore
This uses the channel state change events from Stasis-Core to determine when channel-related CEL events should be raised. Those refactored in this patch are: * AST_CEL_CHANNEL_START * AST_CEL_ANSWER * AST_CEL_APP_START * AST_CEL_APP_END * AST_CEL_HANGUP * AST_CEL_CHANNEL_END Retirement of Linked IDs is also refactored. CEL configuration has been refactored to use the config framework. Note: Some HANGUP events are not generated correctly because the bridge layer does not propagate hangupcause/hangupsource information yet. Review: https://reviewboard.asterisk.org/r/2544/ (closes issue ASTERISK-21563) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-21Merge in the bridge_construction branch to make the system use the Bridging API.Richard Mudgett
Breaks many things until they can be reworked. A partial list: chan_agent chan_dahdi, chan_misdn, chan_iax2 native bridging app_queue COLP updates DTMF attended transfers Protocol attended transfers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389378 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Disable strict XML documentation config checking; fix crash caused by sorceryMatthew Jordan
This patch does two things: 1. It disables (temporarily) strict XML documentation checking for module configurations. We should re-enable it before making any release from trunk. 2. Pass the module flag AST_MODULE through sorcery. This means several of the API calls are now macros and will do this automatically for you. The config framework needs the module that objects are registering to so it can properly construct the documentation. (This was already a required field, but sorcery was getting by without it) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-02-15Add CLI configuration documentationMatthew Jordan
This patch allows a module to define its configuration in XML in source, such that it can be parsed by the XML documentation engine. Documentation is generated in a two-pass approach: 1. The documentation is first generated from the XML pulled from the source 2. The documentation is then enhanced by the registration of configuration options that use the configuration framework This patch include configuration documentation for the following modules: * chan_motif * res_xmpp * app_confbridge * app_skel * udptl Two new CLI commands have been added: * config show help - show configuration help by module, category, and item * xmldoc dump - dump the in-memory representation of the XML documentation to a new XML file. Review: https://reviewboard.asterisk.org/r/2278 Review: https://reviewboard.asterisk.org/r/2058 patches: on review 2058 uploaded by twilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@381527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02Fix a variety of ref counting issuesMatthew Jordan
This patch resolves a number of ref leaks that occur primarily on Asterisk shutdown. It adds a variety of shutdown routines to core portions of Asterisk such that they can reclaim resources allocate duringd initialization. Review: https://reviewboard.asterisk.org/r/2137 ........ Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-09-04Prevent crash from using app_page with no confbridge.conf file provided.Mark Michelson
Also prevents other potential crashes when using aco API with uninitialized aco_info structs. (closes issue ASTERISK-20305) reported by Noah Engelberth Tested by Noah Engelberth Review: https://reviewboard.asterisk.org/r/2086 ........ Merged revisions 372135 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-21Fix segfault introduced by conversion to ACO APITerry Wilson
The value "none" is specified in the config file as a valid value for the "video_mode" option. The code prior to the ACO conversion did not check for "none", but just ignored it and relied on the default zero value. The parsing with ACO is more strict, so without handling "none" specifically, parsing would fail. When parsing failed, but the module loaded anyway, the config info would never be stored, and one place in the code did not check for this case and would segfault. It was also possible that the aco_info struct's internals would be destroyed and used as well. This patch keeps the module from loading after parse failures, adds the "none" option to "video_mode", registers CLI functions only after parsing has completed, checks the config data for NULL before accessing it, and returns -1 on some allocation failures when initializing. (closes issue ASTERISK-20159) Reported by: Birger "WIMPy" Harzenetter Tested by: Birger "WIMPy" Harzenetter Patches: confbridge_fix3.txt uploaded by Terry Wilson git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-19Convert app_confbridge to use the config options frameworkTerry Wilson
Review: https://reviewboard.asterisk.org/r/2024/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-12Handle deprecated (aliased) option names with the config options apiTerry Wilson
Add a simple way to register "deprecated" option names that alias to a different "current" name. Review: https://reviewboard.asterisk.org/r/2026/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370043 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-28Add the ability to set flags via the config options apiTerry Wilson
Allows the setting of flags via the config options api. For example, code like this: #define OPT1 1 << 0 #define OPT2 1 << 1 #define OPT3 1 << 2 struct thing { unsigned int flags; }; and a config like this: [blah] opt1=yes opt2=no opt3=yes Review: https://reviewboard.asterisk.org/r/2004/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14Add a post_apply callback to the Config Options APITerry Wilson
This adds a callback that only fires when changes have been successfully applied via the Config Options API. Review: https://reviewboard.asterisk.org/r/1980/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368921 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-14Add filename alias support to the Config Options APITerry Wilson
This adds the ability to handle a single filename alias for a config file. This is useful if a config filename has changed, but the old filename should be supported for backwards compatibility. Review: https://reviewboard.asterisk.org/r/1981/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368920 65c4cc65-6c06-0410-ace0-fbb531ad65f3