code: @Override
      public List<CallDetailRecord> getCallDetailRecords(CallDetailRecordFilter filter) {
  
          final SqlSession session = sessions.openSession();
  
          try {
              final List<Map<String, Object>> results = session.selectList(namespace + "getCallDetailRecordByUsingFilters",
                      filter);
              final List<CallDetailRecord> cdrs = new ArrayList<CallDetailRecord>();
  
              if (results != null && !results.isEmpty()) {
                  for (final Map<String, Object> result : results) {
                      cdrs.add(toCallDetailRecord(result));
                  }
              }
              return cdrs;
          } finally {
              session.close();
          }
      }
docs: Issue 110: https://bitbucket.org/telestax/telscale-restcomm/issue/110