Edson,
You have a couple of options here.
One you can have all of the devices use a single centralized SIP Trunk configured from a centralized CUBE.
In this case you would take advantage of basic routing functionality to say which calls should go out which trunks.
As a more advanced option, you should look into session Management, in this environment you would have all of your TDM and IP PBX use the Session Manager as the "default route" and it would use Routing rules to find the best eggress method.
As a first step I would watch the TECHWISE TV broadcast that specifically talks about this that is airing for the first time tomorrow (May 6th ) at 9:30am PST.
Here is the link:
http://www.cisco.com/en/US/solutions/ns340/ns339/ns638/ns914/html_TWTV/twtv_episode_66.html
Regards,
Darryl Sladden
Senior Product Manager
Cisco Unified Border Element