Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide
Code examples
Cisco TMSBA Programming Reference Guide
Page 51 of 53
Booking API example with a recording participant
The code snippet below show how to create a conference with two participants. One of the participants is a
recording participant, the other a video system registered in TMS.
recording participant, the other a video system registered in TMS.
// Specify username and password to authenticate to service.
// (Can also be done in web.config)
NetworkCredential credentials = new NetworkCredential("xxx", "yyy", "ZZZ");
BookingService bookingService = new BookingService();
bookingService.Credentials = credentials;
// Set API to use version 9
if (bookingService.ExternalAPIVersionSoapHeaderValue == null)
bookingService.ExternalAPIVersionSoapHeaderValue = new
BookingService.ExternalAPIVersionSoapHeader();
bookingService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 9;
BookingService.ExternalAPIVersionSoapHeader();
bookingService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 9;
// Get a default conference object, where most common values are set
// (using default values specified in TMS)
Conference conference = bookingService.GetDefaultConference();
// Create an array of participants
Participant[] participants = new Participant[2];
// Create the elements of the array (the actual participants)
participants[0] = new Participant();
participants[0].ParticipantCallType = ParticipantType.IPVideo1; // Dial-out video
participants[0].NameOrNumber = "10.47.8.170";
// get the recording aliases from the service
RecordingDevicd[] recordingDevicesWithAliases =
bookingService.GetRecordingAliases("");
bookingService.GetRecordingAliases("");
Participant tcs = new Participant();
if (recordingDevicesWithAliases != null && recordingDevicesWithAliases.Count() > 0)
{
// use the first recording device in the array
var recordingAlias = recordingDevicesWithAliases.First();
if (recordingAlias.Value != null && recordingAlias.Value.Count() > 0)
{
// use the first alias found on the first recording device
AliasInfo aliasInfo = recordingAlias.Value.First();
tcs.ParticipantCallType = ParticipantType.TMS;
tcs.ParticipantId = aliasInfo.SystemId;
tcs.NameOrNumber = aliasInfo.AliasId;
}
}
participants[1] = tcs;
conference.Participants = participants;
// Save the conference, saving the returned conference (where all values are now
specified)
specified)
conference = bookingService.SaveConference(conference);
// Output information about the conference.
Console.Out.WriteLine(conference.ConferenceInfoText);
Console.Out.WriteLine(conference.UserMessageText);
Console.Out.WriteLine(conference.ConferenceId);