"Permanent" realtime peers?

I want to store peer settings in MySQL in “realtime”-fashion, but to keep ability to see all peers with OK/UNREACHABLE on ‘sip show peers’. How to make this? Now I see only registered or actively called/calling peers by "sip show peers’, and I don’t see rest of them despite they send/receive OPTIONS etc.

Add rtcachefriends=yes to the general section of sip.conf. Reload sip. Once a call is made to those extensions, they will be listed until you reload sip again.