Skip to content

Latest commit

 

History

History
134 lines (106 loc) · 3.86 KB

File metadata and controls

134 lines (106 loc) · 3.86 KB

Restcomm JAVA Sdk - Conferences

Conferences

The <Conference> Resource Object represents a single conference originated and terminated from an account.

Fetching a Conference

A Conference with a given Sid can be fetched by the following code snippet

  String Sid;
  .
  .
  .
  Conference Conf1 = Conference.getConference(Sid);

Accessing the Fetched Conference

A Field of a Conference Object can be accessed by using the corresponding getMethod for that Field

  String Name;
  Name = Conf1.getFriendly_name().

List of Fields

Property Method

Sid

getSid().

FriendlyName

getFriendly_name().

Status

getStatus().

DateCreated

getDate_created().

DateUpdated

getDate_updated().

AccountSid

getAccount_sid().

ApiVersion

getApi_version().

Uri

getUri().

In addition to these, There are methods available to access the List of Participants in a Live Conference.

Participants

A Participant represents a single participant currently connected to a running conference. It is idefiable by its CallSid.

Fetching a Participant with a given Sid from a Live Conference by its CallSid.

  String Callsid;
  .
  .
  .
  Participant jack = Conf1.getParticipant(Callsid);

Fetching the List of Participants in a Live Conference

  ParticipantList Plist = Conf1.getParticipantList();

The different Fields of the Participant calls that can be accessed using the corresponding getMethod().

Fields Method

CallSid

getCall_sid().

ConferenceSid

getConferenceSid().

DateCreated

getDate_created().

DateUpdated

getDate_updated().

AccountSid

getAccount_sid().

Muted

getMuted().

StartConferenceOnEnter

getStart_conference_on_enter().

EndConferenceOnExit

getEnd_conference_on_exit().

Uri

getUri().

If you need to mute any particular Participant in a Live conference,

  Participant jack ;
  .
  .
  .
  jack.Mute("True");

If you want to capture the new Muted Participant Call,

  jack = jack.Mute("True");

Fetching List of Conferences

Fetching the Default List

The Default Conference List can be fetched by using the following code

  ConferenceList List = ConferenceList.getList();

Accessing the Fetched ConferenceList

The size of the Fetched List can be known by

  int size = List.size();

The a Conference from the fetched ConferenceList Object can be obtained by

  Conference a = List.get(1);

Additional Paging Information

We can also access the Additional Paging Information by using the Methods of NotificationList

  String Uri;
  Uri = List.getpreviouspageuri();

The API returns URIs to the next, previous, first and last pages of the returned list as shown in the table below:

Request Parameters

Parameter Method

Uri

geturi().

Firstpageuri

getfirstpageuri().

Nextpageuri

getnextpageuri().

Previouspageuri

getpreviouspageuri().

Lastpageuri

getlastpageuri().