Avaya Client SDK

< Back to Package Overview

Monitoring Participant Events

Using the Client SDK, you can easily monitor participant related events in a conference call.

For monitoring events related to the conference CSParticipant (e.g., new participants joining the conference or participants dropping from the conference), you can define an object that implements the <CSConferenceDelegate> protocol.

Implement CSConferenceDelegate protocol

To monitor participants joining or leaving a conference, implement the <CSConferenceDelegate> protocol for the CSConference object. The method conference:participantsDidChange:changedParticipants: provides notifications whenever there is a change in the list of the active participants (CSActiveParticipant).

@interface AppConferenceHandler() 
...
@end

@implementation AppConferenceHandler

    - (void)   conference: (CSConference*) conference
    participantsDidChange: (CSDataCollectionChangeType) changeType
      changedParticipants: (NSArray*) changedParticipants {     

        // Called to report that there is a change in the list of the 
        // active participants. CSDataCollectionChangeType indicates the type  
        // of changes in the list (i.e. added, updated, deleted or cleared).

        switch (changedType) {
            case CSDataCollectionChangeTypeAdded:
            case CSDataCollectionChangeTypeUpdated:
            case CSDataCollectionChangeTypeDeleted:
                // The changedParticipants is an array of CSActiveParticipant 
                // objects that have changed.
                // Add code to update application UI for added/updated/deleted
                // participants.
                break;
            case CSDataCollectionChangeTypeCleared:
                // Add code to remove all the previous participant information
                // from the UI application.
                break;
        }
    }

    ...

@end

Add conference delegate implemetation to Conference

To monitor changing of active participants for the conference, instantiate a conference handler (AppConferenceHandler) and add it as a delegate to the CSConference object.

AppConferenceHandler* conferenceHandler = [[AppConferenceHandler alloc] init];
call.conference.delegate = conferenceHandler;