answer busy if incomming call while GSM call in progress

Conflicts:

	Classes/LinphoneManager.m
	submodules/linphone
This commit is contained in:
Jehan Monnier 2012-10-19 14:09:42 +02:00 committed by Sylvain Berfini
parent 2e4f912d62
commit 5bc0e9e7d2
2 changed files with 20 additions and 3 deletions

View file

@ -166,7 +166,16 @@ extern void libmsbcg729_init();
}
switch (new_state) {
case LinphoneCallIncomingReceived:
case LinphoneCallIncomingReceived:
/*first step is to re-enable ctcall center*/
[self setupGSMInteraction];
/*should we reject this call ?*/
if ([callCenter currentCalls]!=nil) {
ms_message("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;
}
[callDelegate displayIncomingCall:call
NotificationFromUI:mCurrentViewController
forUser:lUserName
@ -872,6 +881,12 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
}
//kick up network cnx, just in case
[self kickOffNetworkConnection];
[self setupGSMInteraction];
//to make sure presence status is correct
if ([callCenter currentCalls]==nil)
linphone_core_set_presence_info(theLinphoneCore, 0, nil, LinphoneStatusAltService);
[self refreshRegisters];
linphone_core_iterate(theLinphoneCore);
}
@ -1128,8 +1143,10 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
#pragma GSM management
-(void) setupGSMInteraction {
if (callCenter != nil)
if (callCenter != nil) {
callCenter.callEventHandler=NULL;
[callCenter release];
}
callCenter = [[CTCallCenter alloc] init];
callCenter.callEventHandler = ^(CTCall* call) {

@ -1 +1 @@
Subproject commit 1cbe098692da4ad2a511bd677994c50d3716f314
Subproject commit e829fa6e222f37de9c26e4e82f0227078f4b6629