mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
answer busy if incomming call while GSM call in progress
This commit is contained in:
parent
55a792aeea
commit
eda70942c4
2 changed files with 19 additions and 4 deletions
|
|
@ -385,10 +385,24 @@ static void linphone_iphone_display_status(struct _LinphoneCore * lc, const char
|
|||
} else {
|
||||
data = (LinphoneCallAppData*) linphone_call_get_user_pointer(call);
|
||||
}
|
||||
|
||||
|
||||
if (state == LinphoneCallIncomingReceived
|
||||
&&[[UIDevice currentDevice] respondsToSelector:@selector(isMultitaskingSupported)]
|
||||
&& [UIApplication sharedApplication].applicationState != UIApplicationStateActive) {
|
||||
LinphoneCallLog* callLog=linphone_call_get_call_log(call);
|
||||
|
||||
/*first step is to re-enable ctcall center*/
|
||||
[self setupGSMInteraction];
|
||||
|
||||
/*should we reject this call ?*/
|
||||
if ([callCenter currentCalls]!=nil) {
|
||||
[LinphoneLogger logc:LinphoneLoggerLog format:"Mobile call ongoing... rejecting call from [%s]",linphone_address_get_username(linphone_call_get_call_log(call)->from)];
|
||||
linphone_core_decline_call([LinphoneManager getLc], call,LinphoneReasonBusy);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
LinphoneCallLog* callLog=linphone_call_get_call_log(call);
|
||||
NSString* callId=[NSString stringWithUTF8String:callLog->call_id];
|
||||
const LinphoneAddress *addr = linphone_call_get_remote_address(call);
|
||||
NSString* address = nil;
|
||||
|
|
@ -1327,9 +1341,10 @@ static void audioRouteChangeListenerCallback (
|
|||
|
||||
- (void)setupGSMInteraction {
|
||||
|
||||
if (callCenter != nil)
|
||||
if (callCenter != nil) {
|
||||
callCenter.callEventHandler=NULL;
|
||||
[callCenter release];
|
||||
|
||||
}
|
||||
callCenter = [[CTCallCenter alloc] init];
|
||||
callCenter.callEventHandler = ^(CTCall* call) {
|
||||
// post on main thread
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 353465b2850a7d8fa1be41e4859d22596b653464
|
||||
Subproject commit e829fa6e222f37de9c26e4e82f0227078f4b6629
|
||||
Loading…
Add table
Reference in a new issue