/**
   * Get the duration of current ending voice communication Verifica se foi este o telemovel que
   * iniciou a chamada e se foi, obtem a sua duração e preenche o DTO que lhe é passado.
   *
   * @param voice
   */
  public Voice endCallerVoice_VerifyAndGetDuration(Voice voice) throws IncompatibleModeException {
    // se está able, é porque não foi ele que iniciou a chamada
    final boolean ableToCommunicate = this.getMode().ableToSendVoice();
    if (ableToCommunicate) {
      throw new IncompatibleModeException(
          "Cannot End Call: No call being made because is able to comunicate",
          this.getOperator().getSeqNumber());
    }

    if (!(this.getIsCallInitiator())) {
      throw new IncompatibleModeException(
          "Cannot End Call: Not Caller, flag callinitiator not set",
          this.getOperator().getSeqNumber());
    }
    // se o iniciador foi este numero de telemovel e o receptor o "speakingTo"
    if (voice.getReceiverID().equals(this.getSpeakingTo())) {

      // TimeStamp do fim da chamada
      DateTime endTimeVoice = new DateTime();

      // Calcula a duracao em segundos da chamada
      int sec = Seconds.secondsBetween(super.getVoiceInitTime(), endTimeVoice).getSeconds();

      // System.out.println("A chamada teve duranção: " + sec);
      // Acrescenta a duracao a chamada
      voice.setDuration(sec);
      return voice;
    } else {
      throw new IncompatibleModeException(
          "Cannot End Call: Not same destination", this.getOperator().getSeqNumber());
    }
  }