The exact configuration depends which DMG you are using as there are two DMG 'families', one family is PC based (DMG3000 and DMG4000) and one is applicance based (DMG1000 and DMG2000).
Integration with the Mediation server in either case is easy, basically you just need to enter the IP address of the Mediation server and setup a few parameters to handle the 'normalised' numbers that OCS will be sending.
Integration with the S8500 depends on which interface you are using T1/E1/BRI/Analog etc but basically you need calls routed from the S8500 to the DMG and you need to preserve the called and calling numbers so that the DMG can send the calls to the correct SIP address and hence the correct OCS client.
Quick start guide for the DMG2000 range is available here :
http://www.dialogic.com/microsoftuc/com_server2007/default.htm
along with lots of other useful information.
Also the DMG forum is here:
http://www.dialogic.com/forums/forums/forum-view.asp?fid=10