diff --git a/src/managerimpl.cpp b/src/managerimpl.cpp
index 468d87741b825cfef586058c5bf242a9e49372f9..56708f6f6ae947064d63cf71140c3988491bd598 100644
--- a/src/managerimpl.cpp
+++ b/src/managerimpl.cpp
@@ -276,10 +276,10 @@ ManagerImpl::hangupCall (CALLID id)
   if (call == NULL) {
     return -1;
   }
-  if (call->getState() == Call::Error) { 
-    return -1; 
+  int result = -1;
+  if (call->getState() != Call::Error) { 
+    result = call->hangup();
   }
-  int result = call->hangup();
   deleteCall(id);
   stopTone(); // stop tone, like a 700 error: number not found Not Found
   return result;