Connect to conference room, in audio

This example shows how to connect to an audio conference room. Check your JavaScript console while testing to see what's happening in the background !

Join a conference room in audio mode : CLIENT.call(callDetailsObject, callbackObject). This JavaScript call will trigger your External Script (and pass the callDetailsObject as URL parameters), that must return an XML string instructing APIdaze to start a conference room (the name of the conference is managed from the External Script):

callDetailsObject

          {
            command : "JoinRoom", // optional
            userName : "guest",   // optional
          }
          

callbackObject Contains a list of functions that execute when conference events are triggered (join/leeave events, initial members list, etc.) :

          {
            onRoomMembersInitialList: function(members) {
              console.log('Got members for this room : ' + JSON.stringify(members));
            },
            onRoomAdd: function(member) {
              console.log('New member joined room : ' + JSON.stringify(member));
            },
            onRoomDel: function(member) {
              console.log('Member left room : ' + JSON.stringify(member));
            },
            onRoomTalking: function(member) {
              console.log('Start/stop talking event from a member : ' + JSON.stringify(member));
            },
            onHangup: function(){
              console.log('I left the room');
            }
          }
          

XML return from External Script

          <document>
            <work>
              <answer />
              <wait>1</wait>
              <speak>Welcome, you are joining the conference.</speak>
              <conference>test</conference>
              <hangup />
            </work>
          </document>
          

API key :