Key Senate members are near agreement on revising sections of communications legislation expected to come to a Senate vote today that would have expanded sharply the Defense Department's role in regulating the nation's telephone system, sources said yesterday.

The Washington Post reported last week that little-noticed provisions of telecommunications legislation passed by the Senate Commerce Committee three months ago would have given the president, acting on Pentagon recommendations, authority to provide telecommunications facilities or equipment based on a broad concern for "national defense and security."

The language was of particular concern to competitors of American Telephone & Telegraph Co., who are wary of the Defense Department's historic opposition to competition in the telecommunications industry.

Further, the legislation would have given the secretaries of Commerce, State and Defense authority to block public disclosure of vital telephone industry operations information submitted to the Federal Communications Commission. The new language forces disclosure of such decisions to the relevant congressional committees.

The Republican sponsors of the bill have agreed to drop from key sections of the legislation the phrase "for national defense and security and emergency preparedness" so that their competitive safeguards could be set aside only "during times of public peril, disaster or national emergency." The latter phrase is maintained in the bill.

The changes in the legislation were suggested by Sens. John Glenn (D-Ohio) and Gary Hart (D-Colo.) and adopted by the leadership of the Commerce Committee. They are expected to be added routinely to the bill before final Senate action.

The two senators are concerned with making sure that the executive branch uses war powers only in war time and that the Defense Department be "treated like everybody else unless we're at war," according to one source.

Agreement on the legislative changes came as floor debate opened yesterday on the telecommunications legislation, a rewrite of the 1934 Communications Act, which deregulates facets of the telephone industry and orders a restructuring of AT&T to permit the company to enter new markets.

The key sponsor of the bill, Sen. Robert Packwood (R-Ore.), and Sen. Ernest Hollings (D-S.C.), the lone Commerce Committee member to oppose it during committee mark-up, dominated floor debate on the bill yesterday, although no votes were planned for the session.

Votes on amendments and possibly on the full bill could occur today. Key amendments expected to be considered today include one by Sen. Barry Goldwater (R-Ariz.) to strip from the bill language limiting municipal regulation of cable television.

Organizations representing local governments have opposed this language. Goldwater does, too, because he says it was put into the bill at the last minute without his knowledge. Goldwater calls the issue "a matter of honor."

In addition, Hollings has proposed a series of amendments dealing with the restructuring of AT&T. One would require that AT&T sell stock in a new competitive affiliate, and another would prevent deregulation of the monopoly segments of AT&T's telephone equipment business.