I've had this problem happen twice of phone not ringing or even vibrating when locked tho DND was off and volume up. This is a recent glitch (my phone is 2 years old) and has occurred when I allowed a "settings upgrade" to be downloaded on my phone.
Your Assistive Touch solution fixed half of the problem (yay), but instead of ringing the phone vibrated when locked, tho I had a ring tone set. To get my ring back I had to do the following...(from another post)
Turn silence button on the off(red not showing)
go to settings and unlock the sound as following:
settings--> sound-->lock sound
turn it off, and then turn it on.
The sound will come back
This problem is maddening and the solutions should not be so obscure and difficult to find a solution. I've linked it directly to the upgrades download. PS - in DND under Silence: it does not seem to matter which is checked "always" or "while iphone is locked". Now that I've fixed it, it rings while locked on either setting.