Loading telephony/java/com/android/internal/telephony/Connection.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public abstract class Connection { MMI, /* not presently used; dial() returns null */ INVALID_NUMBER, /* invalid dial string */ NUMBER_UNREACHABLE, /* cannot reach the peer */ SERVER_UNREACHABLE, /* cannot reach the server */ INVALID_CREDENTIALS, /* invalid credentials */ OUT_OF_NETWORK, /* calling from out of network is not allowed */ SERVER_ERROR, /* server error */ Loading telephony/java/com/android/internal/telephony/sip/SipPhone.java +3 −0 Original line number Diff line number Diff line Loading @@ -875,6 +875,9 @@ public class SipPhone extends SipPhoneBase { public void onError(SipAudioCall call, int errorCode, String errorMessage) { switch (errorCode) { case SipErrorCode.SERVER_UNREACHABLE: onError(Connection.DisconnectCause.SERVER_UNREACHABLE); break; case SipErrorCode.PEER_NOT_REACHABLE: onError(Connection.DisconnectCause.NUMBER_UNREACHABLE); break; Loading voip/java/android/net/sip/SipErrorCode.java +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public class SipErrorCode { /** Cross-domain authentication required. */ public static final int CROSS_DOMAIN_AUTHENTICATION = -11; /** When the server is not reachable. */ public static final int SERVER_UNREACHABLE = -12; public static String toString(int errorCode) { switch (errorCode) { case NO_ERROR: Loading @@ -87,6 +90,8 @@ public class SipErrorCode { return "DATA_CONNECTION_LOST"; case CROSS_DOMAIN_AUTHENTICATION: return "CROSS_DOMAIN_AUTHENTICATION"; case SERVER_UNREACHABLE: return "SERVER_UNREACHABLE"; default: return "UNKNOWN"; } Loading voip/java/com/android/server/sip/SipSessionGroup.java +2 −2 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ class SipSessionGroup implements SipListener { public void run() { try { processCommand(command); } catch (SipException e) { } catch (Throwable e) { Log.w(TAG, "command error: " + command, e); onError(e); } Loading Loading @@ -1218,7 +1218,7 @@ class SipSessionGroup implements SipListener { private int getErrorCode(Throwable exception) { String message = exception.getMessage(); if (exception instanceof UnknownHostException) { return SipErrorCode.INVALID_REMOTE_URI; return SipErrorCode.SERVER_UNREACHABLE; } else if (exception instanceof IOException) { return SipErrorCode.SOCKET_ERROR; } else { Loading Loading
telephony/java/com/android/internal/telephony/Connection.java +1 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ public abstract class Connection { MMI, /* not presently used; dial() returns null */ INVALID_NUMBER, /* invalid dial string */ NUMBER_UNREACHABLE, /* cannot reach the peer */ SERVER_UNREACHABLE, /* cannot reach the server */ INVALID_CREDENTIALS, /* invalid credentials */ OUT_OF_NETWORK, /* calling from out of network is not allowed */ SERVER_ERROR, /* server error */ Loading
telephony/java/com/android/internal/telephony/sip/SipPhone.java +3 −0 Original line number Diff line number Diff line Loading @@ -875,6 +875,9 @@ public class SipPhone extends SipPhoneBase { public void onError(SipAudioCall call, int errorCode, String errorMessage) { switch (errorCode) { case SipErrorCode.SERVER_UNREACHABLE: onError(Connection.DisconnectCause.SERVER_UNREACHABLE); break; case SipErrorCode.PEER_NOT_REACHABLE: onError(Connection.DisconnectCause.NUMBER_UNREACHABLE); break; Loading
voip/java/android/net/sip/SipErrorCode.java +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,9 @@ public class SipErrorCode { /** Cross-domain authentication required. */ public static final int CROSS_DOMAIN_AUTHENTICATION = -11; /** When the server is not reachable. */ public static final int SERVER_UNREACHABLE = -12; public static String toString(int errorCode) { switch (errorCode) { case NO_ERROR: Loading @@ -87,6 +90,8 @@ public class SipErrorCode { return "DATA_CONNECTION_LOST"; case CROSS_DOMAIN_AUTHENTICATION: return "CROSS_DOMAIN_AUTHENTICATION"; case SERVER_UNREACHABLE: return "SERVER_UNREACHABLE"; default: return "UNKNOWN"; } Loading
voip/java/com/android/server/sip/SipSessionGroup.java +2 −2 Original line number Diff line number Diff line Loading @@ -480,7 +480,7 @@ class SipSessionGroup implements SipListener { public void run() { try { processCommand(command); } catch (SipException e) { } catch (Throwable e) { Log.w(TAG, "command error: " + command, e); onError(e); } Loading Loading @@ -1218,7 +1218,7 @@ class SipSessionGroup implements SipListener { private int getErrorCode(Throwable exception) { String message = exception.getMessage(); if (exception instanceof UnknownHostException) { return SipErrorCode.INVALID_REMOTE_URI; return SipErrorCode.SERVER_UNREACHABLE; } else if (exception instanceof IOException) { return SipErrorCode.SOCKET_ERROR; } else { Loading