An active implantable medical device comprising: - a cardiac therapy circuit, comprising a module for detecting first potentials and generating impulses for stimulation, defibrillation and/or resynchronization of the myocardium; - a peripheral therapy circuit, comprising a module for detecting second potentials and generating peripheral stimulation impulses; - at least one first connection terminal that is adapted to receive a probe; and - at least one second connection terminal that is adapted to receive another probe, one of the probes being a detection/stimulation probe (16, 22) implantable in or on the heart and the other one being a detection/stimulation probe implantable on or near a peripheral organ located at a distance from the heart, characterized in that each of the first and second connection terminals is equally adapted to receive one or the other of said probes, and in that it comprises means for identifying said probes and for automatically configuring the connection terminals, comprising: - discriminating means that are adapted to: • capture a signal at one of the first and second connection terminals; • analyze the received signal in order to reveal the presence or absence of a signal of cardiac origin; and • deliver, as a response, an identification of the first and second connection terminals where the presence of a signal of cardiac origin has been revealed, and - switching means (310, 312, 316, 318) operating in response to the discriminating means for: • coupling the cardiac therapy circuit with the connection terminal identified by the discriminating means as being the one where the presence of a signal of cardiac origin has been revealed, and • coupling the peripheral therapy circuit with the other connection terminal. - a cardiac therapy circuit, comprising a module for detecting first potentials and generating impulses for stimulation, defibrillation and/or resynchronization of the myocardium; - a peripheral therapy circuit, comprising a module for detecting second potentials and generating peripheral stimulation impulses; - at least one first connection terminal that is adapted to receive a probe; and - at least one second connection terminal that is adapted to receive another probe, - discriminating means that are adapted to: • capture a signal at one of the first and second connection terminals; • analyze the received signal in order to reveal the presence or absence of a signal of cardiac origin; and • deliver, as a response, an identification of the first and second connection terminals where the presence of a signal of cardiac origin has been revealed, and • capture a signal at one of the first and second connection terminals; • analyze the received signal in order to reveal the presence or absence of a signal of cardiac origin; and • deliver, as a response, an identification of the first and second connection terminals where the presence of a signal of cardiac origin has been revealed, and - switching means (310, 312, 316, 318) operating in response to the discriminating means for: • coupling the cardiac therapy circuit with the connection terminal identified by the discriminating means as being the one where the presence of a signal of cardiac origin has been revealed, and • coupling the peripheral therapy circuit with the other connection terminal. • coupling the cardiac therapy circuit with the connection terminal identified by the discriminating means as being the one where the presence of a signal of cardiac origin has been revealed, and • coupling the peripheral therapy circuit with the other connection terminal.