Commit Graph

266 Commits

Author SHA1 Message Date
Walter Doekes 8fd6a88633 res_musiconhold: Minor cleanup.
Fix a few free()'s that should be ast_free()'s. Reverted an old
workaround that isn't necessary. Reorder a tiny bit of code.
Remove a bit of commented-out code.

Review: https://reviewboard.asterisk.org/r/3536/
........

Merged revisions 413894 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 413895 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 413896 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-05-14 15:41:42 +00:00
Kinsey Moore abd3e4040b Allow Asterisk to compile under GCC 4.10
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-09 22:49:26 +00:00
Richard Mudgett 9be438299d Add some asserts that were handy when looking for a stasis cache problem.
* Assert if a channel is destroyed but has the snapshot staging flag set.
In this case the final channel destruction snapshot would never get taken.

* Assert if what we just got out of the stasis cache is not what we were
looking for.  This assert would have saved several days searching for a
bug and a lot of my hair.

* Assert if the music on hold message posts could not find the associated
channel.  A crash will happen later when manager tries to send the MOH AMI
message.  This assert catches the problem when the stasis message is
posted instead of by the thread processing the defective message.

* Always generate a backtrace when an ast_assert() fails.

Review: https://reviewboard.asterisk.org/r/3411/
........

Merged revisions 411701 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@411702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-04 17:57:46 +00:00
Richard Mudgett f627a0aca0 res_musiconhold.c: Generate MOH start/stop events whenever the MOH stream is started/stopped.
* Made res_musiconhold.c always post the MusicOnHoldStart/MusicOnHoldStop
events when it actually starts/stops the music streams.  This allows the
events to always happen when MOH starts/stops.  The event posting code was
moved to the MOH alloc/release routines.

* Made channel_do_masquerade() stop any MOH on the original channel before
masquerading so the original channel will get a stop event with correct
information.

* Cleaned up a couple odd codings in moh_files_alloc() and moh_alloc()
dealing with the music state variable.

(issue ASTERISK-23311)
Reported by: Benjamin Keith Ford

Review: https://reviewboard.asterisk.org/r/3306/
........

Merged revisions 410493 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-12 19:06:52 +00:00
Russell Bryant fbf8700c10 moh: fix a refcount error with realtime MOH
I observed a crash in res_musiconhold on an Asterisk 11 system using realtime
MOH.  Investigation of the backtrace showed a corrupt mohclass, implying that
it got destroyed before the code expected it to.  I went looking for reference
counting errors that could have caused this crash and this patch this result.
It contains 2 changes.

1) Remove a usless block of code that was impossible to reach.  There was even
a comment indicating that it was impossible to reach.  The conditional includes
"!ast_test_flag(global_flags, MOH_CACHERTCLASSES)" and it's inside of an if
block with the opposite check "ast_test_flag(global_flags,
MOH_CACHERTCLASSES)".  There's no good reason to keep it around.

2) A similar block to #1 contained a reference counting error.  It stores
state->class in the local variable mohclass without increasing its reference
count.  The reference count on mohclass is decremented at the end of the
function.  This block of code probably very rarely runs, which would help
explain why this system was working fine for many months before experiencing a
crash.

Review: https://reviewboard.asterisk.org/r/3282/
........

Merged revisions 410043 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 410044 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 410090 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 23:43:34 +00:00
Richard Mudgett 4515cb3145 res_musiconhold.c: Remove some unnecessary RAII_VAR() usage.
* Made the moh_register() define use useful parameter names.
........

Merged revisions 409967 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-06 00:19:06 +00:00
Walter Doekes 72cb7a254f Enable wide band audio in musiconhold streams.
Review: https://reviewboard.asterisk.org/r/3112/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405766 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-17 14:17:04 +00:00
Richard Mudgett 83bf017db9 Fix incorrect usages of ast_realloc().
There are several locations in the code base where this is done:
buf = ast_realloc(buf, new_size);

This is going to leak the original buf contents if the realloc fails.

Review: https://reviewboard.asterisk.org/r/2832/
........

Merged revisions 398757 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 398758 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 398759 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398760 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-09-10 18:05:47 +00:00
Richard Mudgett 6ebfac8e70 Handle DTMF and hold wrapup when a channel leaves the bridging system.
DTMF start/end and hold/unhold events have state because a DTMF begin
event and hold event must be ended by something.

The following cases need to be handled when a channel is moved around in
the system.

* When a channel leaves a bridge it may owe a DTMF end event to the
bridge.

* When a channel leaves a bridge it may owe an UNHOLD event to the bridge.
(This case is explicitly ignored because things like transfers need
explicit control over this.)

* When a channel leaves the bridging system it may need to simulate a DTMF
end event to the channel.

* When a channel leaves the bridging system it may need to simulate an
UNHOLD event to the channel.

The patch also fixes the following:
* Fixes playing a file and restarting MOH using the latest MOH class used.

(closes issue ASTERISK-22043)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/2791/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-23 18:33:36 +00:00
Kinsey Moore 6851801a5e Resolve a merge conflict
When ast_channel_cached_blob_create was merged,
ast_channel_blob_create_from_cache was partially removed in an
unresolved merge conflict. This restores ast_channel_blob_create_from_cache
and refactors usage of ast_channel_cached_blob_create (requires an
ast_channel) to use ast_channel_blob_create_from_cache (requires a
channel uniqueid) instead.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-29 02:26:17 +00:00
Matthew Jordan 06be8463b6 Migrate a large number of AMI events over to Stasis-Core
This patch moves a number of AMI events over to the Stasis-Core message bus.
This includes:
 * ChanSpyStart/Stop
 * MonitorStart/Stop
 * MusicOnHoldStart/Stop
 * FullyBooted/Reload
 * All Voicemail/MWI related events

In addition, it adds some Stasis-Core and AMI support for generic AMI messages,
refactors the message router in AMI to use a single router with topic
forwarding for the topics that AMI cares about, and refactors MWI message
types and topics to be more name compliant.

Review: https://reviewboard.asterisk.org/r/2532

(closes issue ASTERISK-21462)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-24 20:44:07 +00:00
Matthew Jordan a0c363e227 Refactor ast_timer_ack to return an error and handle the error in timer users
Currently, if an acknowledgement of a timer fails Asterisk will not realize
that a serious error occurred and will continue attempting to use the timer's
file descriptor.  This can lead to situations where errors stream to the
CLI/log file.  This consumes significant resources, masks the actual problem
that occurred (whatever caused the timer to fail in the first place), and
can leave channels in odd states.

This patch propagates the errors in the timing resource modules up through
the timer core, and makes users of these timers handle acknowledgement
failures.  It also adds some defensive coding around the use of timers
to prevent using bad file descriptors in off nominal code paths.

Note that the patch created by the issue reporter was modified slightly for
this commit and backported to 1.8, as it was originally written for
Asterisk 10.

Review: https://reviewboard.asterisk.org/r/2178/

(issue ASTERISK-20032)
Reported by: Jeremiah Gowdy
patches:
  jgowdy-timerfd-6-22-2012.diff uploaded by Jeremiah Gowdy (license 6358)
........

Merged revisions 375893 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 375894 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 375895 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375896 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-11-05 23:10:14 +00:00
Andrew Latham c7857504df Doxygen Updates - Title update
Update and extend the configuration_file group and enable linking to the resource.  Update title that was left behind many years ago.

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-14 21:44:27 +00:00
Matthew Jordan a094707d51 Fix a variety of ref counting issues
This patch resolves a number of ref leaks that occur primarily on Asterisk
shutdown.  It adds a variety of shutdown routines to core portions of
Asterisk such that they can reclaim resources allocate duringd initialization.

Review: https://reviewboard.asterisk.org/r/2137
........

Merged revisions 374177 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 374178 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 374196 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-02 01:47:16 +00:00
Andrew Latham e11cc29360 Doxygen Cleanup
Start adding configuration file linking and pages.  Add module loading doxygen block.

Breaking up commits to keep it easy to track

(issue ASTERISK-20259)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01 23:24:10 +00:00
Matthew Jordan 016dfa01f1 Fix places in resources where a negative return value could impact execution
This patch addresses a number of modules in resources that did not handle the
negative return value from function calls adequately.  This includes:

* res_agi.c: if the result of the read function is a negative number,
indicating some failure, the result would instead be treated as the number
of bytes read.  This patch now treats negative results in the same manner
as an end of file condition, with the exception that it also logs the
error code indicated by the return.

* res_musiconhold.c: if spawn_mp3 fails to assign a file descriptor to srcfd,
and instead assigns a negative value, that file descriptor could later be
passed to functions that require a valid file descriptor.  If spawn_mp3 fails,
we now immediately retry instead of continuing in the logic.

* res_rtp_asterisk.c: if no codec can be matched between two RTP instances
in a peer to peer bridge, we immediately return instead of attempting to
use the codec payload type as an index to determine the appropriate negotiated
codec.

(issue ASTERISK-19655)
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/1863/
........

Merged revisions 362362 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 362364 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 21:14:49 +00:00
Walter Doekes fc63e07135 Avoid cppcheck warnings; removing unused vars and a bit of cleanup.
Patch by: junky
Review: https://reviewboard.asterisk.org/r/1743/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17 18:57:40 +00:00
Terry Wilson 786f5898d1 Finalize ast_channel opaquification
Review: https://reviewboard.asterisk.org/r/1786/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-13 18:20:34 +00:00
Richard Mudgett e063fa6b3f Fix REF_DEBUG compile errors.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-28 20:34:11 +00:00
Terry Wilson ebaf59a656 Opaquification for ast_format structs in struct ast_channel
Review: https://reviewboard.asterisk.org/r/1770/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-24 00:32:20 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

Review: https://reviewboard.asterisk.org/r/1661/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Jonathan Rose de09749470 Add an announcement option to music-on-hold - plays sound when put on hold/between songs
This is a feature patch which allows an 'announcement' option to be specified in
musiconhold.conf which should be set to the name of a sound. If a valid sound is
specified for this option, then it will be played on that music on hold class whenever
a channel bound to that class is put on hold as well as when Asterisk is able to detect
that a song has ended before starting the next song (excludes external players).

(closes ASTERISK-18977)
Reported by: Timo Teräs
Patches:
	asterisk-moh-announcement.diff uploaded by Timo Teräs (license 5409)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-23 18:34:47 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

Review: https://reviewboard.asterisk.org/r/1655/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Matthew Jordan d9651f2be9 Fix timing source dependency issues with MOH
Prior to this patch, res_musiconhold existed at the same module priority level
as the timing sources that it depends on.  This would cause a problem when
music on hold was reloaded, as the timing source could be changed after
res_musiconhold was processed.  This patch adds a new module priority level,
AST_MODPRI_TIMING, that the various timing modules are now loaded at.  This
now occurs before loading other resource modules, such that the timing source
is guaranteed to be set prior to resolving the timing source dependencies.

(closes issue ASTERISK-17474)
Reporter: Luke H
Tested by: Luke H, Vladimir Mikhelson, zzsurf, Wes Van Tlghem, elguero, Thomas Arimont
Patches:
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-1.8.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3_branch-10.diff uploaded by elguero (License #5026)
 asterisk-17474-dahdi_timing-infinite-wait-fix_v3.diff uploaded by elguero (License #5026)

Review: https://reviewboard.asterisk.org/r/1578/
........

Merged revisions 349194 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 349195 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@349196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-27 20:55:15 +00:00
Tilghman Lesher 77b670c4ab Allow each logging destination and console to have its own notion of the verbosity level.
Review: https://reviewboard.asterisk.org/r/1599


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-29 18:43:16 +00:00
Terry Wilson 6d05a31d9f Resume playing existing hold music for cached realtime MOH
As a result of the fix for ASTERISK-18039, realtime caching MOH no longer
properly resumes playing back a file between different holds in the same call.
This is because scanning for new files causes the existing file array to be
emptied and we were just comparing that the saved pointer to the filename
matched the pointer to the filename in a particular position in the array. An
easy fix is to save the filename instead of a pointer to it and then do a
strcmp instead of comparing the addresses.

(closes issue ASTERISK-18912)
Review: https://reviewboard.asterisk.org/r/1596/
........

Merged revisions 346030 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 346031 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346033 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-23 16:12:34 +00:00
Terry Wilson bd486fcf41 Don't forget to rescan MOH files for cached realtime classes
Realtime MOH class caching was implemented because without it, you would build
a completely new MOH class and would start the music over at the beginning each
time hold was pressed in a conversation. Unfortunately, this broke re-scanning
for file changes for realtime MOH classes. This patch corrects that issue.

(closes issue ASTERISK-18039)
Review: https://reviewboard.asterisk.org/r/1579/
........

Merged revisions 344899 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 344900 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-12 00:36:37 +00:00
Jonathan Rose 364eb56835 Merged revisions 336717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r336717 | jrose | 2011-09-19 15:16:23 -0500 (Mon, 19 Sep 2011) | 14 lines
  
  Merged revisions 336716 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r336716 | jrose | 2011-09-19 15:07:36 -0500 (Mon, 19 Sep 2011) | 7 lines
    
    Document applications that play audio and do not answer unanswered calls.
    
    This patch is part of an effort to document early media and its usage. If you are
    interested in contributing to this documentation effort, there are probably other
    applications worth documenting as well as an Asterisk wiki article at
    https://wiki.asterisk.org/wiki/display/AST/Early+Media+and+the+Progress+Application
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@336732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-19 20:23:29 +00:00
Richard Mudgett 35e27201c7 Merged revisions 334357 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334357 | rmudgett | 2011-09-02 16:08:16 -0500 (Fri, 02 Sep 2011) | 26 lines
  
  Merged revisions 334355 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334355 | rmudgett | 2011-09-02 15:59:49 -0500 (Fri, 02 Sep 2011) | 19 lines
    
    MusicOnHold has extra unref which may lead to memory corruption and crash.
    
    The problem happens when a call is disconnected and you had started a MOH 
    class that does not use the files mode.  If you define REF_DEBUG and 
    recreate the problem, it will announce itself with the following warning: 
    Attempt to unref mohclass 0xb70722e0 (default) when only 1 ref remained, 
    and class is still in a container!  
    
    * Fixed moh_alloc() and moh_release() functions not handling the
    state->class reference consistently.
    
    (closes issue ASTERISK-18346)
    Reported by: Mark Murawski
    Patches:
          jira_asterisk_18346_v1.8.patch (license #5621) patch uploaded by rmudgett
    Tested by: rmudgett, Mark Murawski
    
    Review: https://reviewboard.asterisk.org/r/1404/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 21:09:31 +00:00
Kinsey Moore 38efff0ca3 Merged revisions 331039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r331039 | kmoore | 2011-08-08 15:53:30 -0500 (Mon, 08 Aug 2011) | 18 lines
  
  Merged revisions 331038 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r331038 | kmoore | 2011-08-08 15:52:45 -0500 (Mon, 08 Aug 2011) | 11 lines
    
    In-queue MOH stops after a periodic announcement
    
    If the seek value is past the end of file when resuming G.722 MOH, MOH will
    cease to function for the duration of the MOH session through all starts and
    stops until saved state is cleared.  Adjusting the code to guarantee a single
    valid read (which is already assumed) fixes the bug.
    
    (closes issue ASTERISK-18077)
    Review: https://reviewboard.asterisk.org/r/1328/
    Tested-by: Jonathan Rose <jrose@digium.com>
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@331040 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-08 20:54:14 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
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-07-14 20:28:54 +00:00
Jonathan Rose b156c7f0ad Merged revisions 325821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r325821 | jrose | 2011-06-30 14:17:32 -0500 (Thu, 30 Jun 2011) | 10 lines
  
  Fixes an issue with Music on Hold classes losing files in playlist when realtime is used.
  
  The bug occurs rather intermittently and I relied on the reporters to test the patch.
  After a sanity check and some testing, I'm giving it an OK.
  
  (closes issue ASTERISK-17875)
  Reported by: David Cunningham
  Patches: 
        res_musiconhold.c.mohrt17875_v1 uploaded by Igor Goncharovsky (license #5009)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-30 19:31:51 +00:00
Jonathan Rose bacc0a0c91 Merged revisions 325152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r325152 | jrose | 2011-06-28 10:46:29 -0500 (Tue, 28 Jun 2011) | 5 lines
  
  Fixes moh reload breaking custom mode moh classes when the config file is untouched
  
  (closes issue ASTERISK-17730)
  Reported by: sdolloff
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@325153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-06-28 16:04:18 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
David Vossel 7f23115ad2 New HD ConfBridge conferencing application.
Includes a new highly optimized and customizable
ConfBridge application capable of mixing audio at
sample rates ranging from 8khz-192khz.

Review: https://reviewboard.asterisk.org/r/1147/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-21 18:11:40 +00:00
Paul Belanger 3556e4c2d4 Replace ast_log(LOG_DEBUG, ...) with ast_debug()
(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-04 16:55:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
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
2011-02-03 16:22:10 +00:00
Jason Parker 20fefec7a3 Merged revisions 305473 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r305473 | qwell | 2011-02-01 11:04:23 -0600 (Tue, 01 Feb 2011) | 23 lines
  
  Merged revisions 305472 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r305472 | qwell | 2011-02-01 11:02:09 -0600 (Tue, 01 Feb 2011) | 16 lines
    
    Merged revisions 305471 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r305471 | qwell | 2011-02-01 11:00:55 -0600 (Tue, 01 Feb 2011) | 9 lines
      
      Close file descriptor for timing source when a MOH class gets destroyed.
      
      (closes issue #18457)
      Reported by: mcallist
      Patches: 
            18457-closetimer.diff uploaded by qwell (license 4)
            18457-closetimer_trunk.diff uploaded by qwell (license 4)
      Tested by: qwell, loloski
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-01 17:05:38 +00:00
Jason Parker 0bed3e751a Merged revisions 305198 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r305198 | qwell | 2011-01-31 15:30:44 -0600 (Mon, 31 Jan 2011) | 2 lines
  
  Fix compile error.  pseudofd no longer exists.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 21:31:31 +00:00
Jason Parker 5edeada22a Merged revisions 305131 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r305131 | qwell | 2011-01-31 15:00:25 -0600 (Mon, 31 Jan 2011) | 16 lines
  
  Merged revisions 305130 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r305130 | qwell | 2011-01-31 14:59:37 -0600 (Mon, 31 Jan 2011) | 9 lines
    
    Merged revisions 305129 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r305129 | qwell | 2011-01-31 14:56:25 -0600 (Mon, 31 Jan 2011) | 2 lines
      
      Set file descriptors to -1 on creation, so that we don't see weirdness later.
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-31 21:01:28 +00:00
Tilghman Lesher 41260a6f20 Merged revisions 292376 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292376 | tilghman | 2010-10-19 19:40:29 -0500 (Tue, 19 Oct 2010) | 5 lines
  
  Oops.  This module uses the generic timer and no longer uses DAHDI.
  
  This causes a problem with the Solaris and other system builds that have gcc
  4.1 (where optional_api is non-optional).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-20 00:41:49 +00:00
Tzafrir Cohen 4d6eac5282 Merged revisions 292050 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r292050 | tzafrir | 2010-10-16 12:47:00 +0200 (ש', 16 אוק 2010) | 22 lines
  
  Merged revisions 292049 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r292049 | tzafrir | 2010-10-16 12:03:04 +0200 (ש', 16 אוק 2010) | 15 lines
    
    Base directory for MOH should be ASTDATADIR
    
    If the directive 'directory' is relative, make it relative to the
    datadir, rather than to the varlibdir. In the sample configuration
    it is relative ('moh').
    
    This has no effect unless you have actively set the datadir explicitly
    (at build time or at run time).
    
    (closes issue #16906)
    Patches:
          moh_datadir uploaded by tzafrir (license 46)
    
    Review: https://reviewboard.asterisk.org/r/974/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@292052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-16 11:51:54 +00:00
Brett Bryant 49d3bdd14c Merged revisions 285640 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285640 | bbryant | 2010-09-09 13:23:28 -0400 (Thu, 09 Sep 2010) | 21 lines
  
  Merged revisions 285639 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r285639 | bbryant | 2010-09-09 13:22:25 -0400 (Thu, 09 Sep 2010) | 14 lines
    
    Merged revisions 285638 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r285638 | bbryant | 2010-09-09 13:20:17 -0400 (Thu, 09 Sep 2010) | 7 lines
      
      Fixes an issue with MOH where it doesn't recover cleanly when it can't play a file and would just stop, instead of continuing to find the next playable file in the MOH class.
      
      (closes issue #17807)
      Reported by: kshumard
      
      Review: https://reviewboard.asterisk.org/r/910/
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285641 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-09 17:25:24 +00:00
Jason Parker ef247c398f Merged revisions 285530 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285530 | qwell | 2010-09-08 15:43:10 -0500 (Wed, 08 Sep 2010) | 9 lines
  
  Merged revisions 285529 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r285529 | qwell | 2010-09-08 15:42:44 -0500 (Wed, 08 Sep 2010) | 1 line
    
    Follow coding guidelines in moh rescan fix.  Also fix the documentation that got me in trouble.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-08 20:43:38 +00:00
Jason Parker d077b0f081 Merged revisions 285527 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r285527 | qwell | 2010-09-08 15:32:13 -0500 (Wed, 08 Sep 2010) | 15 lines
  
  Merged revisions 285526 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ........
    r285526 | qwell | 2010-09-08 15:31:43 -0500 (Wed, 08 Sep 2010) | 8 lines
    
    Fixes issue where moh files were no longer rescanned during a reload.
    
    (closes issue #16744)
    Reported by: pj
    Patches: 
          16744-reload.diff uploaded by qwell (license 4)
    Tested by: qwell
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@285528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-08 20:32:49 +00:00
Tilghman Lesher 3170dab50d Merged revisions 283770 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r283770 | tilghman | 2010-08-26 18:47:02 -0500 (Thu, 26 Aug 2010) | 8 lines
  
  Convert MOH to use generic timers.
  
  (closes issue #17726)
   Reported by: lmadsen
   Patches: 
         20100825__issue17726__2.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283771 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-26 23:51:55 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Tilghman Lesher f12afaaebc Add documentation for MOH realtime fields
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 20:25:11 +00:00
Tilghman Lesher 621a86db18 If there is realtime configuration, it does not get re-read on reload unless the config file also changes.
(closes issue #16982)
 Reported by: dmitri
 Patches: 
       res_musiconhold.patch uploaded by dmitri (license 1001)
 Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-23 21:53:49 +00:00