not wanting to take away from the ops work, but on FreeSwitch you could do the SIP side of this with the default config and a free or cheap sip provider. As default it'll provide voicemail services to offline phones, so if you add your sip provider and direct all incoming calls to (eg) extension 1000 but never connect a sip handset to that extension, everyone gets sent to voicemail and you end up with a folder of wav files. What you then do with the front end is beyond me, though at home I just have apache serving an index of that directory.
If the SIP side of it is the mystery and you're interested in it, I'd really recommend installing Asterisk or FreeSwitch and having a play. You'll be stuck writing weird INI files or XML for config and there's a lot of new terminology, but it can be cheap and fun to play with. And a terminally deep rabbit hole if you actually want to fall down it.
Personally, the only reason I still run my pbx (aside from something to faff with, and a platform for testing silliness) is the fact I can easily record phone calls. Most of the time it's only because I have a bad memory and take useless notes, but there doesn't seem to be a single modern mobile phone on market that allows me to record both sides of the audio when making a voice call.