Microlocal analysis of the bulk-edge correspondence