通话信息

本文介绍与 Linkus macOS SDK 通话信息相关的功能及实现方法。

处理未接来电

- (BOOL)didReceiveRemoteNotification:(NSDictionary *)userInfo;

查询当前通话信息

- (YLSSipCall *)currentSipCall;

查询所有通话信息

- (NSArray<YLSSipCall *> *)currentSipCalls;

获取麦克风与扬声器信息

- (NSArray<YLSCaptureDevice *> *)audioALLDevice API_AVAILABLE(macos(10.13));

设置麦克风与扬声器

- (void)audioSetDevice:(NSInteger)microphone speaker:(NSInteger)speaker API_AVAILABLE(macos(10.13));

查询 SIP 的注册状态

- (BOOL)sipRegister;

查询录音功能是否可用

- (BOOL)enableRecord;

查询用户是否有录音权限

- (BOOL)adminRecord;

来电委托

- (void)setIncomingCallDelegate:(id<YLSCallManagerDelegate>)delegate;

添加委托

- (void)addDelegate:(id<YLSCallManagerDelegate>)delegate;
- (void)addDelegate:(id<YLSCallStatusManagerDelegate>)delegate;

移除委托

- (void)removeDelegate:(id<YLSCallManagerDelegate>)delegate;

SDK 通知回调

/**
 *  来电回调
 */
- (void)callManager:(YLSCallManager *)callManager contact:(void (^)(id<YLSContactProtocol> (^block)(NSString *number)))contact completion:(void (^)(void (^controllerBlock)(void),void (^errorBlock)(NSError *error)))completion;

/**
 *  通话状态变更回调
 */
- (void)callManager:(YLSCallManager *)callManager callInfoStatus:(NSMutableArray<YLSSipCall *> *)currenCallArr;

/**
 *  SIP 错误码回调
 */
- (void)callManager:(YLSCallManager *)callManager callFaild:(NSError *)error;

/**
 *  通话录音状态回调
 */
- (void)callManagerRecordType:(YLSCallManager *)callManager;

/**
 *  当前通话质量回调
 */
- (void)callManager:(YLSCallManager *)callManager callQuality:(BOOL)quality;

/**
 *  呼叫等待回调
 */
- (BOOL)callWaitingSupport;