# Conference

The Conference resource encapsulates a single instance of a conference resource on the media server. This resource contains the media streams that are currently included in the active conference.

## XML Definition

<conference identifier="<identifier>" appid="<appid>"
href="http://server/dialogicwebservice/mediacontrol/conferences/<identifier>">
<mediastream identfier="<stream identifier>" action=”<action>” mute="<mute>" />
<mediastream identfier="<stream identifier>" action=”<action>” mute="<mute>" />
<mediastream identfier="<stream identifier>" action=”<action>” mute="<mute>" />
...
</conference>

## Conference Properties

Name | Description | Type | Input / Output | Optional / Mandatory
identifier | Unique identifier assigned to the specific instance of the resource. This identifier is used by the web service client when performing actions on the resource. | String | Output | N/A
appid | Unique application id included in the original HTTP POST creation process that is utilized by the web service such that clients only have access to resources that they created. | String | Output | N/A
href | An HTTP reference to the specific resource. | String | Output | N/A
action | Action to perform. Values: add, remove, update. Default: add | String | Input / Output | Optional
mute | Do not mix audio from this leg into the conference if "yes". Mix audio into the conference if "no". Mix audio to buddies, if on their list. Values: yes, no, buddies. | String | Input / Output | Optional

##
Interaction Diagram

### Conference Creation

The following diagram illustrates the Conference creation process.

### Conference Deletion

The following diagram illustrates the Conference deletion process.

### Conference Adding Party

The following diagram illustrates the Conference add party process.

### Conference Removing Party

## Java Sample Code

public void CreateConference() {
logger.info("Conference:: CreateConference - Entered.");
//Create a HttpURLConnection with the correct server
//Send request to create an empty conference and retrieve response
String requestBody = "<conference> </conference>";
HttpURLConnection connection = utils.SendHTTPRequest("http://" + MainSipServlet.MWSHost + ":81/DialogicWebService/mediacontrol/conferences",
"POST",
requestBody);
if (connection != null) {
xmlDoc = utils.GetHTTPXMLResponse(connection);
}
//Retrieve response codes
int responseCode = 0;
try {
responseCode = connection.getResponseCode();
} catch (IOException ex) {
Logger.getLogger(MainSipServlet.class.getName()).log(Level.SEVERE, null, ex);
}
String responseMessage = "";
try {
responseMessage = connection.getResponseMessage();
} catch (IOException ex) {
Logger.getLogger(MainSipServlet.class.getName()).log(Level.SEVERE, null, ex);
}
String responseLocation = connection.getHeaderField("location");
//close the connection
connection.disconnect();
//log results
logger.info("Conference:: CreateConference - Http response code =" + responseCode);
logger.info("Conference:: CreateConference - Http response message =" + responseMessage);
logger.info("Conference:: CreateConference - Http response location =" + responseLocation);
if (responseCode == 201) {
conferenceRef = responseLocation;
identifier = ParseIdentifier();
}
logger.info("Conference:: CreateConference - Exited.");
}