res_musiconhold.c: Generate MOH start/stop events whenever the MOH stream is started...
authorRichard Mudgett <rmudgett@digium.com>
Wed, 12 Mar 2014 19:06:52 +0000 (19:06 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Wed, 12 Mar 2014 19:06:52 +0000 (19:06 +0000)
commitf627a0aca050b5502f811710402ec52bb3681e11
tree30738900688e7ff8ab7cee293ed947af6dd93404
parentde3dc17cc54c105c0671327dfab8d085d134054e
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
main/channel.c
res/res_musiconhold.c