- Mar 08, 2021
-
-
Sean Bright authored
ao2_replace() bumps the reference count of the object that is doing the replacing, which is not what we want. We just want to drop the old ref on the old object and update the pointer to point to the new object. Pointed out by George Joseph in #asterisk-dev Change-Id: Ie8167ed3d4b52b9d1ea2d785f885e8c27206743d
-
- Jan 25, 2021
-
-
Boris P. Korzun authored
Provided a support of variuos URL-schemes for res_musiconhold, registered by ast_bucket_scheme_register(). ASTERISK-29262 #close Change-Id: If0ea8697587353dce358a70035d82649fd4632b6
-
- Dec 16, 2020
-
-
Nathan Bruning authored
ASTERISK-29211 #close Change-Id: Ifbf0a4f786ab2a52342f9d1a1db4c9907f069877
-
- Sep 30, 2020
-
-
lvl authored
ASTERISK-29099 Change-Id: I45636679c0fb5a5f59114c8741626631a604e8a6
-
- Sep 28, 2020
-
-
Sean Bright authored
Change-Id: I41e77a04e4a523f4ed61a7a20b738ffd42be441e
-
- Sep 23, 2020
-
-
Sean Bright authored
Only track our sample offset if we are playing a non-announcement file, otherwise we will skip that number of samples when we start playing the first MoH file. ASTERISK-24329 #close Change-Id: Ib6b3c84fcaa1063889ab38ba7e7fc50050a3ccfc
-
- Aug 25, 2020
-
-
Sean Bright authored
Two changes of note in this patch: * Use ast_file_read_dir instead of opendir/readdir/closedir * If the files list should be sorted, do that at the end rather than as we go which improves performance for large lists Change-Id: Ic7e9c913c0f85754c99c74c9cf6dd3514b1b941f
-
- Aug 11, 2020
-
-
Sean Bright authored
The MoH class internal file vector is potentially being manipulated by multiple threads at the same time without sufficient locking. Switch to a reference counted list and operate on copies where necessary. ASTERISK-28927 #close Change-Id: I479c5dcf88db670956e8cac177b5826c986b0217
-
- May 20, 2020
-
-
Nicholas John Koch authored
A warning was triggered that there may be a problem regarding file extension (which is correct and should not be set anyway). The warning also appeared if there was dot within the path itself. E.g. [sales-queue-hold] mode=playlist entry=/var/www/domain.tld/moh/funky_music The music played correctly but you get a warning message. Now there will be a check if the position of a potential dot character is after the last position of a slash character. This dot charachter will be treated as a extension naming. Dots within the path then ignored. ASTERISK-28892 Reported-By: Nicholas John Koch Change-Id: I2ec35a613413affbf5fcc01c8c181eba24865b9e
-
- Feb 11, 2020
-
-
Sean Bright authored
The change to res_config_odbc that allowed empty strings to be returned to realtime consumers¹ causes a warning to be emitted when loading MoH classes. So we need to treat an empty 'format' as if it was not specified to avoid the warning. ASTERISK-28735 #close Reported by: Ross Beer [1] https://gerrit.asterisk.org/c/asterisk/+/13722 Change-Id: I9a271d721e1a0973e80ebe7d75b46a0d8fa0e5a5
-
- Sep 25, 2019
-
-
Sean Bright authored
Allow the list of files to be played to be provided explicitly in the music class's configuration. The primary driver for this change is to allow URLs to be used for MoH. Change-Id: I9f43b80b43880980b18b2bee26ec09429d0b92fa
-
- Sep 10, 2019
-
-
sungtae kim authored
This fix allows a realtime moh class to be unregistered from the command line. This is useful when the contents of a directory referenced by a realtime moh class have changed. The realtime moh class is then reloaded on the next request and uses the new directory contents. ASTERISK-17808 Change-Id: Ibc4c6834592257c4bb90601ee299682d15befbce
-
- Aug 01, 2019
-
-
Sean Bright authored
Change-Id: Ic476a56608b1820ca93dcf68d10cd76fc0b94141
-
- Jul 29, 2019
-
-
Sean Bright authored
Change-Id: Ib0a4b41e5ececbe633079e2d8c2b66c031d2d1f2
-
- Mar 08, 2019
-
-
Sean Bright authored
Change-Id: I481fabd8eaf2e4e7ffb5c8285b294742826e7d12
-
- Oct 19, 2018
-
-
Corey Farrell authored
These macros have been documented as legacy for a long time but are still used in new code because they exist. Remove all references to: * ao2_container_alloc_options * ao2_t_container_alloc_options * ao2_t_container_alloc These macro's are also removed. Only ao2_container_alloc remains due to it's use in over 100 places. Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
-
- Sep 07, 2018
-
-
Frederic LE FOLL authored
On MOH activation, moh_files_readframe() is called while the current stream attached to the channel is NULL and it calls ast_moh_files_next() immediately. However, it won't call ast_moh_files_next() again if sample reading fails. The failure may occur because res_musiconhold retains the last sample reading position in the channel data and MOH during the previous hold/retrieve just reached EOF. Obviously, a bit of bad luck is required here. * Restructured moh_files_readframe() to try a second time to start MOH if there was no stream setup and the saved position was at EOF. Also added comments describing what is going on for each step. ASTERISK-28029 Change-Id: I1508cf2c094f8feca22d6f76deaa9fdfa9944860
-
- May 11, 2018
-
-
Corey Farrell authored
This fixes build warnings found by GCC 8. In some cases format truncation is intentional so the warning is just suppressed. ASTERISK-27824 #close Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
-
- Apr 13, 2018
-
-
Ben Ford authored
This reverts a problem introduced by the fix for ASTERISK_24329. Now, when an announcement is played while waiting in a queue, music on hold will not restart from the beginning of the sound file and will instead pick up where it left off. However, the incorrect behavior in ASTERISK_24329 is now present again; if an announcement X seconds long is played when music on hold starts, music on hold will start X seconds into the file. ASTERISK-27774 #close Reported by: lvl Change-Id: I86b2885ee7063268f9b9747eddb788336ade989b
-
- Dec 22, 2017
-
-
Sean Bright authored
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
-
- Dec 14, 2017
-
-
Sean Bright authored
Reset the samples counter to zero when we are done playing an announcement so that we don't skip into the middle of the first file in the playlist. Also add the selected annoucement to the output of 'moh show classes.' ASTERISK-24329 #close Reported by: Thomas Frederiksen Change-Id: I2a5f986a31279c981592f49391409ebf38d6f6d0
-
- Dec 08, 2017
-
-
Sean Bright authored
There are many places in the code base where we ignore the return value of fcntl() when getting/setting file descriptior flags. This patch introduces a convenience function that allows setting or clearing file descriptor flags and will also log an error on failure for later analysis. Change-Id: I8b81901e1b1bd537ca632567cdb408931c6eded7
-
- Jul 11, 2017
-
-
George Joseph authored
By default, when res_musiconhold reloads or unloads, it sends a HUP signal to custom applications (and all descendants), waits 100ms, then sends a TERM signal, waits 100ms, then finally sends a KILL signal. An application which is interacting with an external device and/or spawns children of its own may not be able to exit cleanly in the default times, expecially if sent a KILL signal, or if it's children are getting signals directly from res_musiconhoild. * To allow extra time, the 'kill_escalation_delay' class option can be used to set the number of milliseconds res_musiconhold waits before escalating kill signals, with the default being the current 100ms. * To control to whom the signals are sent, the "kill_method" class option can be set to "process_group" (the default, existing behavior), which sends signals to the application and its descendants directly, or "process" which sends signals only to the application itself. Change-Id: Iff70a1a9405685a9021a68416830c0db5158603b
-
- May 16, 2017
-
-
Joshua Colp authored
When manipulating flags on a channel the channel has to be locked to guarantee that nothing else is also manipulating the flags. This change introduces locking where necessary to guarantee this. It also adds helper functions that manipulate channel flags and lock to reduce repeated code. ASTERISK-26789 Change-Id: I489280662dba0f4c50981bfc5b5a7073fef2db10
-
- Apr 03, 2017
-
-
Daniel Journo authored
Purge Realtime MOH classes on 'moh reload' even when musiconhold.conf hasn't changed. ASTERISK-25974 #close Change-Id: I42c78ea76528473a656f204595956c9eedcf3246
-
- Mar 27, 2017
-
-
Sean Bright authored
There doesn't appear to be any reason that we are chdir'ing in moh_scan_files, and in the event of an Asterisk crash, the core files may not get written because we have changed into a read-only directory. ASTERISK-23996 #close Reported by: Walter Doekes Change-Id: Iac806dce01b3335963fbd62d4b4da9a65c614354
-
- Mar 09, 2017
-
-
Daniel Journo authored
* res_musiconhold.c: Ensure the general section is not treated as a moh class. ASTERISK-26353 #close Change-Id: Ia3dbd11ea2b43ab3e6c820a9827811dd24bea82d
-
- Jan 24, 2017
-
-
Richard Mudgett authored
Change-Id: Ica8e8e2ce7604c2c61ec55bef07dc675361d2ea5
-
- Oct 27, 2016
-
-
Corey Farrell authored
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes all traces of it. Previously exported symbols removed: * __ast_register_file * __ast_unregister_file * ast_complete_source_filename This also removes the mtx_prof static variable that was declared when MTX_PROFILE was enabled. This variable was only used in lock.c so it is now initialized in that file only. ASTERISK-26480 #close Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
-
- Jun 08, 2016
-
-
Timo Teräs authored
POSIX defines signal.h. sys/signal.h should not be used as it is c-library internal header which may or may not exist. Notably with musl it generates warning of being incorrect. Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
-
- Mar 24, 2016
-
-
Walter Doekes authored
The log message when a MusicOnHold music class was not found was changed from debug level to WARNING level in Asterisk 11.19 and 13.5. For those using realtime musiconhold, this message is wrong because it warns before checking the database. This changeset delays the warning until after the database has been checked. Reported-by: Conrad de Wet ASTERISK-25444 #close Change-Id: I6cfb2db2f9cfbd2bb3d30566ecae361c4abf6dbf
-
- Jan 13, 2016
-
-
Sean Bright authored
There are two ways in which the reload() function in res_musiconhold can be called from the CLI: * module reload res_musiconhold.so * moh reload In the former case, the module loader holds a lock that prevents multiple concurrent calls, but in the latter there is no such protection. This patch changes the 'moh reload' CLI command to invoke the module loader directly, rather than call reload() explicitly. ASTERISK-25687 #close Change-Id: I408968b4c8932864411b7f9ad88cfdc7b9ba711c
-
- Jul 19, 2015
-
-
Michael Cargile authored
Change-Id: Ifdfbd0b97cf31478d29923ec30aabce28d01740b
-
- Apr 27, 2015
-
-
Corey Farrell authored
* 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
-
- Apr 13, 2015
-
-
Matt Jordan authored
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
-
- Sep 25, 2014
-
-
Walter Doekes authored
The new option 'preferchannelclass' is added to musiconhold.conf. If yes (the default) the CHANNEL(musicclass) is preferred when choosing the hold music. If it is no, the class suggested by the application that calls the MoH (e.g. the Queue() app) gets preferred (new behaviour). This way you set a different hold-music from the Queue-music by setting both the CHANNEL(musicclass) and the queue-context musicclass. ASTERISK-24276 #close Reported by: Kristian Høgh Patches: app_override_channel_moh.patch uploaded by Kristian Høgh (License #6639) Review: https://reviewboard.asterisk.org/r/4010/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-
- Sep 14, 2014
-
-
Walter Doekes authored
- adds sort=randstart (next to sort=, sort=random, sort=alpha) - combines duplicate moh option parsing code into a single function - adds deprecationwarnings for application=r to sort randomly - adds deprecationwarnings for random=yes to sort randomly - removes invisible code that was supposed to stay until 1.8 The sort=randstart works like sort=alpha, except we start at a random position. Review: https://reviewboard.asterisk.org/r/3991/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@423065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-
- Aug 25, 2014
-
-
Richard Mudgett authored
* Clear the channel music_state pointer before destroying the music_state object for safety. ........ Merged revisions 422037 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-
Richard Mudgett authored
Restore code removed by https://reviewboard.asterisk.org/r/3536/ that introduced a regression that prevents MOH from restarting were it left off the last time. ASTERISK-24019 #close Reported by: Jason Richards Patches: jira_asterisk_24019_v1.8.patch (license #5621) patch uploaded by rmudgett Review: https://reviewboard.asterisk.org/r/3928/ ........ Merged revisions 421976 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 421977 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421978 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421979 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-
- Aug 21, 2014
-
-
Richard Mudgett authored
Remove unneeded code that writes to the wrong file location in an obsolete format. ........ Merged revisions 421799 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 421800 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 421801 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 421802 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-