Ultrasonics do an excellent job of cleaning guns, but you still have to manually clean the bore and chambers of copper or lead fouling.
There any number of products to use as a cleaner, but be careful to really read the label. Some cleaners like Simply Green or Greased Lightning can and will seriously damage aluminum.
Good cleaners are ordinary cheap paint thinner, a liquid soap cleaner, or a commercially purchased cleaner made for use in ultrasonics, although those are usually expensive.
Water base cleaners have to be rinsed off, and you can do this using the cleaner or by simply submerging the parts in a sink of hot water.
If you get the parts hot with the hot water, the parts will flash dry themselves, although it's a good idea to make sure by using a hair dryer to warm them until they're dry.
Solvent cleaners are usually self rinsing and drying, but again, you can use a hair dryer to warm them.
In either case you have to get a rust preventing lubricant into all areas because ultrasonics remove ALL lubricant even from the tiniest crevice or hole.
One method is to use a spray lube that sprays in a fine mist.
Personally I used CLP Breakfree with an air brush. This sprays a very fine mist, and like most gun lubricants, the lube spreads and creeps into all areas.
Another way is to use an artist's type brush to apply a thin coat of lube, or what I sometimes use, a soft toothbrush. I apply a few drop of CLP and "scrub" the parts to deposit a thin coat of lube.
Finally, one great product is Cylinder & Slide Shop's "Dunk-It".
This is a bucket of a cleaner-lubricant.
This cleans the gun and leaves a fine coat of a lubricant everywhere.
You can use this in the ultrasonic cleaner, and it's reusable for quite a while.
Just run the gun in the cleaner and shake off the excess. I would still use a standard lubricant on key parts.