summaryrefslogtreecommitdiff
path: root/pbx/pbx_spool.c
AgeCommit message (Collapse)Author
2017-03-06pbx_spool: Gracefully handle long lines in call filesSean Bright
Per the linked issue, we aren't checking the buffer filled by fgets() to determine if it contains a newline, so we will fail to correctly parse the trailing portion of a long line. This patch increases the buffer size from 256 to 1024, and skips any line that exceeds that length, logging a warning in the process. ASTERISK-17067 #close Reported by: Dave Olszewski Change-Id: I51bcf270c1b4347ba05b43f18dc2094c76f5d7b0
2017-02-10manager: Restore Originate failure behavior from Asterisk 11Sean Bright
In Asterisk 11, if the 'Originate' AMI command failed to connect the provided Channel while in extension mode, a 'failed' extension would be looked up and run. This was, I believe, unintentionally removed in 51b6c49. This patch restores that behavior. This also adds an enum for the various 'synchronous' modes in an attempt to make them meaningful. ASTERISK-26115 #close Reported by: Nasir Iqbal Change-Id: I8afbd06725e99610e02adb529137d4800c05345d
2015-05-11pbx/pbx_spool: Fix issue when call files were executed too earlyIvan Poddubny
pbx_spool used to delete/move the call file upon successful outgoing call completion, but did not delete it from in-memory list of files (dirlist, used only when compiled with inotify/kqueue support). That resulted in an extra attempt to process that filename after retrytime seconds. Then, if a new file with the same name appears that is scheduled in future further than the completed one plus its retrytime, then it gets executed earlier than expected. This patch fixes remove_from_queue function to also remove the entry from the dirlist. ASTERISK-17069 #close Reported by: Jeremy Kister ASTERISK-24442 #close Reported by: tootai Change-Id: If9ec9b88073661ce485d6b008fd0b2612e49a28b
2015-01-30Fix some memory leaks.Mark Michelson
These memory leaks were found and fixed by John Hardin. I'm just committing them for him. ASTERISK-24736 #close Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/4389 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431468 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-03-07uniqueid: channel linkedid, ami, ari object creation with id'sScott Griepentrog
Much needed was a way to assign id to objects on creation, and much change was necessary to accomplish it. Channel uniqueids and linkedids are split into separate string and creation time components without breaking linkedid propgation. This allowed the uniqueid to be specified by the user interface - and those values are now carried through to channel creation, adding the assignedids value to every function in the chain including the channel drivers. For local channels, the second channel can be specified or left to default to a ;2 suffix of first. In ARI, bridge, playback, and snoop objects can also be created with a specified uniqueid. Along the way, the args order to allocating channels was fixed in chan_mgcp and chan_gtalk, and linkedid is no longer lost as masquerade occurs. (closes issue ASTERISK-23120) Review: https://reviewboard.asterisk.org/r/3191/ ........ Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-03Cache string values of formats on ast_format_cap() to save processing.Mark Michelson
Channel snapshots have string representations of the channel's native formats. Prior to this change, the format strings were re-created on ever channel snapshot creation. Since channel native formats rarely change, this was very wasteful. Now, string representations of formats may optionally be stored on the ast_format_cap for cases where string representations may be requested frequently. When formats are altered, the string cache is marked as invalid. When strings are requested, the cache validity is checked. If the cache is valid, then the cached strings are copied. If the cache is invalid, then the string cache is rebuilt and copied, and the cache is marked as being valid again. Review: https://reviewboard.asterisk.org/r/2879 ........ Merged revisions 400356 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-03-15Fix processing of call files when using KQueue on OS XMatthew Jordan
In certain situations, call files are not processed when using KQueue with pbx_spool. Asterisk was sending an invalid timeout value when the spool directory is empty, causing the call to kevent to error immediately. This can create a tight loop, increasing the CPU load on the system. (closes issue ASTERISK-21176) Reported by: Carlton O'Riley patches: kqueue_osx.patch uploaded by coriley (License 6473) ........ Merged revisions 383120 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 383121 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@383122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-14Fix call files when astspooldir is relative.Richard Mudgett
Future dated call files are ignored when astspooldir is relative to the current directory. The queue_file() assumed that the qdir needed to be prepended if the given filename did not start with a '/'. If astspooldir is relative it is not going to start from the root directory obviously so it will not start with a '/'. The filename used in queue_file() ultimately results in qdir prepended multiple times. * Made queue_file() not prepend qdir if the filename contains a '/'. (closes issue ASTERISK-20593) Reported by: James Le Cuirot Patches: 0004-Fix-future-call-files-from-relative-directories.patch (license #6439) patch uploaded by James Le Cuirot ........ Merged revisions 376232 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 376233 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 376234 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@376235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-08Fix deletion of unopenable spool files.Richard Mudgett
If scan_service() cannot open the spool file, it logs a message saying that it will delete the file and calls remove_from_queue() to do it. However, remove_from_queue() fails to delete the spool file because struct outgoing has not yet been fully initialized. * Merged allocating a new struct outgoing and init_outgoing() into new_outgoing(). Allocation is initialization. * Made apply_outgoing() not initialize the spool filename in struct outgoing. * Made apply_outgoing() call ast_trim_blanks() and ast_skip_blanks() rather than manually inlining them. * Reduced indentation levels in apply_outgoing(). * Fixed a garbled comment in remove_from_queue(). * Reworked scan_service() to simplify it. (closes issue ASTERISK-17231) Reported by: David Chappell Patches: spool_open_failure.diff (license #4997) patch uploaded by David Chappell Started with this patch. ........ Merged revisions 374686 from http://svn.asterisk.org/svn/asterisk/branches/1.8 * Fixed some memory leaks on off nominal paths in init_outgoing() when merging into the new_outgoing() function dealing with o->capabilities. ........ Merged revisions 374695 from http://svn.asterisk.org/svn/asterisk/branches/10 ........ Merged revisions 374708 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-08Allow support for early media on AMI originates and call files.Mark Michelson
This is based on the work done by Olle Johansson on review board. The idea is that the channel specified in an AMI originate or call file is typically not connected to the outgoing extension until the channel has been answered. With this change, an EarlyMedia header can be specified for AMI originates and an early_media option can be specified in call files. With this option set, once early media is received on a channel, it will be connected with the outgoing extension. (closes issue ASTERISK-18644) Reported by Olle Johansson Review: https://reviewboard.asterisk.org/r/1472 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31Clean up and ensure proper usage of alloca()Kinsey Moore
This replaces all calls to alloca() with ast_alloca() which calls gcc's __builtin_alloca() to avoid BSD semantics and removes all NULL checks on memory allocated via ast_alloca() and ast_strdupa(). (closes issue ASTERISK-20125) Review: https://reviewboard.asterisk.org/r/2032/ Patch-by: Walter Doekes (wdoekes) ........ Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13Fix occasional incorrectly delayed call-file execution.Richard Mudgett
Since the dir timestamp is available at one second resolution, we cannot know if it was updated within the same second after we scanned it. Therefore, we will force another scan if the dir was just modified. * Changed to force another scan if the directory was just modified. (closes issue ASTERISK-19081) Reported by: Knut Bakke Review: https://reviewboard.asterisk.org/r/1688/ ........ Merged revisions 355056 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 355057 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01Constify some more channel driver technology callback parameters.Richard Mudgett
Review: https://reviewboard.asterisk.org/r/1707/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25Fix compilation on Snow Leopard/FreeBSD for pbx_spool.cKinsey Moore
One of the changes in the recent spool handling of hardlinks patch was just outside a HAVE_INOTIFY block and caused compilation to fail in some build environments. This has been corrected. ........ Merged revisions 342328 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 342329 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25Merged revisions 342277 via svnmerge from Kinsey Moore
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r342277 | kmoore | 2011-10-25 11:08:04 -0500 (Tue, 25 Oct 2011) | 25 lines Merged revisions 342276 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r342276 | kmoore | 2011-10-25 11:06:57 -0500 (Tue, 25 Oct 2011) | 18 lines Fix spool handling to allow call files to be hardlinked into place This fixes the inotify code to handle call files being hardlinked into the spool directory. The smsq utility does this, instead of rename(), to ensure that it cannot accidentally overwrite an existing spool file. A rename() might do that, but link() will definitely not. The inotify code had broken this, because it would wait for an IN_CLOSE_WRITE event on the file... which was never forthcoming, since it was never opened. Now we look for IN_OPEN events following the IN_CREATE event, and only wait for an IN_CLOSE_WRITE if the file was actually opened. Patch-by: dwmw2 (closes issue ASTERISK-18331) Review: https://reviewboard.asterisk.org/r/1391/ ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Replace ast_log(LOG_DEBUG, ...) with ast_debug()Paul Belanger
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-10Merged revisions 294605 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r294605 | tilghman | 2010-11-10 17:26:39 -0600 (Wed, 10 Nov 2010) | 2 lines Fixing the Mac OS X build (bamboo warning) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-10Merged revisions 294569 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r294569 | tilghman | 2010-11-10 17:13:37 -0600 (Wed, 10 Nov 2010) | 8 lines Properly queue files with inotify(7). (closes issue #18089) Reported by: abelbeck Patches: 20101021__issue18089.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-18Merged revisions 292083 via svnmerge from Jeff Peeler
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r292083 | jpeeler | 2010-10-18 10:32:40 -0500 (Mon, 18 Oct 2010) | 4 lines Disable use of inotify for call file handling as it is not working properly. (related to #18089) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-03Merged revisions 290066 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r290066 | tilghman | 2010-10-03 15:02:29 -0500 (Sun, 03 Oct 2010) | 8 lines Get notification only when file is closed, not when created. (closes issue #17924) Reported by: mkeuter Patches: asterisk-1.8-bugid17924.patch uploaded by abelbeck (license 946) Tested by: abelbeck ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@290067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-07Merged revisions 285386 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285386 | tilghman | 2010-09-07 16:20:16 -0500 (Tue, 07 Sep 2010) | 13 lines Don't notify on attribute changes, and change how the queuing mechanism works. Fixes call spools in 1.8. (closes issue #17337) Reported by: loloski Patches: 20100827__issue17337.diff.txt uploaded by tilghman (license 14) (closes issue #17924) Reported by: mkeuter Tested by: mkeuter ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-13Fix build on linux.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-13Add kqueue(2) implementation to Asterisk in various places.Tilghman Lesher
This will save a considerable amount of CPU on the BSDs, including Mac OS X, as it eliminates several places in the code that we previously used a busy loop. Additionally, this adds a res_timing interface, using kqueue timers. Review: https://reviewboard.asterisk.org/r/543/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262852 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-27inotify support for pbx_spoolTilghman Lesher
This should give a good speed boost, in that one particular thread isn't waking up once a second to read directory contents. Reviewboard: https://reviewboard.asterisk.org/r/137/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@255117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-04Expand codec bitfield from 32 bits to 64 bits.Tilghman Lesher
Reviewboard: https://reviewboard.asterisk.org/r/416/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@227580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10AST-2009-005Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-02Remove rarely-used event_log/LOG_EVENT supportKevin P. Fleming
In discussions today at the Europe Asterisk Developer Meet-Up, we determined that the event_log was used in only 9 places in the entire tree, and really was not needed at all. The users have been converted to use LOG_NOTICE, or the messages have been removed since other messages were already in place that provided the same information. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@191785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03Convert pbx_spool to use string fields instead of statically-sized buffers.Mark Michelson
In tests run after making this conversion, I noticed an approximate 85% reduction in memory usage for call file processing. Review: http://reviewboard.digium.com/r/168/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03Merged revisions 160558 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r160558 | tilghman | 2008-12-03 11:34:34 -0600 (Wed, 03 Dec 2008) | 7 lines If an entry is added to the directory during a scan when another entry expires, then that new entry will not be processed promptly, but must wait for either a future entry to start or a current entry's retry to occur. If no other entries exist in the directory (other than the new entries) when a bunch expire, then the new entries must wait until another new entry is added to be processed. This was a rather weird race condition, really. Fixes AST-147. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03Merged revisions 160551 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r160551 | tilghman | 2008-12-03 10:58:34 -0600 (Wed, 03 Dec 2008) | 4 lines Don't start scanning the directory until all modules are loaded, because some required modules (channels, apps, functions) may not yet be in memory yet. Fixes AST-149. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@160552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-14Add additional memory debugging to several core APIs, and fix several memoryTilghman Lesher
leaks found with these changes. (Closes issue #13505, closes issue #13543) Reported by: mav3rick, triccyx Patches: 20081001__bug13505.diff.txt uploaded by Corydon76 (license 14) Tested by: mav3rick, triccyx git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@149199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-18Merged revisions 123710 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r123710 | tilghman | 2008-06-18 15:22:42 -0500 (Wed, 18 Jun 2008) | 7 lines Set the variables top-down, so that if a script sets a variable more than once, the last one will take precedence. (closes issue #12673) Reported by: phber Patches: 20080519__bug12673.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14Add support for codec settings in originate via call file and manager.Olle Johansson
This is to enable video and text in originated calls. Development sponsored by Omnitor AB, Sweden. (http://www.omnitor.se) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14Doxygen formatting change onlyOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26Use defined return values in load_module in more places.Jason Parker
(closes issue #11096) Patches: pbx_config.c.patch uploaded by moy (license 222) pbx_dundi.c.patch uploaded by moy (license 222) pbx_gtkconsole.c.patch uploaded by moy (license 222) pbx_loopback.c.patch uploaded by moy (license 222) pbx_realtime.c.patch uploaded by moy (license 222) pbx_spool.c.patch uploaded by moy (license 222) app_adsiprog.c.patch uploaded by moy (license 222) app_alarmreceiver.c.patch uploaded by moy (license 222) app_amd.c.patch uploaded by moy (license 222) app_authenticate.c.patch uploaded by moy (license 222) app_cdr.c.patch uploaded by moy (license 222) app_zapateller.c.patch uploaded by moy (license 222) app_zapbarge.c.patch uploaded by moy (license 222) app_zapras.c.patch uploaded by moy (license 222) app_zapscan.c.patch uploaded by moy (license 222) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove another set of redundant #include "asterisk/options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesLuigi Rizzo
who really need it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19more errno.h removalLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13Merged revisions 82358 via svnmerge from Jason Parker
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82358 | qwell | 2007-09-13 18:11:27 -0500 (Thu, 13 Sep 2007) | 4 lines Fix a small typo. retrytime > waittime ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I ↵Steve Murphy
didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10Merged revisions 79099 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79099 | murf | 2007-08-10 14:53:43 -0600 (Fri, 10 Aug 2007) | 1 line From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07Add another big set of doxygen documentation improvements from snuffy.Russell Bryant
(closes issue #9892) (closes issue #10395) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26Do a massive conversion for using the ast_verb() macroRussell Bryant
(closes issue #10277, patches by mvanbaak) Basically, this changes ... if (option_verbose > 2) ast_verbose(VERBOSE_PREFIX_3, "Something\n"); to ... ast_verb(3, "Something\n"); git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11Clean up pbx_spool. So many nested if statements...Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-01Merged revisions 72806 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r72806 | russell | 2007-07-01 18:52:45 -0500 (Sun, 01 Jul 2007) | 13 lines Merged revisions 72805 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r72805 | russell | 2007-07-01 18:51:34 -0500 (Sun, 01 Jul 2007) | 5 lines When appending lines to call files to keep track of retries, write a leading newline just in case the original call file did not have a newline at the end. This fix is in response to a problem I saw reported on the asterisk-users mailing list. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-22Issue 9990 - New API ast_mkdir, which creates parent directories as ↵Tilghman Lesher
necessary (and is faster than an outcall to mkdir -p) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71040 65c4cc65-6c06-0410-ace0-fbb531ad65f3