The 6-foot-11 Andersen was a second-round draft choice of the Hawks in 2002. He has spent his professional career in his native Australia and in Europe, most recently in the Spanish League with FC Barcelona.
The Rockets have been scrambling to find a center since the team announced last month that Yao Ming was out indefinitely with a hairline fracture in his left foot.
Andersen averaged 11.1 points and 4.1 rebounds to help FC Barcelona win the 2008-09 Spanish National Championship and a berth in the Euroleague Final Four. Andersen was a member of Euroleague championship teams with Virtus Bologna (2001) and CSKA Moscow (2006 and 2008).
"David has been a winner with every team he has played for in Europe," Rockets general manager Daryl Morey said. "He is a very well-rounded player who possesses good offensive skills and a very good shooting touch for a big man."
Andersen played for Australia in the 2004 and 2008 Olympics.