Have you tried using BAT to Export the Gateway details? It should give you everything except for the IP address.
On the CLI issue the command "show risdb query gateway"
Copy the output and paste it into a text file (like Notepad++) and save with extension CSV.
Open in Excel.
That should give you a list of all of the endpoints along with their individual name, IP , etc. You could sort on the gateway name column to show which ones are on the same router.
If your v10.5 CUCM doesn't like that command, it might not be available until a later version. You can run "show risdb list" to get a list of reports you can run.