VGVoiceClientAPI

@protocol VGVoiceClientAPI <NSObject>

// Outbound Call API
- (void) serverCall:(ServerCallCallback)callback NS_SWIFT_ASYNC(1);
- (void) serverCall:(nullable NSDictionary *)context callback:(ServerCallCallback)callback NS_SWIFT_ASYNC(2);

// Inbound Call API
- (void) answer:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) reject:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);

// Push API
- (nullable VGCallId) processCallInvitePushData:( NSDictionary * _Nonnull )dict;

// Call Leg API
- (void) getLeg:(NSString *)leg callback:(GetLegCallback)callback NS_SWIFT_ASYNC(2);

/**
 This method is used to retrieve a list of conversations that the user is a member of.
 
 - Parameters:
    - callId: The id of the call
    - callback: A callback function to be called upon completion of the method.
 It takes in two parameters:
 [Error] An exception object, if an error occurred during the fetch.
 [VGVoiceLegsPage] It will contain the list of legs and the cursors for the next and previous page of results, if the fetch was successful.
*/
- (void)getCallLegs:(VGCallId)callId
                callback:(nonnull void (^)(NSError * _Nullable error, VGVoiceLegsPage * _Nullable legsPage))callback
NS_SWIFT_NAME(getCallLegs(_:callback:))
NS_SWIFT_ASYNC(2);

/**
 This method is used to retrieve a list of conversations that the user is a member of.
 
 - Parameters:
    - callId: The id of the call
    - parameters: An optional [GetCallLegsParameters] object containing the parameters for the request.
    - callback: A callback function to be called upon completion of the method.
 It takes in two parameters:
 [Error] An exception object, if an error occurred during the fetch.
 [VGVoiceLegsPage] It will contain the list of legs and the cursors for the next and previous page of results, if the fetch was successful.
*/
- (void)getCallLegs:(VGCallId)callId
                parameters:(VGGetCallLegsParameters * _Nullable)parameters
                callback:(nonnull void (^)(NSError * _Nullable error, VGVoiceLegsPage * _Nullable legsPage))callback
NS_SWIFT_NAME(getCallLegs(_:parameters:callback:))
NS_SWIFT_ASYNC(3);



// Call Action API
- (void) reconnect:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2) NS_SWIFT_NAME(reconnectCall(_:callback:));
- (void) hangup:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) hangup:(VGCallId)callId reason:(nullable NSString *)reasonText code:(nullable NSString *)reasonCode callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(4);
- (void) say:(VGCallId)callId text:(NSString *)text callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(3);
- (void) say:(VGCallId)callId text:(NSString *)text level:(nullable NSNumber*)level loop:(nullable NSNumber*)loop queue:(BOOL)queue voiceName:(nullable NSString*)voiceName ssml:(BOOL)ssml callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(8);
- (void) mute:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) unmute:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) enableEarmuff:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) disableEarmuff:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) enableNoiseSuppression:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) disableNoiseSuppression:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2);
- (void) sendDTMF:(VGCallId)callId withDigits:(NSString *)digits callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(3);

/**
 * Register Device VoIP Token for Voip push
 * @param voipToken VoIP token used for VoIP push and CallKit
 * @param isSandbox are tokens for sandbox APNS push environment (default production)
 * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken
 * @code [voiceClient registerVoipToken:(NSData * _Nonnull)voipToken isSandbox:(Boolean * _Nullable) callback:(void (^)(NSError * _Nullable))]
 */
- (void)registerVoipToken:(nonnull NSData *)voipToken isSandbox:(BOOL)isSandbox callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback NS_SWIFT_ASYNC(3);
/**
 * Register Device VoIP Token for Voip push
 * @param voipToken VoIP token used for VoIP push and CallKit
 * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken
 * @code [voiceClient registerVoipToken:(NSData * _Nonnull) callback:(void (^)(NSError * _Nullable))]
 */
- (void)registerVoipToken:(nonnull NSData *)voipToken callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback NS_SWIFT_ASYNC(2);

// Call Media API
@property (class, nonatomic) BOOL isUsingCallKit;
#if TARGET_OS_IOS
+ (void) enableAudio:(AVAudioSession *)audioSession;
+ (void) disableAudio:(AVAudioSession *)audioSession;
#endif
@end

Undocumented