asterisk/res/stasis
Matthew Jordan df5dbbd878 res_stasis: Don't play MoH to channels by default when added to holding bridges
When ARI manipulates a bridge, it generally doesn't care what the mixing
technology is. Operations on a bridge initiated through ARI should perform
their action in generally the same way, regardless of the bridge's mixing
technology. While the mixing technology may determine how media flows to
channels, the actual operations on a bridge themselves should be the same.

Currently, this isn't the case with holding bridges. When a channel joins
without a role, MoH is started on that channel automatically. Subsequent bridge
operations that would stop MoH would fail (as there is no Announcer channel
playing MoH to the bridge). Starting MoH on the bridge will also create two
MoH streams: one from the MoH being played on the participant channel, and one
from the announcer channel. From the perspective of ARI users, this is
counter-intuitive - I would not expect MoH to be started for me. The mixing
technology determines how media is shared between participants, not the
application experience.

This patch does the following:
 * The Stasis bridge class now inspects channels as they are going into a
   bridge. If the bridge has a holding capability, and the channel has no
   roles, we give it a participant role and mark the default behaviour to have
   no entertainment. This allows addChannel operations to continue to set a
   participant role with an entertainment option if it felt like it (or could
   do it).
 * The music on hold channel is now Stasis approved (tm)

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

ASTERISK-24264 #close
Reported by: Samuel Galarneau
Tested by: Samuel Galarneau 
........

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

Merged revisions 422504 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422505 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-01 14:15:32 +00:00
..
app.c Stasis: Add information to blind transfer event 2014-08-20 13:06:33 +00:00
app.h Stasis: Convey transfer information to applications 2014-08-07 15:30:19 +00:00
command.c ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
command.h ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
control.c ARI: Fix a crash caused by hanging during playback to a channel in a bridge 2014-08-22 16:52:51 +00:00
control.h Stasis: Convey transfer information to applications 2014-08-07 15:30:19 +00:00
messaging.c stasis: Fix compilation issue with ao2 tagged objects 2014-08-05 21:48:05 +00:00
messaging.h Clean up files that do not end with newlines 2014-08-21 14:52:28 +00:00
stasis_bridge.c res_stasis: Don't play MoH to channels by default when added to holding bridges 2014-09-01 14:15:32 +00:00
stasis_bridge.h ARI: Make mixing bridges propagate linkedids and accountcodes. 2014-07-09 16:34:51 +00:00