AT&T and the Communications Workers of America (CWA) have agreed to terms, ending a strike that involved some 17,000 workers.