Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Active speaker

James W. Brinkerhoff edited this page Sep 9, 2015 · 3 revisions

Conferences in Rayo support Active Speaker events. Rayo will send a speaking event each time that a participant in a conference starts speaking. Once an active participant stops speaking, Rayo will send a finished-speaking event.

All the events will be generated from the Conference's JID and are addressed to the call that controls the Rayo conversation. Here is a complete example:

  <!-- Instruct Rayo Server to create a conference -->
  <iq id='1234' type='set' to='9f00061@call.rayo.net/1' from='16577@app.rayo.net/1'>
    <conference xmlns='urn:xmpp:tropo:conference:1'
        name='1234'
        mute='false'
        terminator='*'
        tone-passthrough='true'
        moderator='true'>
      <announcement voice="allison">
        Jose de Castro has entered the conference
      </announcement>
      <music voice="herbert">
        The moderator has not yet joined.. Listen to this awesome music while you wait.
        <audio src='http://www.yanni.com/music/awesome.mp3' />
      </music>
    </conference>
  </iq>

  <!-- Rayo server ACKs it with the conference Ref id -->
  <iq id="1234" type="result" to="16577@app.rayo.net/1" from="9f00061@call.rayo.net/1">
    <ref xmlns="urn:xmpp:rayo:1" id="6734"/></iq>
  </iq>

  <!-- Someone starts speaking on that call. Rayo Server sends a speaking event -->
  <presence to='16577@app.rayo.net/1' from='9f00061@call.rayo.net/6734'>
    <speaking xmlns='urn:xmpp:tropo:conference:1' call-id="9f00061"/>
  </presence>

  <!-- The speaker stops speaking. Rayo Server sends a finished-speaking event -->
  <presence to='16577@app.rayo.net/1' from='9f00061@call.rayo.net/6734'>
    <finished-speaking xmlns='urn:xmpp:tropo:conference:1' call-id="9f00061"/>
  </presence>

  <!-- Another call with id 7d00034 joins the conference and starts speaking -->
  <!-- Rayo server sends a speaking event -->
  <presence to='16577@app.rayo.net/1' from='9f00061@call.rayo.net/6734'>
    <speaking xmlns='urn:xmpp:tropo:conference:1' call-id="7d00034"/>
  </presence>