datso / react-native-pjsip

A PJSIP module for React Native.
http://datso.github.io/react-native-pjsip
GNU General Public License v3.0
272 stars 228 forks source link

Android automatically declines second call #226

Open ryanmcclure4 opened 3 years ago

ryanmcclure4 commented 3 years ago

If a user is currently on a call on Android and they receive a secondary inbound call, the secondary call is automatically declined as per the following line:

void emmitCallReceived(PjSipAccount account, PjSipCall call) {
        // Automatically decline incoming call when user uses GSM
        if (!mGSMIdle) {
            try {
                call.hangup(new CallOpParam(true));
            } catch (Exception e) {
                Log.w(TAG, "Failed to decline incoming call when user uses GSM", e);
            }
            return;
        }
        ...
}

On the other hand, iOS is able to receive multiple calls just fine. Why is this code here for Android? Is the Android module incomplete and this catch was just placed here in the meantime?