之前連接linphone的服務器,使用固定的已註冊的賬號能夠實現主叫功能;但是被叫不能實現,現在來解決此問題:
原因在於linphone的源碼中使用了setCall方法初始化(linphonecore*)call這個變量,但是在我們的項目中,使用它的方法造成了死循環,原因就在於linphone的內存管理使用的是mac,而自己的項目中使用的是Arc管理內存。
所以需要修改的那個設置call的函數,此處在incomingCallViewController中自己編寫功能方法
- (void)initSomeTask:(LinphoneCall*)aCall withDelegate:(id)theDelegate;
並在文件中實現:
- (void)initSomeTask:(LinphoneCall*)aCall withDelegate:(id)theDelegate
{
self.call = aCall;
self.delegate = theDelegate;
[selfupdate];
[selfcallUpdate:self.callstate:linphone_call_get_state(self.call)];
}
然後在displayCall的來電判斷成功後進行調用[incomingCallViewControllerinitSomeTask:call withDelegate:self];/
在此,解決了來電不能實現的問題。