Cardiac arrest is the main cause of death in developed countries. A good quality cardiopulmonary resuscitation (CPR) is key for the survival of the patient in out-of-hospital cardiac arrest (OHCA), including chest compressions (CCs) and ventilations. Ventilations have been proven to have an important impact in the outcome of the patient, and detecting the CC pauses where ventilations were provided is the aim of this study. An algorithm that automatically detects pauses between sequences of CCs using machine learning techniques is proposed. For this study a set of 102 defibrillator files from OHCA patients that include the thoracic impedance recorded through the defibrillation pads was used. The work has been split into 2 main blocks: a random forest (RF) classifier that classifies 1-s windows as CC/no-CC and an algorithm that sets the beginning and the end of each detected pause. The RF classifier was validated using 10 fold cross-validation method, obtaining a median sensitivity (Se), specificity (Sp) and positive predictive value (PPV) of 95.4/97. 9/94.4 % respectively, for window classification. The pause detector returned median Se/PPV values of 90.0/91.3 % with a median pause delimitation error of 0.04 s and a duration error of 0.04 s.