0
我最近更新了我的Linphone庫,從最新版本開始遵循Apple的IPV6標準支持。 但它無法創建安全呼叫。 每次我嘗試將呼叫轉換爲安全呼叫時,確認失敗並且SAS返回空值。 與舊圖書館(IPV4支持)一起工作。 我正在使用ZRTP加密進行安全呼叫。Linphone無法爲ZRTP創建SAS安全呼叫
我在過去15天以來一直在掙扎。 下面一行代碼返回SAS值爲空。
NSString *localLize = NSLocalizedString(@"Confirm the following SAS with peer:\n%s", nil);
const char *authToken = linphone_call_get_authentication_token(call);
NSLog(@"localize %@ authToken %s",localLize,authToken);
下面是將呼叫轉換爲安全呼叫的全部功能。
- (IBAction)onSecurityClick:(id)sender {
if (linphone_core_get_calls_nb(LC)) {
LinphoneCall *call = linphone_core_get_current_call(LC);
if (call != NULL) {
//force encryption ZRTP
LinphoneMediaEncryption enc = LinphoneMediaEncryptionZRTP;
if (enc == LinphoneMediaEncryptionZRTP) {
NSString *localLize = NSLocalizedString(@"Confirm the following SAS with peer:\n%s", nil);
const char *authToken = linphone_call_get_authentication_token(call);
NSLog(@"localize %@ authToken %s",localLize,authToken);
NSString *message =
[NSString stringWithFormat:NSLocalizedString(@"Confirm the following SAS with peer:\n%s", nil),
linphone_call_get_authentication_token(call)];
if (securityDialog == nil) {
__block __strong StatusBarView *weakSelf = self;
securityDialog = [UIConfirmationDialog ShowWithMessage:message
cancelMessage:NSLocalizedString(@"DENY", nil)
confirmMessage:NSLocalizedString(@"ACCEPT", nil)
onCancelClick:^() {
if (linphone_core_get_current_call(LC) == call) {
linphone_call_set_authentication_token_verified(call, NO);
}
weakSelf->securityDialog = nil;
}
onConfirmationClick:^() {
if (linphone_core_get_current_call(LC) == call) {
linphone_call_set_authentication_token_verified(call, YES);
}
weakSelf->securityDialog = nil;
}];
}
}
}
}
}
任何幫助應該是明顯的。
在此先感謝。
嘿!你有沒有發現問題是什麼?我有同樣的問題。 –