Refugees who tried to get to Australia by boat have spent years on remote islands or held in immigration detention.