I have the same problem with iPhone X, also with AT&T. Using iOS 11.2. I was running iOS 11 on my iPhone 5s, didn't have an issue with Visual Voicemail. In my case I can see the voicemails in the Visual Voicemail screen, I can see the transcripts, but when I click Play nothing happens. Tried all the usual "solutions": turn phone on and off, hard reboot phone; reset network settings; enable/disable Airplane mode, nothing worked.
I also tried exporting the voicemails to Voice Memos but cannot play them. Additionally, I cannot record any voice memo - when I click the Record button nothing happens, which leads me to believe it is an Apple problem and not an AT&T problem. In any case when I went to AT&T they said it wasn't their problem as when I call my voicemail number manually I can hear all my messages.
Any help would be appreciated. Genius Bar staff basically told me they couldn't do anything and to just wait and maybe it would fix itself eventually. Don't quite think that answer's good enough.