I don't know is it a bug or not, but I found if user in the middle of the sip call gets GSM incoming call sip call goes to hold state and never come back to connected state.
As I understand it happens in this receiver:
private void doPauseAllCalls() {
for (PjSipCall call : mCalls) {
try {
call.hold();
} catch (Exception e) {
Log.w(TAG, "Failed to put call on hold", e);
}
}
}
protected class PhoneStateChangedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
final String extraState = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
if (TelephonyManager.EXTRA_STATE_RINGING.equals(extraState) || TelephonyManager.EXTRA_STATE_OFFHOOK.equals(extraState)) {
Log.d(TAG, "GSM call received, pause all SIP calls and do not accept incoming SIP calls.");
mGSMIdle = false;
job(new Runnable() {
@Override
public void run() {
doPauseAllCalls();
}
});
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
Log.d(TAG, "GSM call released, allow to accept incoming calls.");
mGSMIdle = true;
}
}
}
As we could see here doPuseAllCalls calls when receiving GSM call, but nothing calls then GSM call released. Is this intentional behavior and user should handle unholding by himself for some reason?
I don't know is it a bug or not, but I found if user in the middle of the sip call gets GSM incoming call sip call goes to hold state and never come back to connected state.
As I understand it happens in this receiver:
As we could see here doPuseAllCalls calls when receiving GSM call, but nothing calls then GSM call released. Is this intentional behavior and user should handle unholding by himself for some reason?