diff --git a/res/raw/linphonerc b/res/raw/linphonerc index 70f2c1359..44a810178 100644 --- a/res/raw/linphonerc +++ b/res/raw/linphonerc @@ -16,6 +16,7 @@ register_only_when_network_is_up=1 default_proxy=0 auto_net_state_mon=0 keepalive_period=30000 +auto_answer_replacing_calls=1 [rtp] audio_rtp_port=7076 diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 61393dd84..fdc973de0 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -271,8 +271,11 @@ public class LinphoneService extends Service implements LinphoneCoreListener { public void callState(final LinphoneCore lc,final LinphoneCall call, final State state, final String message) { Log.i(TAG, "new state ["+state+"]"); if (state == LinphoneCall.State.IncomingReceived && !call.equals(mLinphoneCore.getCurrentCall())) { - //no multicall support, just decline - mLinphoneCore.terminateCall(call); + if (call.getReplacedCall()==null){ + //no multicall support, just decline + mLinphoneCore.terminateCall(call); + }//otherwise it will be accepted automatically. + return; } mHandler.post(new Runnable() { diff --git a/src/org/linphone/core/LinphoneCallImpl.java b/src/org/linphone/core/LinphoneCallImpl.java index 001443492..a7104ffef 100644 --- a/src/org/linphone/core/LinphoneCallImpl.java +++ b/src/org/linphone/core/LinphoneCallImpl.java @@ -34,7 +34,8 @@ class LinphoneCallImpl implements LinphoneCall { private native void enableEchoCancellation(long nativePtr,boolean enable); private native boolean isEchoCancellationEnabled(long nativePtr) ; private native void enableEchoLimiter(long nativePtr,boolean enable); - private native boolean isEchoLimiterEnabled(long nativePtr) ; + private native boolean isEchoLimiterEnabled(long nativePtr); + private native long getReplacedCall(long nativePtr); protected LinphoneCallImpl(long aNativePtr) { nativePtr = aNativePtr; @@ -88,4 +89,12 @@ class LinphoneCallImpl implements LinphoneCall { public boolean isEchoLimiterEnabled() { return isEchoLimiterEnabled(nativePtr); } + public LinphoneCall getReplacedCall(){ + long callptr=getReplacedCall(nativePtr); + if (callptr!=0){ + return new LinphoneCallImpl(callptr); + } + return null; + } + } diff --git a/submodules/externals/ffmpeg b/submodules/externals/ffmpeg index 492347d3b..4dece8c7f 160000 --- a/submodules/externals/ffmpeg +++ b/submodules/externals/ffmpeg @@ -1 +1 @@ -Subproject commit 492347d3bbf6cdae54dd8b68fb447e7496aed04f +Subproject commit 4dece8c7f8255fb3c4ad9fb7fd25a8ba7692fd27 diff --git a/submodules/linphone b/submodules/linphone index cb7e67278..e69c8b2b4 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit cb7e67278afd85efab4dbb15650d2e9f609bedd4 +Subproject commit e69c8b2b444fefc2a8b18059b73a428e329b3dc2