Joining a standalone VoxImplant conference

223 Views Asked by At

I have a simple VoxImplant scenario which creates a standalone conference and calls its participants:

require(Modules.Conference);

VoxEngine.addEventListener(AppEvents.Started, () => {
  let conf = VoxEngine.createConference();
  let { users } = JSON.parse(VoxEngine.customData());
  users.forEach((username) => {
    let call = VoxEngine.callUser({username: username, callerid: "root", displayName: "Whatever" });
    call.addEventListener(CallEvents.Connected, (e) => { VoxEngine.sendMediaBetween(conf, e.call); });
  });
});

I use StartScenarios endpoint to initiate the conference.

The calls arrive, users can answer them and hear each other. But what if they decline and decide to join later? I can see callConference methods in SDKs but they require conferenceId, how can I get it? Conference object doesn't seem to have id property, neither do ConferenceParameters.

VoxImplant conference sample has create_conference endpoint which inserts a record into a database and returns primary key but it seems to be unused.

1

There are 1 best solutions below

0
On BEST ANSWER

Should use StartConference endpoint instead of StartScenario, it has conference_name parameter. Generate and pass conference name there, and pass the same name to callConference in order to join a running conference.