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

Page of 64
Externally Hosted Conference Example
The code snippet below demonstrates how to create an Externally Hosted Conference, that is, a conference with a 
given SIP video address.
public
 
void
 SaveConferenceWithExternallyHostedConference()
 
    {
 
        InitBookingService();
 
        
var
 conference = bookingService.GetDefaultConference();
 
 
        
// Add two SIP dial in participants, and one meeting room
 
        conference.Participants = 
new
[]
 
            {
 
                
new
 Participant
 
                   {
 
                        NameOrNumber = 
"SIP Dial-in 1"
, ParticipantCallType = ParticipantType.SIP
 
                   },
 
                
new
 Participant
 
                   {
 
                        NameOrNumber = 
"SIP Dial-in 2"
, ParticipantCallType = ParticipantType.SIP
 
                   },
 
                
new
 Participant
 
                   {
 
                        
// Adds a TMS participant
 
                        ParticipantCallType = ParticipantType.TMS, ParticipantId = 4
 
                   }
 
            };
 
 
        
// Add the externally hosted conference
 
        conference.ExternalConference = 
new
 ExternalConference
 
            {
 
                ExternallyHosted = 
new
 ExternalHost
 
                   {
 
                        DialString = 
"externalhost@example.com"
,
 
                   }
 
            };
 
 
        
// Save the conference, saving the returned conference (where all values are now specified) 
 
        conference = bookingService.SaveConference(conference);
 
 
        PrintConferenceInformation(conference);
 
    }
Recording Participant Example
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();
 
    
var
 conference = bookingService.GetDefaultConference(); 
 
    
 
    
// Create the elements of the array (the actual participants)
    
// Create one dial-out participant
 
    
var
 dialOutParticipant = 
new
 Participant {ParticipantCallType = ParticipantType.IPVideo1, NameOrNumber = 
"10.0.1.2"
};
 
    
// Get the recording aliases for the logged in user
 
    
var
 recordingDevicesWithAliases = bookingService.GetRecordingAliases(
""
); 
 
    
var
 recordingParticipant = 
new
 Participant();
 
    
bool
 foundAliasInformation = 
false
;
 
    
if
 (recordingDevicesWithAliases != 
null
 && recordingDevicesWithAliases.Any())
 
    {
57
Cisco TelePresence Management Suite Extension Booking API  Programming Reference Guide