summaryrefslogtreecommitdiff
path: root/funcs
AgeCommit message (Collapse)Author
2015-03-14func_curl: Don't hold exclusive lock when performing HTTP request.Joshua Colp
This code originally kept a lock held when performing the HTTP request to ensure that the options provided to curl remain valid. This doesn't seem to be necessary these days and holding the lock caused requests to happen sequentially instead of in parallel. ASTERISK-18708 #close Reported by: Dave Cabot ........ Merged revisions 432948 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432949 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-14FILE: fix retrieval of file contents when offset is specifiedMatthew Jordan
The loop that reads in a file was not correctly using the offset when determining what bytes to append to the output. This patch corrects the logic such that the correct portion of the file is extracted when an offset is specified. ASTERISK-21765 Reported by: John Zhong Tested by: Matt Jordan, Di-Shi Sun patches: file_read_390821.patch uploaded by Di-Shi Sun (License 5076) ........ Merged revisions 432935 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 432938 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@432940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-28Multiple revisions 431297-431298Mark Michelson
........ r431297 | mmichelson | 2015-01-28 11:05:26 -0600 (Wed, 28 Jan 2015) | 17 lines Mitigate possible HTTP injection attacks using CURL() function in Asterisk. CVE-2014-8150 disclosed a vulnerability in libcURL where HTTP request injection can be performed given properly-crafted URLs. Since Asterisk makes use of libcURL, and it is possible that users of Asterisk may get cURL URLs from user input or remote sources, we have made a patch to Asterisk to prevent such HTTP injection attacks from originating from Asterisk. ASTERISK-24676 #close Reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/4364 AST-2015-002 ........ r431298 | mmichelson | 2015-01-28 11:12:49 -0600 (Wed, 28 Jan 2015) | 3 lines Fix compilation error from previous patch. ........ Merged revisions 431297-431298 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 431299 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 431301 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431302 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
2015-01-23Fix typo's (retrieve, specified, address).Walter Doekes
........ Merged revisions 430996 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 430998 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-20CHANNEL(peer), chan_iax2, res_fax, SNMP agent: Fix deadlock from reaching ↵Richard Mudgett
across a bridge. Calling ast_channel_bridge_peer() cannot be done while holding any channel locks. The reported issue hit the deadlock in chan_iax2, but an audit of the ast_channel_bridge_peer() calls found three more locations where the same deadlock can occur. * Made CHANNEL(peer), res_fax, and the SNMP agent not call ast_channel_bridge_peer() with any channel locked. For CHANNEL(peer) I had to rework the logic to not hold the channel lock. * Made chan_iax2 no longer call ast_channel_bridge_peer(). It was done for legacy reasons that no longer apply. * Removed the iax.conf forcejitterbuffer option. It is now always enabled when the jitterbuffer option is enabled. If you put a jitter buffer on a channel it will be on the channel. ASTERISK-24600 #close Reported by: Jeff Collell Review: https://reviewboard.asterisk.org/r/4342/ ........ Merged revisions 430817 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-12funcs/func_curl: Fix memory leak when CURLOPT channel datastore is destroyedMatthew Jordan
When the channel datastore associated with the usage of CURLOPT on a specific channel is freed, the underlying structure holding the list of options is not disposed of. This patch properly frees the structure in the datastore .destroy callback. ASTERISK-24672 #close Reported by: Kristian Hogh patches: func_curl-memory-leak.diff uploaded by Kristian Hogh (License 6639) ........ Merged revisions 430487 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 430488 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-07func_config: Add ability to retrieve specific occurrence of a variableGeorge Joseph
I guess nobody uses templates with AST_CONFIG because today if you have a context that inherits from a template and you call AST_CONFIG on the context, you'll get the value from the template even if you've overridden it in the context. This is because AST_CONFIG only gets the first occurrence which is always from the template. This patch adds an optional 'index' parameter to AST_CONFIG which lets you specify the exact occurrence to retrieve, or '-1' to retrieve the last. The default behavior is the current behavior. Tested-by: George Joseph Review: https://reviewboard.asterisk.org/r/4313/ ........ Merged revisions 430315 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-01-05pjsip: Add 'PJSIP_AOR' and 'PJSIP_CONTACT' dialplan functions.Joshua Colp
The PJSIP_AOR dialplan function allows inspection of configured AORs including what contacts are currently bound to them. The PJSIP_CONTACT dialplan function allows inspection of contacts in existence. These can include both externally added (by way of registration) or permanent ones. ASTERISK-24341 Reported by: xrobau Review: https://reviewboard.asterisk.org/r/4308/ ........ Merged revisions 430179 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-20AST-2014-018 - func_db: DB Dialplan function permission escalation via AMI.Kevin Harwell
The DB dialplan function when executed from an external protocol (for instance AMI), could result in a privilege escalation. Asterisk now inhibits the DB function from being executed from an external interface if the live_dangerously option is set to no. ASTERISK-24534 Reported by: Gareth Palmer patches: submitted by Gareth Palmer (license 5169) ........ Merged revisions 428331 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 428363 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 428409 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 428413 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-11-04func_talkdetect: Fix stasis message leak in audiohook callback.Corey Farrell
ASTERISK-24482 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4142/ ........ Merged revisions 427203 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 427204 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-28func_cdr: Fix CDR_PROP payload leakCorey Farrell
Remove duplicate allocation of payload, preventing leak. ASTERISK-24455 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4113/ ........ Merged revisions 426252 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03chan_pjsip: Fix deadlock when masquerading PJSIP channels.Richard Mudgett
Performing a directed call pickup resulted in a deadlock when PJSIP channels were involved. A masquerade needs to hold onto the channel locks while it swaps channel information between the two channels involved in the masquerade. With PJSIP channels, the fixup routine needed to push a fixup task onto the PJSIP channel's serializer. Unfortunately, if the serializer was also processing a task that needed to lock the channel, you get deadlock. * Added a new control frame that is used to notify the channels that a masquerade is about to start and when it has completed. * Added the ability to query taskprocessors if the current thread is the taskprocessor thread. * Added the ability to suspend/unsuspend the PJSIP serializer thread so a masquerade could fixup the PJSIP channel without using the serializer. ASTERISK-24356 #close Reported by: rmudgett Review: https://reviewboard.asterisk.org/r/4034/ ........ Merged revisions 424471 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 424472 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-26core: Don't allow free to mean ast_free (and malloc, etc..).Walter Doekes
This gets rid of most old libc free/malloc/realloc and replaces them with ast_free and friends. When compiling with MALLOC_DEBUG you'll notice it when you're mistakenly using one of the libc variants. For the legacy cases you can define WRAP_LIBC_MALLOC before including asterisk.h. Even better would be if the errors were also enabled when compiling without MALLOC_DEBUG, but that's a slightly more invasive header file change. Those compiling addons/format_mp3 will need to rerun ./contrib/scripts/get_mp3_source.sh. ASTERISK-24348 #related Review: https://reviewboard.asterisk.org/r/4015/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-09func_channel: Add CHANNEL(onhold) item to get the current hold status of the ↵Richard Mudgett
channel. It would be useful to get the current hold status of a channel. Added CHANNEL(onhold) item that returns 1 (onhold) and 0 (not-onhold) for the hold status of a channel. ASTERISK-24038 Reported by: Matt Jordan AFS-113 #close Reported by: Mark Michelson Review: https://reviewboard.asterisk.org/r/3983/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422870 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-05func_channel.c: Add missing locking to some CHANNEL() requests.Richard Mudgett
* The CHANNEL() audionativeformat, videonativeformat, audioreadformat, and audiowriteformat now need locking since the media format rework when accessing the channel's format pointers. * Increased the buffer size for CHANNEL() audionativeformat and videonativeformat output strings since the allow=all can be a lengthy list. * Tweaked the CHANNEL() XML documentation for secure_bridge_signaling, secure_bridge_media, and state. * Ensured the output buffer is initialized for secure_bridge_signaling and secure_bridge_media. * Made use the locked_copy_string() macro instead of inlining it for trace and checkhangup. ........ Merged revisions 422700 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-18func_config: Change 'Not Found' message from ERROR to DEBUGGeorge Joseph
When you call the CONFIG dialplan function with the name of a variable that doesn't exist in the target context you get an ERROR. This does nothing but clutter up the logs with messages that may be perfectly acceptable. Just because a variable wasn't in the context doesn't mean it's an error. Maybei t's optional or just needs to be defaulted or ignored. This patch changes the log level from ERROR to DEBUG. If a dialplan developer wants to debug their dialplan they still canby setting the console debug level as needed. Tested by: George Joseph Review: https://reviewboard.asterisk.org/r/3919/ ........ Merged revisions 421327 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 421328 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421329 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421337 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11funcs/func_jitterbuffer: Tweak documentationMatthew Jordan
This patch merely reformats and cleans up a bit of the jitterbuffer documentation for the wiki. ........ Merged revisions 420639 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06Add documentation to the ability to retrieve the source port of a SIP call.Walter Doekes
(belongs with r419970) ASTERISK-24040 #close Patches: func_channel.c.diff uploaded by dtryba Review: https://reviewboard.asterisk.org/r/3781/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06Stasis: Allow message types to be blockedKinsey Moore
This introduces stasis.conf and a mechanism to prevent certain message types from being published. Internally, this works by preventing the chosen message types from being created which ensures that those message types can never be published. This patch also adjusts message publishers such that message payloads are not created if the related message type is not available. ASTERISK-23943 #close Review: https://reviewboard.asterisk.org/r/3823/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31xmldocs: Add support for an <example> tag in the Asterisk XML DocumentationMatthew Jordan
This patch adds support for an <example /> tag in the XML documentation schema. For CLI help, this doesn't change the formatting too much: - Preceeding white space is removed - Unlike with para elements, new lines are preserved However, having an <example /> tag in the XML schema allows for the wiki documentation generation script to surround the documentation with {code} or {noformat} tags, generating much better content for the wiki - and allowing us to put dialplan examples (and other code snippets, if desired) into the documentation for an application/function/AMI command/etc. Review: https://reviewboard.asterisk.org/r/3807/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-28datastores: Audit ast_channel_datastore_remove usage.Richard Mudgett
Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leaks in app_speech_utils and func_frame_trace. * Fixed app_speech_utils not locking the channel when accessing the channel datastore list. Review: https://reviewboard.asterisk.org/r/3859/ Audit of v11 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leak in func_jitterbuffer. (Was not in v12) Review: https://reviewboard.asterisk.org/r/3860/ Audit of v12 usage of ast_channel_datastore_remove() for datastore memory leaks. * Fixed leaks in abstract_jb. * Fixed leak in ast_channel_unsuppress(). Used by ARI mute control and res_mutestream. * Fixed ref leak in ast_channel_suppress(). Used by ARI mute control and res_mutestream. Review: https://reviewboard.asterisk.org/r/3861/ ........ Merged revisions 419684 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 419685 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 419686 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25Add module support level to ast_module_info structure. Print it in CLI ↵Mark Michelson
"module show" . ASTERISK-23919 #close Reported by Malcolm Davenport Review: https://reviewboard.asterisk.org/r/3802 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 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-18func_audiohookinherit.c: Fixup some XML documentation wording.Richard Mudgett
........ Merged revisions 418937 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418938 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18Channels: Masquerades to automatically move frame/audio hooksJonathan Rose
Whenever possible, audiohooks and framehooks will now be copied over to the channel that the masquerading channel gets cloned into. This should occur for all audiohooks and most framehooks. As a result, in Asterisk 12.5 and up, the AUDIOHOOK_INHERIT function is now deprecated and its behavior is essentially the new default for all audiohooks, plus some additional audiohooks/framehooks. Review: https://reviewboard.asterisk.org/r/3721/ ........ Merged revisions 418914 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-15func_uri: URIENCODE/URIDECODE - allow empty strings as argumentJonathan Rose
Previously these two dialplan functions would issue warnings and return failure when an empty string is used as the argument. Now they will not issue a warning and will successfully return an empty string. ASTERISK-23911 #close Reported by: Matt Jordan Review: https://reviewboard.asterisk.org/r/3745/ ........ Merged revisions 418641 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 418649 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 418650 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-17Allow the PUSH and UNSHIFT functions to set inheritable channel variables.Mark Michelson
........ Merged revisions 416500 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 416501 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 416502 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-03func_odbc: Fix fixed size buffers fix (r414968).Walter Doekes
The change that removed the fixed size buffers in odbc-related code -- removing arbitrary column width limits -- was incomplete. This change adds: no segfault on writesql without insertsql and return value checks after strdup. While I was in the vicinity I cleaned up the linefeeds in the odbc function descriptions, moved some code for clarity, removed some blobs and noted (but didn't fix) that the 'odbc write ... exec' CLI command doesn't behave as the dialplan equivalent when insertsql= is used. ASTERISK-23582 #close Review: https://reviewboard.asterisk.org/r/3579/ ........ Merged revisions 414997 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 414998 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 414999 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@415000 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-30TALK_DETECT: A channel function that raises events when talking is detectedMatthew Jordan
This patch adds a new channel function TALK_DETECT that, when set on a channel, causes events indicating the start/stop of talking on a channel to be emitted to both AMI and ARI clients. The function allows setting both the silence threshold (the length of silence after which we decide no one is talking) as well as the talking threshold (the amount of energy that counts as talking). Parameters can be updated on a channel after talk detection has been enabled, and talk detection can be removed at any time. The events raised by the function use a nomenclature similar to existing AMI/ARI events. For AMI: ChannelTalkingStart/ChannelTalkingStop For ARI: ChannelTalkingStarted/ChannelTalkingFinished Review: https://reviewboard.asterisk.org/r/3563/ #ASTERISK-23786 #close Reported by: Matt Jordan ........ Merged revisions 414934 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-28res_config_odbc: Use dynamically sized buffers to store row data so values ↵Joshua Colp
do not get truncated. ASTERISK-23582 #close ASTERISk-23582 #comment Reported by: Walter Doekes Review: https://reviewboard.asterisk.org/r/3557/ ........ Merged revisions 414693 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 414694 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 414695 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-21pbx.c: prevent potential crash from recursive replace()Scott Griepentrog
Recurisve usage of replace() resulted in corruption of the temporary string storage and potential crash. By changing the string to be allocated separtely per instance, this is eliminated. ASTERISK-23650 #comment Reported by: Roel van Meer ASTERISK-23650 #close Review: https://reviewboard.asterisk.org/r/3539/ ........ Merged revisions 414214 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 414215 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 414216 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414217 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-09Fix 32bit build for func_envKinsey Moore
........ Merged revisions 413592 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 413595 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 413597 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413599 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-05-07Ensure that presence state is decoded properly on Asterisk startup.Mark Michelson
The CustomPresence provider callback will automatically base64 decode stored data if the 'e' option was present when the state was set. However, since the provider callback was bypassed on Asterisk startup, encoded presence subtypes and messages were being sent instead. This fix makes it so the provider callback is always used when providing presence state updates. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-01Make behavior of the PRESENCE_STATE 'e' option more consistent.Mark Michelson
When writing presence state, if 'e' is specified, then the presence state will be stored in the astdb encoded. However, consumers of presence state events or those that query for the presence state will be given decoded information. If base64 encoding is desired for consumers, then the information can be base64-encoded manually and the 'e' option can be omitted. closes issue ASTERISK-23671 Reported by Mark Michelson Review: https://reviewboard.asterisk.org/r/3482 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-23Fix error loading res_monitor.Russell Bryant
For some odd reason, loading app_mixmonitor was fine, but res_monitor was not. This patch fixes a set of issues related to func_periodic_hook exporting the beep functions that gets res_monitor working again. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15(mix)monitor: Add options to enable a periodic beepRussell Bryant
Add an option to enable a periodic beep to be played into a call if it is being recorded. If enabled, it uses the PERIODIC_HOOK() function internally to play the 'beep' prompt into the call at a specified interval. This option is provided for both Monitor() and MixMonitor(). Review: https://reviewboard.asterisk.org/r/3424/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-12func_periodic_hook: move module refRussell Bryant
The previous code left one error path where the module would be unref'd twice instead of once. It was done once in the error handling block, and again inside of datastore destruction. Now the module ref is only released in the datastore destructor and only acquired when the datastore has been successfully allocated. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-12func_periodic_hook: add module ref countingRussell Bryant
This module lacked necessary module ref count incrementing and decrementing when used. This patch adds it. There's already a datastore used, so doing the ref counting along with the lifetime of the datastore provides a convenient place to do it. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-08func_periodic_hook: List more modules as dependenciesRussell Bryant
This module makes use of some existing Asterisk components. app_chanspy was already listed as a dependency. There are a few function modules used, as well, so list them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-05func_periodic_hook: New function for periodic hooks.Russell Bryant
This commit introduces a new dialplan function, PERIODIC_HOOK(). It allows you run to a dialplan hook on a channel periodically. The original use case that inspired this was the ability to play a beep periodically into a call being recorded. The implementation is much more generic though and could be used for many other things. The implementation makes heavy use of existing Asterisk components. It uses a combination of Local channels and ChanSpy() to run some custom dialplan and inject any audio it generates into an active call. The other important bit of the implementation is how it figures out when to trigger the beep playback. This implementation uses the audiohook API, even though it's not actually touching the audio in any way. It's a convenient way to get a callback and check if it's time to kick off another beep. It would be nice if this was timer event based instead of polling based, but unfortunately I don't see a way to do it that won't interfere with other things. Review: https://reviewboard.asterisk.org/r/3362/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-27Fix dialplan function NULL channel safety issuesCorey Farrell
(closes issue ASTERISK-23391) Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/3386/ ........ Merged revisions 411313 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 411314 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 411315 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17Fix stuck channel in ARI through the introduction of synchronous bridge actions.Mark Michelson
Playing back a file to a channel in an ARI bridge would attempt to wait until the playback concluded before returning. The method used involved signaling the waiting thread in the ARI custom playback function. The problem with this is that there were some corner cases that were not accounted for: * If a bridge channel could not be found, then we never would attempt the playback but would still attempt to wait for the playback to complete. * If the bridge playfile action failed to queue, we would still attempt to wait for the playback to complete. * If the bridge playfile action were queued but some circumstance caused the playback not to occur (the bridge dies, the channel is removed from the bridge), then we would never be notified. The solution to this is to move the waiting logic into the bridge code. A new bridge API function is added to queue a synchronous action on a bridge. The waiting thread is notified when the queued frame has been freed, either due to an error occurring or due to successful playback. As a failsafe, the waiting thread has a 10 minute timeout just in case there is a frame leak somewhere. Review: https://reviewboard.asterisk.org/r/3338 ........ Merged revisions 410673 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06sorcery: Create AST_SORCERY dialplan function.George Joseph
This patch creates the AST_SORCERY dialplan function which allows someone to retrieve any value from a sorcery-based config file. It's similar to AST_CONFIG. The creation of the function itself was fairly straightforward but it required changes to the underlying sorcery infrastructure that rippled into individual sorcery objects. The changes stemmed from inconsistencies in how sorcery created ast_variable objectsets from sorcery objects and the inconsistency in how individual objects used that feature especially when it came to parameters that can be specified multiple times like contact in aor and match in identify. You can read more here... http://lists.digium.com/pipermail/asterisk-dev/2014-February/065202.html So, what this patch does, besides actually creating the AST_SORCERY function, is the following... * Creates ast_variable_list_append which is a helper to append one ast_variable list to another. * Modifies the ast_sorcery_object_field_register functions to accept the already-defined sorcery_fields_handler callback. * Modifies ast_sorcery_objectset_create to accept a parameter indicating return type preference...a single ast_variable with all values concatenated or an ast_variable list with multiple entries. Also fixed a few bugs. * Modifies individual sorcery object implementations to use the new function definition of the ast_sorcery_object_field_register functions. * Modifies location.c and res_pjsip_endpoint_identifier_ip.c to implement sorcery_fields_handler handlers so they return multiple occurrences as an ast_variable_list. * Added a whole bunch of tests to test_sorcery. (closes issue ASTERISK-22537) Review: http://reviewboard.asterisk.org/r/3254/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-05Fix documentation for PRESENCE_STATE to properly illustrate how to create a ↵Mark Michelson
presence hint. There was a missing comma. This was discovered by Dan Kaplan. ........ Merged revisions 409886 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409887 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-04func_audiohookinheritance: Check If A Channel Was SpecifiedMichael L. Young
This patch prevents a crash when using the function audiohookinheritance without setting the channel. (closes issue ASTERISK-23104) Reported by: Joel Vandal Tested by: Joel Vandal Patches: asterisk-23104_audiohook_inherit_no_channel-11.diff uploaded by Michael L. Young (license 5026) Review: https://reviewboard.asterisk.org/r/3272/ ........ Merged revisions 409623 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409625 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409626 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-07funcs/func_cdr: Handle empty time values when extracting parsed valuesMatthew Jordan
When extracting timestamps that are parsed, time stamp values that are not set (time values of 0.000000) should not actually result in a parsed string. The value should be skipped, and the result of the CDR function should be an empty string. Prior to this patch, the result was fed to the time formatting, which would result in an output of a date/time in 1969. ........ Merged revisions 407747 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-04funcs/func_cdr: Fix non-epoch timestamps broken by improper char array derefMatthew Jordan
Thanks to snuffy for pointing this issue out and fixing it. (closes issue ASTERISK-23250) Reported by: snuffy patches: func_cdr-fix.diff uploaded by snuffy (License 5024) ........ Merged revisions 407259 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407260 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