-
Notifications
You must be signed in to change notification settings - Fork 4
Mixers
Mixers are used to connect multiple calls without explicitly using <join/>
to link them together:
#Joining a Mixer
Rayo Clients can join a call to a Mixer by sending a specialized <join/>
command to the call's JID:
<iq type='set' to='ab0mr6@calls.rayo.org' from='16577@app.rayo.org'>
<join mixer-name='1234' />
</iq>
In the example above the Rayo Client is requesting to join call ‘ab0mr6’ with a mixer with the name ‘1234’. This operation follows the same rules as a typical Rayo Join Command in that the join is performed synchronously and the result indicates the success or failure of the join. Upon a successful join, an additional event is sent to the client indicating that the call was joined to the mixer.
<presence to='16577@app.rayo.org' from='ab0mr6@calls.rayo.org'>
<joined mixer-name='1234' />
</presence>
Calls are unjoind from a Mixer by sending an ````` command to the participant's (e.g. call's) JID.
<iq type='set' to='ab0mr6@calls.rayo.org' from='16577@app.rayo.org'>
<unjoin mixer-name='1234' />
</iq>
When a call is unjoined from a mixer, an <unjoined/>
event is sent to notify the Rayo Client.
<presence to='16577@app.rayo.org' from='ab0mr6@calls.rayo.org'>
<unjoined mixer-name='1234' />
</presence>
#Mixer Components
Just like calls, a mixer can host media components as well. Actually, all of the standard media components work with mixers!
Playing audio to all participants
<iq type='set' to='1234@mixer.rayo.org' from='16577@app.rayo.org'>
<output xmlns='urn:xmpp:rayo:output:1' >
You have 10 minutes left in the conference.
</output>
</iq>
Recording the mixed audio
<iq type='set' to='1234@mixer.rayo.org' from='16577@app.rayo.org'>
<record xmlns='urn:xmpp:rayo:record:1'/>
</iq>
#Mixer Events
A Rayo Client can subscribe to a Mixer's events by sending directed presence to the mixer's JID:
<presence to='1234@mixer.rayo.org' />
A presence of 'unavailable' stops the flow of events to that client:
<presence to='1234@mixer.rayo.org' type='unavailable' />
Participant Notifications
Indicates that a participant has joined the mixer
<presence to='16577@app.rayo.org' from='1234@mixer.rayo.org'>
<joined call-id='abh7091' />
</presence>
Indicates that a participant has unjoined the mixer
<presence to='16577@app.rayo.org' from='1234@mixer.rayo.org'>
<unjoined call-id='abh7091' />
</presence>
Active Speaker Notifications
Fires when a participant starts speaking
<presence to='16577@app.rayo.org' from='1234@mixer.rayo.org'>
<started-speaking call-id='abh7091' />
</presence >
Fires when a participant stops speaking
<presence to='16577@app.rayo.org' from='1234@mixer.rayo.org'>
<stopped-speaking call-id='abh7091' />
</presence>
#Notes
- Make sure we suport DIRECT join for mixers
- Upgrading a DIRECT join to BRIDGED seems strange
- Join the same call again replaces the exiting join irrespective of strategy
- When sending a join command to a mixer
- If joining a call then the gateway should invert the join and send the join command to the call instead of the mixer
- If joining a mixer then the command should go to the mixer and the two mixers' audio should now be joined together (may not be supported in moho)
- Consider moving call control stuff into a 'calls' namespace instead of root rayo namespace
- Consider adding
<unjoin-all/>
command to the mixer which will unjoin all call and other mixers from it