VobizConference turns the current call into a conference: you dial more people in and manage them while you stay on the call. Vobiz mixes the audio in a conference room.
How it works
Moving a call into a room, dialling people, and muting them are Vobiz REST API calls that need your account Auth Token, which must never be in the app. SoVobizConference asks your server, and your server makes those calls. Your server implements four routes (see Server routes).
- The first
addmoves both sides of the call into a new room, with the Transfer API, and dials the new person into it with the Call API. - Later
addcalls only dial. - While the conference is on, the class polls your server for the state and exposes it as a
ValueListenable. - When the conference ends, the class hangs up the call.
Create a conference
Signature
Call
dispose() when you no longer need the object.
Add people
Signature
Returns the conference state. Throws
StateError when there is no answered call (a held call is refused), ArgumentError for a malformed target, and VobizException (conference_failed) when your server refuses.
Manage participants
Signature
These act on the participant for everyone in the room. To mute your own microphone, use
client.mute().
Read the state
Signature
state is null until the call is a conference, and goes back to null when the call ends. refresh() fetches the state now and returns null when your server says the call isn’t a conference. end() ends the conference for everyone and hangs up this call.
Server routes
Your server implements four JSONPOST routes under serverUrl. Each answers with the conference state, and authenticates the app with the headers you pass.
Every route returns:
status is one of connecting, dialing, joined, on_hold, left, or failed. When the conference has ended, return "active": false and an optional "ended_reason". An error reply is {"error": "...", "conference": { ...state }}; the state in it, if present, is still applied.
The SDK’s example app includes a reference implementation of these routes in its push bridge (example/push_bridge). It also ends the room about 2 seconds after the host’s app stops reporting, so a host who loses the network doesn’t leave the others in an empty call.