Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide
Code examples
Cisco TMSBA Programming Reference Guide
Page 50 of 53
Booking API example
When using the API as a web reference, the ParticipantsTypes for "IP Video", "ISDN Video" and so on are
created as enumerations called IPTel, IPTel1, and so on. Values ending in 1 are dial-out, values not
ending in 1 are dial-ins.
created as enumerations called IPTel, IPTel1, and so on. Values ending in 1 are dial-out, values not
ending in 1 are dial-ins.
The code snippet below shows how to create a conference to two external participants (specified by IP
address). A Cisco TelePresence MCU is required for this call to be saved.
address). A Cisco TelePresence MCU is required for this call to be saved.
// 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.ExternalAPIVersionSoapHeader();
bookingService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 9;
// Get a default conference object, where most common values are set
// (using default values specified in Cisco 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";
participants[1] = new Participant();
participants[1].ParticipantCallType = ParticipantType.IPVideo1; // Dial-out video
participants[1].NameOrNumber = "10.47.8.171";
// Add the participants to the conference.
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);