Catalyzes the stereoinversion of LL-2,6-diaminoheptanedioate (L,L-DAP) to meso-diaminoheptanedioate (meso-DAP), a precursor of L-lysine and an essential component of the bacterial peptidoglycan (PubMed:30548096). Also catalyzes the racemization of certain amino acids, including Lys, with low efficiency (PubMed:30548096). (2S,6S)-2,6-diaminoheptanedioate = meso-2,6-diaminoheptanedioate kcat is 56.2 sec(-1) with L,L-DAP as substrate. kcat is 79.1 sec(-1) with meso-DAP as substrate. kcat is 10.1 sec(-1) with L-Lys as substrate. kcat is 11.2 sec(-1) with D-Lys as substrate. Optimum pH is 7.5-8.0. Optimum temperature is 90 degrees Celsius. Amino-acid biosynthesis; L-lysine biosynthesis via DAP pathway; DL-2,6-diaminopimelate from LL-2,6-diaminopimelate: step 1/1. Probably forms homotrimers. Belongs to the diaminopimelate epimerase family.