Had the same issue. The telltale is the missing volume slider. You may have a corroded contact in the dock. Personally my kids got my iPhone wet.
This may or may not work for you.
http://www.huanix.com/2009/06/20/iphone-2g...rk-with-iphone/
Obviously the iDevice needs to be jailbroken for it...