Responding to a wave of consolidation in the telecommunications industry, the nation’s third- and fourth-largest wireless phone operators have agreed on the terms of a deal to join forces. Sprint and T-Mobile have talked about a combination for years but continued to put it off, each preoccupied with other deals, and concerned about scrutiny from antitrust regulators. But in recent days, the two sides have settled on the terms of a $32 billion deal that is likely to be announced this summer, people briefed on the matter said on Wednesday. Under the terms of the deal, which are still preliminary, Sprint would acquire T-Mobile for about $40 a share in cash and stock, a 17 percent premium to Wednesday’s price. Talks are incomplete and could still fall apart. But the agreement on terms represents a turning point in a relationship between two companies that have long contemplated a merger.