The Justice Department sided with competitors of American Telephone & Telegraph Co., yesterday and recommended major changes in the way consumers are asked to select long-distance telephone service.

In comments filed with the Federal Communications Commission, the Justice Department agreed with AT&T's rivals that the system most widely used now gives "undue preference" to AT&T.

The problem is that most consumers, when offered a choice of long-distance companies, have not made a choice, the department said.

Currently, that means AT&T gets virtually all those customers who fail to indicate a preference because all local phone companies except one automatically assign them to the Bell System. This gives AT&T an unfair advantage, according to competitors such as MCI Communications Corp., GTE Sprint Communications Corp. and Allnet Communications Services Inc., which filed comments with the FCC last week.

The Justice Department urged the FCC to "encourage consumer choice" by requiring local telephone companies to use a "ballot and allocation" procedure similar to one employed by Northwestern Bell Telephone Co.

Northwestern Bell uses a system that gives AT&T's rivals a share of the customers who don't choose.

Northwestern, which serves Minnesota, Iowa, South Dakota, North Dakota and Nebraska, sends ballots to its customers asking them to select their primary long-distance company. Customers who do not return the ballot are warned that they will tentatively be assigned to a long-distance company, but can still choose a different company free of charge.

Customers who still do not choose are assigned to other long-distance providers in proportion to the choices made by other customers on the first ballot. If 50 percent of the responding customers chose AT&T and 50 percent chose MCI, the non-respondents would be assigned in like proportion.

Customers are offered three free chances to choose a long-distance carrier over a specified period. After that time, customers can switch carriers for a fee.

Under this system, 65 to 70 percent of Northwestern's customers have made their own selection of a company, compared with less than 50 percent of those offered a choice elsewhere.

The consent decree that ended the government's antitrust suit against AT&T and broke up the Bell System requires local phone companies to provide customers with equal access to AT&T and its long-distance competitors.

AT&T opposes any system that gives its rivals a share of those customers who don't choose. In comments filed with the FCC last week, AT&T said consumers like the system in place throughout most of the country, and that most customers who do not indicate a choice do so knowing they are, in effect, choosing to stay with AT&T.