We took a run at this a couple of months ago and ended up just going to a proprietary SBC. We're still experimenting but basically we're probably going to put an AnyNode SBC in between the Microsoft stuff and our Freeswitch stuff.
After many hours of Googling I only heard the odd whisper of someone making Freeswitch work with MS direct routing and there were little to no details. Personally I didn't have the mental bandwidth to deconstruct it and make it all play nice, so we're playing with the demo version of AnyNode.
I'll update this thread with progress but that project is on the back burner for now.
PS for Daz. Microsoft direct routing (or Microsoft phone system, its confusing) is basically just a connector into MS 365 stuff to allow outbound and inbound calling to the PSTN from Teams and Skype for business. They use a bunch of witchcraft involving options messages and TLS with certificates only from approved authorities to make it all work. There's an approved SBC list which is short and you're supposed to stick to them.
Are you still thinking you'll have a crack at this when you're bored @bcmike? I don't think I have the technical know-how to pull it off myself, but will be keeping an ear to the ground and happy to help out/test if anyone is wanting to try it...