How does FOP2 fetch the peer information in first instance? I mean, what is the first action perfomed by FOP2 in order to know peers status?
If you are curious about what FOP2 does, you should run it in debug mode to see the manager dialog:
service fop2 stop
cd /usr/local/fop2
./fop2_server -X 3
and watch the show. In particular the SIPPeers command is being sent at startup.
When I start fop2 server it displays all peers as available and looking AMI no Action is performed when starting fop2 server. But when I go offline with any of the peers, fop2 displays the correct information for that peer from that moment on. It seems that by default fop2 "think" all are available. I wouldn't be asking this if I didn't use fop2 before. When using it with Asterisk 1.8.15.1 fop2 shows correct information at start.
B.
I do not think there is any change between the manager output/commands from 1.8.15 to newer versions.
FOP2 does not think anything, it will react to commands. By default it starts with a registration "ok" status, because many people have extensions with unmonitored state completely, or even some channel drivers do not have the concept of registrations (not everyone uses sip).
If you use 2.27 beta and want to change the initial status, look at /var/www/html/fop2/js/presence.js, the settings there are self explanatory:
var startNotRegistered = false;