Collection<AsteriskAgent> getAgents()
    {
        Collection<AsteriskAgent> copy;

        synchronized (agents)
        {
            copy = new ArrayList<AsteriskAgent>(agents.values());
        }
        return copy;
    }
Collection < AsteriskAgent > getAgents ( ) { Collection < AsteriskAgent > copy ; synchronized ( agents ) { copy = new ArrayList < AsteriskAgent > ( agents . values ( ) ) ; } return copy ; }
Return all agents registered at Asterisk server.

@return a collection of all agents.