| | |
| | | linphone_core_add_callbacks(theLinphoneCore, cbs); |
| | | |
| | | [HDLCallManager.instance setCoreWithCore:theLinphoneCore]; |
| | | [HDLCoreManager.instance setCoreWithCore:theLinphoneCore]; |
| | | // [HDLCoreManager.instance setCoreWithCore:theLinphoneCore]; |
| | | [HDLConfigManager.instance setDbWithDb:_configDb]; |
| | | |
| | | linphone_core_start(theLinphoneCore); |
| | |
| | | } |
| | | |
| | | -(void)endCall{ |
| | | LinphoneCall * call = linphone_core_get_current_call(theLinphoneCore); |
| | | [HDLCallManager.instance terminateCallWithCall:call]; |
| | | // LinphoneCall * call = linphone_core_get_current_call(theLinphoneCore); |
| | | // [HDLCallManager.instance terminateCallWithCall:call]; |
| | | // |
| | | |
| | | LinphoneCall *currentcall = linphone_core_get_current_call(theLinphoneCore); |
| | | |
| | | if (linphone_core_is_in_conference(theLinphoneCore) || // In conference |
| | | |
| | | (linphone_core_get_conference_size(theLinphoneCore) > 0 ) // Only one conf |
| | | ) { |
| | | // NSLog(@"是会议"); |
| | | linphone_core_terminate_conference(theLinphoneCore); |
| | | } else if (currentcall != NULL) { |
| | | linphone_call_terminate(currentcall); |
| | | |
| | | } else { |
| | | // NSLog(@"其它情况"); |
| | | const MSList *calls = linphone_core_get_calls(theLinphoneCore); |
| | | if (bctbx_list_size(calls) == 1) { // Only one call |
| | | linphone_call_terminate((LinphoneCall *)(calls->data)); |
| | | } |
| | | } |
| | | } |
| | | -(void)acceptCall{ |
| | | // [HDLCallManager configAudioSessionWithAudioSession:[AVAudioSession sharedInstance]]; |
| | |
| | | return; |
| | | } |
| | | // For OutgoingCall, show CallOutgoingView |
| | | |
| | | [HDLCallManager.instance startCallWithAddr:iaddr isSas:FALSE]; |
| | | } |
| | | |
| | |
| | | linphone_core_set_video_preset([HDLLinphoneManager getLc], [@"custom" UTF8String]); |
| | | linphone_core_set_preferred_framerate([HDLLinphoneManager getLc], 5); |
| | | |
| | | |
| | | // LinphoneVideoPolicy policy; |
| | | // policy.automatically_initiate = YES; |
| | | // policy.automatically_accept = YES; |