Avaya Client SDK

< Back to Package Overview

Call Recording

Overview

Call recording enables your application to record audio calls / conferences.

  • Allows to Start / Stop / Pause / Resume call recording
  • Notifies calls about reocrding states - Off / On / Paused

It is recommended to check for the respective call recording capabilities before performing call recording actions

Checking the recording capability

Check for call recording capability over CSCallFeatureService to define recording UX behaviour

CSCallRecordingActionType actionType = CSCallRecordingActionTypeStart;
CSCapability *recordingActionCapability = [callFeatureService callRecordingCapabilityForActionType:actionType];

{{=CSCallRecordingActionType}} defines action types.

Perform call recording

Call recording action can be invoked using CSCallFeatureService

CSCallRecordingActionType actionType = CSCallRecordingActionTypeStart;
[callFeatureService performCallRecordingWithActionType:actionType completionHandler:^(NSError *error) {
    if (error) {
        NSDictionary *errorInfo = [error userInfo];
        NSString *errorDescription = [errorInfo objectForKey:NSLocalizedDescriptionKey];

        NSLog(@"Failed to perform call recording action for reason : %@", errorDescription);
    } else {
        NSLog(@"%@ Recording action successful.");
    }
}];

Listen to Call Recording state changes

To monitor call recording progress events, the <CSCallDelegate> protocol can be used. This protocol provides notification as the call recording state changes.

@interface AppCallHandler() 
...
@end

@implementation AppCallHandler

    - (void)call:(CSCall *)call didChangeRecordingState:(CSCallRecordingState)recordingState {
        // Called to report that call recording is off/on/paused.
        // Add code here to update the UI as appropriate.
    }

    ...

@end

{{=CSCallRecordingState}} defines call recording state

You can instantiate an application call handler (AppCallHandler) and add that as a delegate to the call.

AppCallHandler *callHandler = [[AppCallHandler alloc] init];
call.delegate = callHandler;

Retrieving call recording states

In addition to listen recording state changes, application can also check the CSCall for the recording states

/**
 * A Boolean value indicating whether the call is being recorded.
 */
@property (nonatomic, readonly, getter=isRecordingActive) BOOL recordingActive;


/**
 * A Boolean value indicating whether the call recording is paused.
 */
@property (nonatomic, readonly, getter=isRecordingPaused) BOOL recordingPaused;