For CUCM refer to below sections of the SRND:
http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/srnd/collab10/collab10/trunks.html#pgfId-1342237
Also refer to below document for CUCM and CUBE config:
Ref: http://www.cisco.com/c/en/us/support/docs/unified-communications/unified-communications-manager-callmanager/117300-configure-cube-00.html
Let me know if you have any more questions after reading the above.
-Terry
Please rate all helpful posts