Loading services/java/com/android/server/sip/SipSessionGroup.java +12 −2 Original line number Diff line number Diff line Loading @@ -1036,8 +1036,7 @@ class SipSessionGroup implements SipListener { private void onError(Response response) { int statusCode = response.getStatusCode(); if (!mInCall && ((statusCode == Response.TEMPORARILY_UNAVAILABLE) || (statusCode == Response.BUSY_HERE))) { if (!mInCall && (statusCode == Response.BUSY_HERE)) { endCallOnBusy(); } else { onError(getErrorCode(statusCode), createErrorMessage(response)); Loading @@ -1046,11 +1045,22 @@ class SipSessionGroup implements SipListener { private SipErrorCode getErrorCode(int responseStatusCode) { switch (responseStatusCode) { case Response.TEMPORARILY_UNAVAILABLE: case Response.FORBIDDEN: case Response.GONE: case Response.NOT_FOUND: case Response.NOT_ACCEPTABLE: case Response.NOT_ACCEPTABLE_HERE: return SipErrorCode.PEER_NOT_REACHABLE; case Response.REQUEST_URI_TOO_LONG: case Response.ADDRESS_INCOMPLETE: case Response.AMBIGUOUS: return SipErrorCode.INVALID_REMOTE_URI; case Response.REQUEST_TIMEOUT: return SipErrorCode.TIME_OUT; default: if (responseStatusCode < 500) { return SipErrorCode.CLIENT_ERROR; Loading telephony/java/com/android/internal/telephony/Connection.java +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public abstract class Connection { CONGESTION, /* outgoing call to congested network */ MMI, /* not presently used; dial() returns null */ INVALID_NUMBER, /* invalid dial string */ NUMBER_UNREACHABLE, /* cannot reach the peer */ INVALID_CREDENTIALS, /* invalid credentials */ TIMED_OUT, /* client timed out */ LOST_SIGNAL, Loading telephony/java/com/android/internal/telephony/sip/SipPhone.java +5 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,7 @@ public class SipPhone extends SipPhoneBase { } synchronized (SipPhone.class) { setState(Call.State.DISCONNECTED); mSipAudioCall.close(); mOwner.onConnectionEnded(SipConnection.this); Log.v(LOG_TAG, "-------- connection ended: " + mPeer.getUriString() + ": " Loading Loading @@ -821,6 +822,9 @@ public class SipPhone extends SipPhoneBase { public void onError(SipAudioCall call, SipErrorCode errorCode, String errorMessage) { switch (errorCode) { case PEER_NOT_REACHABLE: onError(Connection.DisconnectCause.NUMBER_UNREACHABLE); break; case INVALID_REMOTE_URI: onError(Connection.DisconnectCause.INVALID_NUMBER); break; Loading @@ -838,6 +842,7 @@ public class SipPhone extends SipPhoneBase { case SERVER_ERROR: case CLIENT_ERROR: default: Log.w(LOG_TAG, "error: " + errorCode + ": " + errorMessage); onError(Connection.DisconnectCause.ERROR_UNSPECIFIED); } } Loading voip/java/android/net/sip/SipErrorCode.java +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ public enum SipErrorCode { /** When the remote URI is not valid. */ INVALID_REMOTE_URI, /** When the peer is not reachable. */ PEER_NOT_REACHABLE, /** When invalid credentials are provided. */ INVALID_CREDENTIALS, Loading Loading
services/java/com/android/server/sip/SipSessionGroup.java +12 −2 Original line number Diff line number Diff line Loading @@ -1036,8 +1036,7 @@ class SipSessionGroup implements SipListener { private void onError(Response response) { int statusCode = response.getStatusCode(); if (!mInCall && ((statusCode == Response.TEMPORARILY_UNAVAILABLE) || (statusCode == Response.BUSY_HERE))) { if (!mInCall && (statusCode == Response.BUSY_HERE)) { endCallOnBusy(); } else { onError(getErrorCode(statusCode), createErrorMessage(response)); Loading @@ -1046,11 +1045,22 @@ class SipSessionGroup implements SipListener { private SipErrorCode getErrorCode(int responseStatusCode) { switch (responseStatusCode) { case Response.TEMPORARILY_UNAVAILABLE: case Response.FORBIDDEN: case Response.GONE: case Response.NOT_FOUND: case Response.NOT_ACCEPTABLE: case Response.NOT_ACCEPTABLE_HERE: return SipErrorCode.PEER_NOT_REACHABLE; case Response.REQUEST_URI_TOO_LONG: case Response.ADDRESS_INCOMPLETE: case Response.AMBIGUOUS: return SipErrorCode.INVALID_REMOTE_URI; case Response.REQUEST_TIMEOUT: return SipErrorCode.TIME_OUT; default: if (responseStatusCode < 500) { return SipErrorCode.CLIENT_ERROR; Loading
telephony/java/com/android/internal/telephony/Connection.java +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ public abstract class Connection { CONGESTION, /* outgoing call to congested network */ MMI, /* not presently used; dial() returns null */ INVALID_NUMBER, /* invalid dial string */ NUMBER_UNREACHABLE, /* cannot reach the peer */ INVALID_CREDENTIALS, /* invalid credentials */ TIMED_OUT, /* client timed out */ LOST_SIGNAL, Loading
telephony/java/com/android/internal/telephony/sip/SipPhone.java +5 −0 Original line number Diff line number Diff line Loading @@ -609,6 +609,7 @@ public class SipPhone extends SipPhoneBase { } synchronized (SipPhone.class) { setState(Call.State.DISCONNECTED); mSipAudioCall.close(); mOwner.onConnectionEnded(SipConnection.this); Log.v(LOG_TAG, "-------- connection ended: " + mPeer.getUriString() + ": " Loading Loading @@ -821,6 +822,9 @@ public class SipPhone extends SipPhoneBase { public void onError(SipAudioCall call, SipErrorCode errorCode, String errorMessage) { switch (errorCode) { case PEER_NOT_REACHABLE: onError(Connection.DisconnectCause.NUMBER_UNREACHABLE); break; case INVALID_REMOTE_URI: onError(Connection.DisconnectCause.INVALID_NUMBER); break; Loading @@ -838,6 +842,7 @@ public class SipPhone extends SipPhoneBase { case SERVER_ERROR: case CLIENT_ERROR: default: Log.w(LOG_TAG, "error: " + errorCode + ": " + errorMessage); onError(Connection.DisconnectCause.ERROR_UNSPECIFIED); } } Loading
voip/java/android/net/sip/SipErrorCode.java +3 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,9 @@ public enum SipErrorCode { /** When the remote URI is not valid. */ INVALID_REMOTE_URI, /** When the peer is not reachable. */ PEER_NOT_REACHABLE, /** When invalid credentials are provided. */ INVALID_CREDENTIALS, Loading