Things may have changed over the past 3 years, but we had a hell of a time getting 3cx to work correctly using a Sophos UTM (I realize you are using an XG) We ended up setting up a seperate Mikrotik router for use with our PBX Server. With Sophos we had dropped calls, audio issues, etc. Good luck!