The stock market eked out a small gain Friday in an advance restrained by selling pressure on long-distance telephone issues.

The Dow Jones average of 30 industrials rose 5.20 to 2,550.25, stretching its gain for the week to 61.64 points.Advancing issues slightly outnumbered declines in nationwide trading of New York Stock Exchange-listed stocks, with 766 up, 725 down and 517 unchanged.

Volume on the floor of the Big Board came to 165.44 million shares, up from 151.37 million in the previous session. Nationwide, consolidated volume in NYSE-listed issues, including trades in those stocks on regional exchanges and in the over-the-counter market, totaled 198.47 million shares.

The stock of MCI Communications plunged 73/8 to 225/8 in heavy over-the-counter trading. Late Thursday the company announced a restructuring and said the costs of corporate changes, along with intense competition, loomed as a drag on earnings "for the next several quarters."

The shock effects of MCI's drop spread to other long-distance telephone issues. American Telephone & Telegraph fell 11/8 to 32; United Telecommunications 27/8 to 221/2, and GTE Corp. 5/8 to 275/8.

In a statement responding to the stock activity, AT&T said its long-distance volume and revenues remained strong.

In the economic news, the Labor Department said the nation's core inflation rate, which excludes volatile food and energy prices, advanced a moderate 0.3 percent last month.

The report "was definitely encouraging," said Michael Metz, a vice president at Oppenheimer & Co. "It suggests that if you subtract oil, inflationary pressures are easing."

Separately, the Commerce Department reported that the nation's trade deficit narrowed 3.3 percent in September, showing its first improvement since June.

Brokers said the most recent data evidently gave the Federal Reserve whatever encouragement it might still have needed to take new steps toward lower interest rates in the money markets.

But the reaction in the stock market was mild at best. Analysts have said the market largely anticipated a move toward easier credit with its recent rise to eight-week highs.

General Electric rose 3/8 to 553/8 as the company raised its quarterly dividend from 47 cents a share to 51 cents a share.

Other gainers among the blue chips included International Business Machines, up 1 at 1135/8; Exxon, up 3/8 at 503/8; Coca-Cola, up 1/2 at 453/4, and Merck, up 3/8 at 85.

As measured by Wilshire Associates' index of more than 5,000 actively traded stocks, the market increased $0.04 billion, or less than .01 percent, in value.

The NYSE's composite index of all its listed common stocks gained .18 to 173.30.

Standard & Poor's industrial index held steady at 371.23, and S&P's 500-stock composite index was up .10 at 317.12.

The NASDAQ composite index for the over-the-counter market fell 3.61 to 350.85. At the American Stock Exchange, the market value index closed at 297.52, up .83.