Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide

Page of 68
Booking API example with a recording participant
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.
public
 
void
 SaveConferenceWithRecordingParticipant()
 
{
 
    InitBookingService();
 
    Conference conference = bookingService.GetDefaultConference(); 
 
    
 
    
// Create the elements of the array (the actual participants)
 
    
// Create one dial-out participant
 
    Participant dialOutParticipant = 
new
 Participant {ParticipantCallType = ParticipantType.IPVideo1, N
ameOrNumber = 
"10.0.1.2"
};
 
    
// Get the recording aliases for the logged in user
 
    RecordingDevice[] recordingDevicesWithAliases = bookingService.GetRecordingAliases(
""
); 
 
    Participant recordingParticipant = 
new
 Participant();
 
    
bool
 foundAliasInformation = 
false
;
 
    
if
 (recordingDevicesWithAliases != 
null
 && recordingDevicesWithAliases.Any())
 
    {
 
        
// use the first recording device in the array
var
 recordingAlias = recordingDevicesWithAliases.
First();
 
        
if
 (recordingAlias.Aliases != 
null
 && recordingAlias.Aliases.Any())
 
        {
 
            foundAliasInformation = 
true
;
 
            
// use the first alias found on the first recording device 
 
            AliasInfo aliasInfo = recordingAlias.Aliases.First();
 
            recordingParticipant.ParticipantCallType = ParticipantType.TMS;
 
            recordingParticipant.ParticipantId = aliasInfo.SystemId;
 
            recordingParticipant.NameOrNumber = aliasInfo.AliasId;
 
        }
 
    }
 
 
    
if
 (foundAliasInformation)
 
    {
 
        conference.Participants = 
new
 []
 
            {
 
                dialOutParticipant,
 
                recordingParticipant
 
            };
 
    }
 
    
else
 
    {
 
        
// no alias information found in TMS
 
        conference.Participants = 
new
[]
 
            {
 
                dialOutParticipant
 
            };
 
    }
 
 
    
// Save the conference, saving the returned conference (where all values are now specified) 
 
    conference = bookingService.SaveConference(conference);
 
 
    PrintConferenceInformation(conference);
 
}
Cisco TMSBA Programming Reference Guide
Page 61 of 68
Code examples