I'm just guessing what could have happened.
Did you update your devices before this happened? If so (and you can take a look at this in any other case as well), go to Settings - General - Use Side Switch to (iPad) and select the opposite of what's set up. Then turn it to your prefered setting again. There should be something similar on the iPhone, but I can't tell you where exactly. Then take a look at your side switch - perhaps it's muted. If you selected "Lock rotation" for your side switch, then open the Control Center and take a look there.
If this doesn't solve the issue, go to Settings - Sounds - Ringer and Alerts. Is "Change with Buttons" enabled, is the slider leftmost? Again, this will work for the iPad, I can't tell you where you'll find it on an iPhone.