THE HOT LINE from the embassy here to the palace in Tehran was out. Communications strike. Ardeshir Zahedi was doggedly trying to get through Saturday night, a time of tension in which the government and the shah himself were threatened by riots, confusion and unrest.

And then the ambassador learned that a woman at the embassy had simply picked the phone and dialed direct to Tehran and had a lovely long chat with her mother.

Zahedi, whose sense of proportion and the vast sweep of history is rarely shaken, any more than his sense of humor, takes a wry delight in setting his own anxiety against the Persian woman's leisurely chat with mama.

So much for the perquisites of power. He got through to the shah, and has been in communication regularly and his hot line to Tehran is now working.

To many in Washington, the ambassador is the golden boy of the diplomats. Educated in America (Columbia, UCLA, Utah State, he was later married to the shah's daughter for a time, and became the shah's ambassador to America, the most vital of nations to Iranian interests.

His parties at the embassy became famous - you might meet anybody from Barbra Streisand to the People's Republic of China chief of mission, and oil lords might mingle with youngsters from New York, down to play curious ancient Persian musical instruments. They say he can outdance, outlisten, outtalk and outkiss any ambassador in the capital.

He has quiet lunches with the Soviet ambassador, quiet talks with President Carter and music to wake the dead.

Last year Zahedi was honored with the B'nai B'rith humanitarian award for help in freeing hostages held by Hanafi Muslims at the Islamic Center. And Howard University honored him for contributions to black education. He gave heavily to the Hubert H. Humphrey Institute of Public Affairs, and in one way and another has used his embassy for other purposes than enchanting the jet set, yet it is probably true most people remember him quickest as the ambassador with his shirt open, still dancing at 2 a.m.

It's the image people like best to remember of anybody.

But this week he put glamor aside. You entered his embassy not by the usual side door towards the rear (a door leading to a grand staircase and the gorgeous reception rooms blazing with mirrors and candles) but through the ceremonial door on Massachusetts Avenue which leads to offices.

He was in his. He had just finished a talk with Henry Kissinger, former secretary of state, who wanted to be filled in on events. He answered a phone call from the president of a TV news corporation checking on a rumor the shah had been assassinated. He had been busy to answer questions from congressmen.

The gala October party for the shah's birthday was canceled this year - the wagons full of strawberries - and the money donated to earthquake victims, the embassy explained in notices sent out in place on invitations.

Everybody wanted to hear the latest.

"Of course I am not a god, to foresee the future. But as a Persian, I think I do understand my country better than some others might."

The first requirement of any government in any nation, he observed, is law and order so that people are secure, and he cannot imagine any patriotic Iranian would disagree with that.

At the same time, he went on, there is "no doubt" that abuses and corruption have occured. The shah, he said, had great dreams for a modern, stable, independant and democratic Iran, but had to depend on those in his government to implement the dream.

As in any government that hass been in power 13 years, Zahedi said, there has been both good and bad.

This seemed to be setting a distance between the shah and government, which functioned under his authority, and I asked the ambassador about the arrest of various high government officials of recent years, including the ambassador's brother-in-law.

"It's difficult to judge at this distance," he said, "but a special tribunal is being named today to look into it."

The shah has also asked for an inquiry into the financial and other dealings of his own family - an unprecedented step in a nation which still has echoes of both Oriental magnificence and Oriental authoritarianism.

Recently in Iran there has been a new liberalization. Press censorship, for example, was lifted. Pundits queried at the time whether such loosening of control would lead to riots or protests against the shah, and many advised against it.

"He thought he could do that," Zahedi said. "He was thinking that people are more educated now and economically better off. I know what the shah's hope and dream has always been - a democratic state, though of course it takes time."

As recently as World War II, horsedrawn carriages were standard in the Persian capital. Camel caravan still pass right by the airport.

As recently as 1950 the per capita income was $60; now it's up to $2,2280.

The shah's insistence on education has had some wry results, in some cases. Twewnty-five years ago there were 500 Iranian students in America; now there are 37,000. Then there were 375,000 Iranians in school, but now more than 9 million. Illiteracy then was 96 percent, and now is 53 percent.

Zahedi said that in change so rapid there were bound to be frustrations.

"Some said you could not possibly go this fast, and others said you had to go much faster than you are going."

Zahedi, who is said to know the shah as well as anybody in the world, tried to put it in American terms:

"Think of all those boys and girls going to school in America, fresh from Iran. Here they see a heaven of democracy.

"Unique in industry. Unique in power. And they see the gap between America and home. Being young, loving your native Iran, having ambition, and seeing America, it makes you unhappy, disappointed, frustrated."

The shah, in his memoirs, considers the risk of moving too fast. Some warned him it was foolish to introduce tractors, when 19th-century ploughs would represent improvement enough. But, he insisted, the Tehran airport, hospitals, transportation should be as efficient and modern as he could make them.

I asked if he had been in frequent touch with the shah by phone and if the shah was still living in the palace in northeastern Tehran?

"Of course. He's not the kind that moves out because of security reasons. I remember once he was going to the site of an earthquake where he would walk around talking to the homeless. He refused a bullet-proof jacket.

"I said to him, 'I beg you on bended knee to wear it,' and he said, 'Get off my back, but I'll see you at the airport.'

"So later I met him at the plane and there he was with just an army shirt on his chest. No bullet-proof vest.

"And the top buttons of his shirt open."

The ambassador had fetched some coffee, himself, no hours in green silk that I could see. The mugs were Japanese with the French word for coffee painted on them.

"The world is so small now," he said. "No nation can live just to itself. Whatever the frustrations in Iran, whatever is best for our country, we will do it.

"Iran has always been a bridge. The old silk route from China to Rome. The bridge of victory (as Churchill and Roosevelt called it in World War II) for the lifeline supplies from the West to reach Soviet Union.

"Over the centuries, invasions and conquests, and yet Iran is a nation. There is surprising tolerence among Iranians, and for all the ups and downs, still the love for their country will bring unity after all."

Of all people, he said, the shah is most distressed to have a military government, even temporarily to restore order, or rather is most distressed to see the need for it. The ambassador foresees genuine elections after a short military rule, "and then all these people can vote their wishes."

He spoke of his old town and pointed to a book with pictures from the ancient city.

"The pass through the Zagros goes between Hamadan and Kermanshah, you know. There is just one great mountain between them. Once I was snowbound and had to walk the route. Snow was five feet thick. I wrapped up in sheepskins and ate dates and kept walking. It was not safe to wait for help. I can remember how it was when at last I felt the cold passing, getting warmer again, and the lights of the city.

"It was," (and he hesitated) "a very good night."

He remembered another time, when he was flying over the fabled port of Hormuz, where the Persian Gulf is extremely narrow. Once the ancient merchants of India brought rubies and silks and ivories there to sell, and now the oil transports sails past it on their way to Japan and Europe and America.

"I thought how narrow the passage is. Why couldn't a small gang sink one of two ships? The oil would be four inches thick on the water. What other ships in the line would dare sail through, when one flash of spark would set the sea on fire? Listen, the hairs of my hand stood up when I thought of it."

And yet the ships came through.

Zahedi did not look much like the glittering party host, his thoughts with his old town, his old country.

He did not look much like the lively kid he once was, washing dishes for pay in Phoenix (not that many in Phoenix do it for fun), nor the "scourge of London" as one Washington woman once called him.

"When he was in London years ago," she said, "no woman was safe." None wished to be.

"The shah," the ambassador said, has always wanted to be a bridge - as Persia has been a bridge - between the old nation and the new. He has wanted his son, the crown prince, to succeed him and complete the work."

Zahedi looked at a magnificient book of color pictures of Persia - the ancient tomb in Hamadan, the holy mosques, the ablution pools, the damask roses.

"The bridge," he said , pointing to the book, "of turquoise."