Well I'm guessing it's probably out of warranty.
So here's what you can do, you could head over to ifixit.com and see if they have any guides which will allow you to open up your iPhone 3G and fiddle around with the buttons and find out what you need replaced (then you can order the parts off eBay or ifixit.com depending on the specificity of the item you need).
Alternatively, you could try to JB your phone, I'm pretty sure there is a JB app out there which will do what you want it to.
Luckily, since you have an iPhone 3G it is not overly difficult to JB no matter what iOS you're on.
As for your original question, I do not think that there is an App Store App which allow for the functionality you requested.