Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide
Booking example where one occurrence is saved
as defective
as defective
The code snippet below demonstrates how to create a conference with two participants. One of the
participants is a recording participant, the other a video system registered in TMS.
participants is a recording participant, the other a video system registered in TMS.
public
void
SaveConferenceOneInstanceBecomesDefective()
{
InitBookingService();
var
start = DateTime.Now.AddHours(1);
var
end = start.AddMinutes(10);
var
conflictingConference = bookingService.GetDefaultConference();
// Conflicting conference starts tomorrow
conflictingConference.StartTimeUTC = start.AddDays(1).ToString(
"u"
);
conflictingConference.EndTimeUTC = end.AddDays(1).ToString(
"u"
);
var
conflictingParticipant =
new
Participant
{
ParticipantCallType = ParticipantType.TMS,
ParticipantId = 1009
};
// Add two SIP dial in participants, and one meeting room
conflictingConference.Participants =
new
[] { conflictingParticipant };
// Save the conference, saving the returned conference (where all values are now specified)
conflictingConference = bookingService.SaveConference(conflictingConference);
// Create a daily, recurrent conference, which will conflict on instance number 2 (tomorrow)
var
conference = bookingService.GetDefaultConference();
conference.StartTimeUTC = start.ToString(
"u"
);
conference.EndTimeUTC = end.ToString(
"u"
);
conference.Participants =
new
[] { conflictingParticipant };
conference.RecurrencePattern =
new
RecurrencePattern
{
FrequencyType = RecurringFrequency.Daily,
PatternEndType = RecurrenceEndType.EndByInstances,
PatternInstances = 3,
Interval = 1,
};
// This save invocation will result in the 2nd instance in the recurrent series being defective
// The returned conference will be marked with ConferenceState == Defective if > 0 instances are
defective in the series:
var
savedConferenceResult = bookingService.SaveConferenceWithMode(conference,
BookingMode.BestEffortForced);
var
savedConference = bookingService.GetRecurrentConferenceById
(savedConferenceResult.Conference.ConferenceId);
Assert.That(savedConference.ConferenceState.Status, Is.EqualTo(ConferenceStatus.Defective));
PrintConferenceInformation(conflictingConference);
}
Cisco TelePresence Management Suite Extension Booking API Programming Reference Guide (14.6)
Page 75 of 81
Code examples
Booking example where one occurrence is saved as defective