How old is the phone? You can take it back to the dealer if it is still on warrantee to get replaced or fixed.
There is a separate speaker that handles the ringtones and speakerphone function. The spealer might be damaged or the connection damaged. Should be a simple fix if that is all that is wrong.
You are in good shape if you can still make a call and the other person can hear you.