For this phase 3 cluster-randomised controlled trial , 34 communities in four sites in Africa and 14 communities in Thailand were randomly allocated in matched pairs to receive 36 months of community-based voluntary counselling and testing for HIV ( intervention group ) or standard counselling and testing alone ( control group ) between January , 2001 , and December , 2011 .