[ekiga/ds-opal-refactoring] Opal: Simplified call end reasons.



commit 1b721b33d31cfd116f2b6392b22f590699e35bfb
Author: Damien Sandras <dsandras seconix com>
Date:   Sun Apr 12 16:56:11 2015 +0200

    Opal: Simplified call end reasons.
    
    We had too many cases for various different subtilities users are not
    interested in. They simply should know if the call has been interrupted
    in a normal way or because of an error: call denied, abnormal call
    termination, ...
    
    In traditional telephony, we only have 3 failure states: busy, invalid
    number and congestion. We should stick to that.

 lib/engine/components/opal/opal-call.cpp |  101 +++++++++++-------------------
 1 files changed, 36 insertions(+), 65 deletions(-)
---
diff --git a/lib/engine/components/opal/opal-call.cpp b/lib/engine/components/opal/opal-call.cpp
index 19f735b..2e02950 100644
--- a/lib/engine/components/opal/opal-call.cpp
+++ b/lib/engine/components/opal/opal-call.cpp
@@ -536,90 +536,61 @@ Opal::Call::OnCleared ()
 
     switch (GetCallEndReason ()) {
 
-    case OpalConnection::EndedByLocalUser :
-      reason = _("Local user cleared the call");
+    case OpalConnection::EndedByAnswerDenied:
+    case OpalConnection::EndedByRefusal:
+    case OpalConnection::EndedByNoAccept:
+    case OpalConnection::EndedByLocalBusy:
+    case OpalConnection::EndedByRemoteBusy:
+      reason = _("Call rejected");
       break;
-    case OpalConnection::EndedByNoAccept :
-      reason = _("Local user rejected the call");
-      break;
-    case OpalConnection::EndedByAnswerDenied :
-      reason = _("Local user rejected the call");
-      break;
-    case OpalConnection::EndedByRemoteUser :
-      reason = _("Remote user cleared the call");
-      break;
-    case OpalConnection::EndedByRefusal :
-      reason = _("Remote user rejected the call");
-      break;
-    case OpalConnection::EndedByCallerAbort :
-      reason = _("Remote user has stopped calling");
+
+    case OpalConnection::EndedByCallerAbort:
+      reason = _("Call canceled");
       break;
-    case OpalConnection::EndedByTransportFail :
+    case OpalConnection::EndedByLocalCongestion:
+    case OpalConnection::EndedByRemoteCongestion:
+    case OpalConnection::EndedByConnectFail:
+    case OpalConnection::EndedByTransportFail:
+    case OpalConnection::EndedByHostOffline:
+    case OpalConnection::EndedByTemporaryFailure:
+    case OpalConnection::EndedByUnreachable:
+    case OpalConnection::EndedByNoEndPoint:
+    case OpalConnection::EndedByOutOfService:
+    case OpalConnection::EndedByNoDialTone:
+    case OpalConnection::EndedByNoRingBackTone:
       reason = _("Abnormal call termination");
       break;
-    case OpalConnection::EndedByConnectFail :
-      reason = _("Could not connect to remote host");
-      break;
-    case OpalConnection::EndedByGatekeeper :
-    case OpalConnection::EndedByGkAdmissionFailed :
-      reason = _("The Gatekeeper cleared the call");
+    case OpalConnection::EndedBySecurityDenial:
+    case OpalConnection::EndedByGatekeeper:
+    case OpalConnection::EndedByGkAdmissionFailed:
+    case OpalConnection::EndedByCertificateAuthority:
+      reason = _("Call forbidden");
       break;
-    case OpalConnection::EndedByNoUser :
-      reason = _("User not found");
+    case OpalConnection::EndedByNoUser:
+    case OpalConnection::EndedByIllegalAddress:
+      reason = _("Invalid number or address");
       break;
-    case OpalConnection::EndedByNoBandwidth :
+    case OpalConnection::EndedByNoBandwidth:
       reason = _("Insufficient bandwidth");
       break;
-    case OpalConnection::EndedByCapabilityExchange :
+    case OpalConnection::EndedByCapabilityExchange:
+    case OpalConnection::EndedByMediaFailed:
       reason = _("No common codec");
       break;
-    case OpalConnection::EndedByCallForwarded :
+    case OpalConnection::EndedByCallForwarded:
       reason = _("Call forwarded");
       break;
-    case OpalConnection::EndedBySecurityDenial :
-      reason = _("Security check failed");
-      break;
-    case OpalConnection::EndedByLocalBusy :
-      reason = _("Local user is busy");
-      break;
-    case OpalConnection::EndedByLocalCongestion :
-      reason = _("Congested link to remote party");
-      break;
-    case OpalConnection::EndedByRemoteBusy :
-      reason = _("Remote user is busy");
-      break;
-    case OpalConnection::EndedByRemoteCongestion :
-      reason = _("Congested link to remote party");
-      break;
-    case OpalConnection::EndedByHostOffline :
-      reason = _("Remote host is offline");
-      break;
-    case OpalConnection::EndedByTemporaryFailure :
-      reason = _("User is offline");
-      break;
-    case OpalConnection::EndedByUnreachable :
-      reason = _("Remote host not found");
-      break;
-    case OpalConnection::EndedByNoEndPoint :
-    case OpalConnection::EndedByNoAnswer :
-      reason = _("User is not available");
-      break;
-    case OpalConnection::EndedByOutOfService:
-      reason = _("Service unavailable");  // this appears when 500 does not work
-      break;
-    case OpalConnection::EndedByCertificateAuthority:
-      reason = _("Remote certificate not authenticated");
+    case OpalConnection::EndedByNoAnswer:
+      reason = _("No answer");
       break;
+    case OpalConnection::EndedByLocalUser:
+    case OpalConnection::EndedByRemoteUser:
     case OpalConnection::EndedByCustomCode:
     case OpalConnection::EndedByQ931Cause:
     case OpalConnection::EndedByDurationLimit:
     case OpalConnection::EndedByInvalidConferenceID:
-    case OpalConnection::EndedByNoDialTone:
-    case OpalConnection::EndedByNoRingBackTone:
     case OpalConnection::EndedByAcceptingCallWaiting:
-    case OpalConnection::EndedByMediaFailed:
     case OpalConnection::EndedByCallCompletedElsewhere:
-    case OpalConnection::EndedByIllegalAddress:
     case OpalConnection::NumCallEndReasons:
     default:
       reason = _("Call completed");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]