Agent go on 'Unreachable' State

Hi hope you will be fine. We are running a big inbound call center. We are using asterisk 1.4.42. We
are also using an agent application through which agents get login and connect our asterisk server
We are also using AMS (Agent managment system) to check the agent status in queue.
We are facing problem that after some time agent lose registration. And after it its status is as below

sip show peer 6125

Defaddr->IP : Port 5060

asterisk -rx ‘queue show Skill301’ | grep 6125

Agent/6125 with penalty 10 (realtime) (paused) (Unavailable) has taken no calls yet

First we are using realtime for authenticating agents through sipbuddies

After that we hradcode the users now they are authenticating through sip.conf

But still the same issue. We are also using qualify=5000

Is this agent application issue , network issue or asterisk server issue.