summaryrefslogtreecommitdiff
path: root/main/asterisk.c
AgeCommit message (Collapse)Author
2016-01-20main/asterisk.c: ast_el_read_charDiederik de Groot
Make sure buf[res] is not accessed at res=-1 (buffer underrun). Address Sanitizer will complain about this quite loudly. ASTERISK-24801 #close Change-Id: Ifcd7f691310815a31756b76067c56fba299d3ae9
2016-01-06Merge topic 'pbx-split'Joshua Colp
* changes: main/pbx: Move hangup handler routines to pbx_hangup_handler.c. main/pbx: Move dialplan application management routines to pbx_app.c. main/pbx: Move switch routines to pbx_switch.c.
2016-01-05Merge "main/pbx: Move variable routines to pbx_variables.c."Matt Jordan
2016-01-05main/pbx: Move hangup handler routines to pbx_hangup_handler.c.Corey Farrell
This is the sixth patch in a series meant to reduce the bulk of pbx.c. This moves hangup handler management functions to their own source. Change-Id: Ib25a75aa57fc7d5c4294479e5cc46775912fb104
2016-01-04main/pbx: Move dialplan application management routines to pbx_app.c.Corey Farrell
This is the sixth patch in a series meant to reduce the bulk of pbx.c. This moves dialplan application management functions to their own source. Change-Id: I444c10fb90a3cdf9f3047605d6a8aad49c22c44c
2016-01-04main/pbx: Move switch routines to pbx_switch.c.Corey Farrell
This is the fifth patch in a series meant to reduce the bulk of pbx.c. This moves ast_switch functions to their own source. Change-Id: Ic2592a18a5c4d8a3c2dcf9786c9a6f650a8c628e
2016-01-04main/pbx: Move variable routines to pbx_variables.c.Corey Farrell
This is the third patch in a series meant to reduce the bulk of pbx.c. This moves channel and global variable routines to their own source. Change-Id: Ibe8fb4647db11598591d443a99e3f99200a56bc6
2016-01-01main/pbx: Move custom function routines to pbx_functions.c.Corey Farrell
This is the second patch in a series meant to reduce the bulk of pbx.c. This moves custom function management routines to their own source. Change-Id: I34a6190282f781cdbbd3ce9d3adeac3c3805e177
2016-01-01Happy new year 2016.Rodrigo Ramírez Norambuena
Change-Id: I22d3c90f6f27df82e915bbf81c1d91221f7a945e
2015-12-30main/pbx: Move pbx_builtin dialplan applications to pbx_builtins.cGeorge Joseph
We joked about splitting pbx.c into multiple files but this first step was fairly easy. All of the pbx_builtin dialplan applications have been moved into pbx_builtins.c and a new pbx_private.h file was added. load_pbx_builtins() is called by asterisk.c just after load_pbx(). A few functions were renamed and are cross-exposed between the 2 source files. Change-Id: I87066be3dbf7f5822942ac1449d98cc43fc7561a
2015-11-25main: Slight refactor of main. Improve color situation.Walter Doekes
Several issues are addressed here: - main() is large, and half of it is only used if we're not rasterisk; fixed by spliting up the daemon part into a separate function. - Call ast_term_init from rasterisk as well. - Remove duplicate code reading/writing asterisk history file. - Attempt to tackle background color issues and color changes that occur. Tested by starting asterisk -c until the colors stopped changing at odd locations. - Remove unused term_prep() and term_prompt() functions. ASTERISK-25585 #close Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f
2015-11-04Fix cli display of build options.Corey Farrell
A previous commit reduced the AST_BUILDOPTS compiler define to only include options that affected ABI. This included some options that were previously displayed by cli "core show settings". This change corrects the CLI display while still restricting buildopts.h to ABI effecting options only. ASTERISK-25434 #close Reported by: Rusty Newton Change-Id: Id07af6bedd1d7d325878023e403fbd9d3607e325
2015-07-12media cache: Add a core API and facade for a backend agnostic media cacheMatthew Jordan
This patch adds a new API to the Asterisk core that acts as a media cache. The core API itself is mostly a thin wrapper around some bucket API provided implementation that itself acts as the mechanism of retrieval for media. The media cache API in the core provides the following: * A very thin in-memory cache of the active bucket_file items. Unlike a more traditional cache, it provides no expiration mechanisms. Most queries that hit the in-memory cache will also call into the bucket implementations as well. The bucket implementations are responsible for determining whether or not the active record is active and valid. This makes sense for the most likely implementation of a media cache backend, i.e., HTTP. The HTTP layer itself is the actual arbiter of whether or not a record is truly active; as such, the in-memory cache in the core has to defer to it. * The ability to create new items in the media cache from local resources. This allows for re-creation of items in the cache on restart. * Synchronization of items in the media cache to the AstDB. This also includes various pieces of important metadata. The API provides sufficient access that higher level APIs, such as the file or app APIs, do not have to worry about the semantics of the bucket APIs when needing to playback a resource. In addition, this patch provides unit tests for the media cache API. The unit tests use a fake bucket backend to verify correctness. Change-Id: I11227abbf14d8929eeb140ddd101dd5c3820391e
2015-07-07DNS: Create a system-level DNS resolverAshley Sanders
Prior to this patch, the DNS core present in master had no default system-level resolver implementation. Therefore, it was not possible for the DNS core to perform resolutions unless the libunbound library was installed and the res_resolver_unbound module was loaded. This patch introduces a system-level DNS resolver implementation that will register itself with the lowest consideration priority available (to ensure that it is to be used only as a last resort). The resolver relies on low-level DNS search functions to perform a rudimentary DNS search based on a provided query and then supplies the search results to the DNS core. ASTERISK-25146 #close Reported By: Joshua Colp Change-Id: I3b36ea17b889a98df4f8d80d50bb7ee175afa077
2015-05-12Allow command-line options to override asterisk.conf.Corey Farrell
Previous versions of Asterisk processed command-line options before processing asterisk.conf. This meant that if an option was set in asterisk.conf, it could not be overridden with the equivelent command line option. This change causes Asterisk to process the command-line twice. First it processes options that are needed to load asterisk.conf, then it processes the remaining options after the config is read. This changes the function of -X slightly. Previously using -X without disabling execincludes in asterisk.conf caused #exec to be usable in any config. Now -X only enables #exec for the load of asterisk.conf, if it is wanted in the rest of the system it must be enabled with execincludes in asterisk.conf. Updated 'asterisk -h' and 'man asterisk' to reflect the limited function of -X. ASTERISK-25042 #close Reported by: Corey Farrell Change-Id: I1450d45c15b4467274b871914d893ed4f6564cd7
2015-05-12Fix processing of asterisk.conf debug=yes.Corey Farrell
The code which reads asterisk.conf supports processing the debug option with ast_true, but ast_true returns -1. This causes debug to still be off, convert to 1 so debug will be on as requested. ASTERISK-25042 Reported by: Corey Farrell Change-Id: I3c898b7d082d914b057e111b9357fde46bad9ed6
2015-05-03main/asterisk.c: Update Asterisk copyright yearRodrigo Ramírez Norambuena
Change-Id: I5e75d7f7e2c096d74edd9e8735268a894f4b93ab
2015-05-01Astobj2: Fix initialization order of refdebug and AO2_DEBUG.Corey Farrell
This ensures that refdebug is initialized before AO2_DEBUG if both are enabled, since AO2_DEBUG allocates a container. This change also makes AO2_DEBUG initialization critical, a failure will abort Asterisk startup. This is needed since the failure would be caused by reg_containers allocation failure, and that would result in a segmentation fault by ao2_container_register later in startup. ASTERISK-25048 #close Reported by: Corey Farrell Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
2015-04-27Astobj2: Allow reference debugging to be enabled/disabled by config.Corey Farrell
* The REF_DEBUG compiler flag no longer has any effect on code that uses Astobj2. It is used to determine if reference debugging is enabled by default. Reference debugging can be enabled or disabled in asterisk.conf. * Caller information is provided in logger errors for ao2 bad magic numbers. * Optimizes AO2 by merging internal functions with the public counterpart. This was possible now that we no longer require a dual ABI. ASTERISK-24974 #close Reported by: Corey Farrell Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
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-04-09loader/main: Don't set ast_fully_booted until deferred reloads are processedGeorge Joseph
Until we have a true module management facility it's sometimes necessary for one module to force a reload on another before its own load is complete. If Asterisk isn't fully booted yet, these reloads are deferred. The problem is that asterisk reports fully booted before processing the deferred reloads which means Asterisk really isn't quite ready when it says it is. This patch moves the report of fully booted after the processing of the deferred reloads is complete. Since the pjsip stack has the most number of related modules, I ran the channels/pjsip testsuite to make sure there aren't any issues. All tests passed. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4604/ ........ Merged revisions 434544 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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
2015-03-22Fix compilation issues for OpenBSDMatthew Jordan
This patch addresses compilation issues for OpenBSD. Specifically, it addresses: * It allows including <sys/vmmeter.h> in asterisk.c * Provides a needed (size_t) cast in xmldoc.c In 13+, it also addresses a conditional inclusion in loader.c. Review: https://reviewboard.asterisk.org/r/4506 ASTERISK-24880 #close Reported by: snuffy Tested by: snuffy patches: misc-openbsd.diff uploaded by snuffy (License 5024) ........ Merged revisions 433245 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 433247 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-17Various: bugfixes found via chaosScott Griepentrog
Using DEBUG_CHAOS several instances of a null pointer crash, and one uninitialized variable were uncovered and fixed. Also added details on why Asterisk failed to initialize. Review: https://reviewboard.asterisk.org/r/4468/ ........ Merged revisions 433064 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-21main/asterisk.c: Reverse #if statement in listener() to fix code folding.Corey Farrell
listener() opens the same code block in two places (#if and #else). This confuses some folding editors causing it to think that an extra code block was opened. Folding in 'geany' causes all code after listener() to be folded as if it were part of that procedure. ASTERISK-24813 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4435/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-02-11HTTP: Stop accepting requests on final system shutdown.Richard Mudgett
There are three CLI commands to stop and restart Asterisk each. 1) core stop/restart now - Hangup all calls and stop or restart Asterisk. New channels are prevented while the shutdown request is pending. 2) core stop/restart gracefully - Stop or restart Asterisk when there are no calls remaining in the system. New channels are prevented while the shutdown request is pending. 3) core stop/restart when convenient - Stop or restart Asterisk when there are no calls in the system. New calls are not prevented while the shutdown request is pending. ARI has made stopping/restarting Asterisk more problematic. While a shutdown request is pending it is desirable to continue to process ARI HTTP requests for current calls. To handle the current calls while a shutdown request is pending, a new committed to shutdown phase is needed so ARI applications can deal with the calls until the system is fully committed to shutdown. * Added a new shutdown committed phase so ARI applications can deal with calls until the final committed to shutdown phase is reached. * Made refuse new HTTP requests when the system has reached the final system shutdown phase. Starting anything while the system is actively releasing resources and unloading modules is not a good thing. * Split the bridging framework shutdown to not cleanup the global bridging containers when shutting down in a hurry. This is similar to how other modules prevent crashes on rapid system shutdown. * Moved ast_begin_shutdown(), ast_cancel_shutdown(), and ast_shutting_down(). You should not have to include channel.h just to access these system functions. ASTERISK-24752 #close Reported by: Matthew Jordan Review: https://reviewboard.asterisk.org/r/4399/ ........ Merged revisions 431692 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-26Various fixes for OS XDavid M. Lee
This patch addresses compilation errors on OS X. It's been a while, so there's quite a few things. * Fixed __attribute__ decls in route.h to be portable. * Fixed htonll and ntohll to work when they are defined as macros. * Replaced sem_t usage with our ast_sem wrapper. * Added ast_sem_timedwait to our ast_sem wrapper. * Fixed some GCC 4.9 warnings using sig*set() functions. * Fixed some format strings for portability. * Fixed compilation issues with res_timing_kqueue (although tests still fail on OS X). * Fixed menuconfig /sbin/launchd detection, which disables res_timing_kqueue on OS X). ASTERISK-24539 #close Reported by: George Joseph ASTERISK-24544 #close Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/4327/ ........ Merged revisions 431092 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-22queue_log: Post QUEUESTART entry when Asterisk fully boots.Richard Mudgett
The QUEUESTART log entry has historically acted like a fully booted event for the queue_log file. When the QUEUESTART entry was posted to the log was broken by the change made by ASTERISK-15863. * Made post the QUEUESTART queue_log entry when Asterisk fully boots. This restores the intent of that log entry and happens after realtime has had a chance to load. AST-1444 #close Reported by: Denis Martinez Review: https://reviewboard.asterisk.org/r/4282/ ........ Merged revisions 430009 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 430010 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-09core: avoid possible asterisk -r crash from long idScott Griepentrog
When connecting to the remote console, an id string is first provided that consts of the hostname, pid, and version. This is parsed by the remote instance using a buffer that may be too short, and can allow a buffer overrun because it is not terminated. This patch adds termination and a larger buffer. Review: https://reviewboard.asterisk.org/r/4182/ ........ Merged revisions 429223 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@429224 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-07-15Update Asterisk copyright year in main/asterisk.cSean Bright
It's been 2014 for like... 6 months. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-04Remove many deprecated modulesMatthew Jordan
Billing records are fair, To get paid is quite bright, You should really use ODBC; Good-bye cdr_sqlite. Microsoft did once push H.323, Hell, we all remember NetMeeting. But try to compile chan_h323 now And you will take quite a beating. The XMPP and SIP war was fierce, And in the distant fray Was birthed res_jabber/chan_jingle; But neither to stay. For everyone did care and chase what Google professed. "Free Internet Calling" was what devotees cried, But Google did change the specs so often That the developers were happy the day chan_gtalk died. And then there was that odd application Dedicated to the Polish tongue. app_saycountpl was subsumed by Say; One could say its bell was rung. To read and parse a file from the dialplan You could (I guess) use an application. app_readfile did fill that purpose, but I think A function is perhaps better in its creation. Barging is rude, I'm not sure why we do it. Inwardly, the caller will probably sigh. But if you really must do it, Don't use app_dahdibarge, use ChanSpy. We all despise the sound of tinny robots It makes our queues so cold. To control such an abomination It's better to not use Wait/SetMusicOnHold. It's often nice to know properties of a channel It makes our calls right We have a nice function called CHANNEL And so SIPCHANINFO is sent off into the night. And now things get odd; Apparently one could delimit with a colon Properties from the SIPPEER function! Commas are in; all others are done. Finally, a word on pipes and commas. We're sorry. We can't say it enough. But those compatibility options in asterisk.conf; To maintain them forever was just too tough. This patch removes: * cdr_sqlite * chan_gtalk * chan_jingle * chan_h323 * res_jabber * app_saycountpl * app_readfile * app_dahdibarge It removes the following applications/functions: * WaitMusicOnHold * SetMusicOnHold * SIPCHANINFO It removes the colon delimiter from the SIPPEER function. Finally, it also removes all compatibility options that were configurable from asterisk.conf, as these all applied to compatibility with Asterisk 1.4 systems. Review: https://reviewboard.asterisk.org/r/3698/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418019 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-04-19main/asterisk: Fix startup sequence for realtime featuresMatthew Jordan
When ASTERISK-23265/ASTERISK-23320 was fixed, it inadvertently led to realtime features breaking. This was due to features loading prior to realtime. This patch fixes this by loading features after loading dynamic modules. ASTERISK-23487 #close Reported by: Denis Tested by: Denis ........ Merged revisions 412698 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412699 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-11main/astobj2: Make REF_DEBUG a menuselect item; improve REF_DEBUG outputMatthew Jordan
This patch does the following: (1) It makes REF_DEBUG a meneselect item. Enabling REF_DEBUG now enables REF_DEBUG globally throughout Asterisk. (2) The ref debug log file is now created in the AST_LOG_DIR directory. Every run will now blow away the previous run (as large ref files sometimes caused issues). We now also no longer open/close the file on each write, instead relying on fflush to make sure data gets written to the file (in case the ao2 call being performed is about to cause a crash) (3) It goes with a comma delineated format for the ref debug file. This makes parsing much easier. This also now includes the thread ID of the thread that caused ref change. (4) A new python script instead for refcounting has been added in the contrib/scripts folder. (5) The old refcounter implementation in utils/ has been removed. Review: https://reviewboard.asterisk.org/r/3377/ ........ Merged revisions 412114 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 412115 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 412153 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08Internal timing: Add notice that the -I and internal_timing option are no ↵Richard Mudgett
longer needed. Add notice messages during execution that the -I command line option and the astersik.conf internal_timing option are no longer needed. The internal timing functionality is now always enabled if there is a timing module loaded. NOTE: Since the command line options and the asterisk.conf config file are processed before the logging system is initialized, the messages are output to stderr. Change requested as a result of asterisk-dev list comments about the commit for ASTERISK-22846 that removed the -I and internal_timing options. Review: https://reviewboard.asterisk.org/r/3423/ ........ Merged revisions 411964 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411974 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411985 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04internal_timing: Remove the option and always make it enabled if a timing ↵Richard Mudgett
module is loaded. The masquerade supertest frequently fails because either the local channel chain doesn't completely optimize out or the DTMF handshake doesn't completely get accross. Local channel optimization requires frames flowing to trigger when optimization can happen. When optimization happens the media frame that triggered the optimization is dropped. Sending DTMF requires frames to flow in the other direction for timing purposes while sending nothing. If internal timing is not enabled when MOH is playing, Asterisk switches to received timing when an audio frame is received. With optimization dropping media frames and MOH not sending frames unless it receives frames, occasionaly there are no more frames being passed and the test fails. * The asterisk command line -I option and the asterisk.conf internal_timing option are removed. Asterisk now always uses internal timing when needed if any timing module is loaded. The issue ASTERISK-14861 did this quite awhile ago in v1.4 but effectively is broken if other internal timing modules besides DAHDI are used. The ast_read_generator_actions() now only does received timing if it has no choice for frame generators like MOH, silence, and playback streaming. * Cleaned up some code dealing with frame generators in ast_deactivate_generator(), generator_write_format_change(), ast_activate_generator(), and ast_channel_stop_silence_generator(). * Removed ast_internal_timing_enabled(), AST_OPT_FLAG_INTERNAL_TIMING, and ast_opt_internal_timing. ASTERISK-22846 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3414/ ........ Merged revisions 411715 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411716 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411717 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-03doxygen: Tweak the link back to ye olde Digium websiteMatthew Jordan
........ Merged revisions 409361 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409362 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409363 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-22main: Initialize dialplan providing core components prior to module pre-loadMatthew Jordan
It is possible to pre-load pbx_config. As a result, pbx_config - which will load and parse the dialplan - will attempt to use various dialplan components, such as device state providers and presence state providers, prior to them being initialized by the core. This would lead to a crash, as the components had not created their Stasis cache entries. This patch moves a number of core component initializations before the module pre-load. This guarantees that if someone does pre-load pbx_config - or other pbx modules - that the Stasis caches for the various core components are created. (closes issue ASTERISK-23320) Reported by: xrobau (closes issue ASTERISK-23265) Reported by: Andrew Nagy Tested by: Andrew Nagy, Rusty Newton ........ Merged revisions 408855 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-14verbosity: Fix performance of console verbose messages.Richard Mudgett
The per console verbose level feature as previously implemented caused a large performance penalty. The fix required some minor incompatibilities if the new rasterisk is used to connect to an earlier version. If the new rasterisk connects to an older Asterisk version then the root console verbose level is always affected by the "core set verbose" command of the remote console even though it may appear to only affect the current console. If an older version of rasterisk connects to the new version then the "core set verbose" command will have no effect. * Fixed the verbose performance by not generating a verbose message if nothing is going to use it and then filtered any generated verbose messages before actually sending them to the remote consoles. * Split the "core set debug" and "core set verbose" CLI commands to remove the per module verbose support that cannot work with the per console verbose level. * Added a silent option to the "core set verbose" command. * Fixed "core set debug off" tab completion. * Made "core show settings" list the current console verbosity in addition to the root console verbosity. * Changed the default verbose level of the 'verbose' setting in the logger.conf [logfiles] section. The default is now to once again follow the current root console level. As a result, using the AMI Command action with "core set verbose" could again set the root console verbose level and affect the verbose level logged. (closes issue AST-1252) Reported by: Guenther Kelleter Review: https://reviewboard.asterisk.org/r/3114/ ........ Merged revisions 405431 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405432 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-04asterisk.c: suppress live_dangerously warning on rasteriskTzafrir Cohen
Even since the fixes of AST-2013-007, Asterisk prints the following warning on startup if the user decided to live dangerously: Privilege escalation protection disabled! See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details. This message is intended for the logs and interactive startup. No need for it to appear on a remote console. This commit removes it from there. (closes issue ASTERISK-23084) Review: https://reviewboard.asterisk.org/r/3101/ ........ Merged revisions 404861 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 404888 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 404911 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-17Changed the default for live_dangerously to noDavid M. Lee
........ Merged revisions 404006 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@404009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-16security: Inhibit execution of privilege escalating functionsDavid M. Lee
This patch allows individual dialplan functions to be marked as 'dangerous', to inhibit their execution from external sources. A 'dangerous' function is one which results in a privilege escalation. For example, if one were to read the channel variable SHELL(rm -rf /) Bad Things(TM) could happen; even if the external source has only read permissions. Execution from external sources may be enabled by setting 'live_dangerously' to 'yes' in the [options] section of asterisk.conf. Although doing so is not recommended. Also, the ABI was changed to something more reasonable, since Asterisk 12 does not yet have a public release. (closes issue ASTERISK-22905) Review: http://reviewboard.digium.internal/r/432/ ........ Merged revisions 403913 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 403917 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 403959 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08app_dahdiras: Use waitpid instead of wait4.Kevin Harwell
Several places in the code were using wait4 while other places were using waitpid. This change makes all places use waitpid in order to make things more consistent and since the 'rusage' object passed in/out of wait4 was never used. (closes issue ASTERISK-22557) Reported by: YvesGael Patches: asterisk-11.5.1-wait4.patch uploaded by hurdman (license 6537) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-24memory leaks: Memory leak cleanup patch by Corey Farrell (second set)Jonathan Rose
Also covers ast_app_parse_timelen-fail-zero-length.patch, but the patch was replaced with one of my own. (issue ASTERISK-22467) Reported by: Corey Farrell Patches: chan_dahdi-cleanup_push.patch uploaded by coreyfarrell (license 5909) clicompat-r2.patch uploaded by coreyfarrell (license 5909) codecs-ilbc-doCPLC.patch uploaded by coreyfarrell (license 5909) data-cleanup-test-registration.patch uploaded by coreyfarrell (license 5909) main-asterisk-kill-listener.patch uploaded by coreyfarrell (license 5909) ........ Merged revisions 401704 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 401705 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 401706 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-04ARI: Add subscription supportMatthew Jordan
This patch adds an /applications API to ARI, allowing explicit management of Stasis applications. * GET /applications - list current applications * GET /applications/{applicationName} - get details of a specific application * POST /applications/{applicationName}/subscription - explicitly subscribe to a channel, bridge or endpoint * DELETE /applications/{applicationName}/subscription - explicitly unsubscribe from a channel, bridge or endpoint Subscriptions work by a reference counting mechanism: if you subscript to an event source X number of times, you must unsubscribe X number of times to stop receiveing events for that event source. Review: https://reviewboard.asterisk.org/r/2862 (issue ASTERISK-22451) Reported by: Matt Jordan ........ Merged revisions 400522 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-17Remote console: more output discrepanciesKevin Harwell
The remote console continued to have issues with its output. In this case CLI command output would either not show up (if verbose level = 0) or would contain verbose prefixes (if verbose level > 0) once log messages were sent to the remote console. The fix now now adds verbose prefix data to all new lines contained in a verbose log string. (closes issue ASTERISK-22450) Reported by: David Brillert (closes issue AST-1193) Reported by: Guenther Kelleter Review: https://reviewboard.asterisk.org/r/2825/ ........ Merged revisions 399267 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 399268 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10Fix incorrect usages of ast_realloc().Richard Mudgett
There are several locations in the code base where this is done: buf = ast_realloc(buf, new_size); This is going to leak the original buf contents if the realloc fails. Review: https://reviewboard.asterisk.org/r/2832/ ........ Merged revisions 398757 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 398758 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 398759 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30Fix graceful shutdown crash.David M. Lee
The cleanup code for optional_api needs to happen after all of the optional API users and providers have unused/unprovided. Unfortunately, regsitering the atexit() handler at the beginning of main() isn't soon enough, since module destructors run after that. ........ Merged revisions 398149 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398150 65c4cc65-6c06-0410-ace0-fbb531ad65f3