Somali President Siad Barre's unusually secretive two-day visit here apparently failed to resolve the severe strains his country's war with Ethiopia has put on relations with the Soviet Union, patron and arms supplier of both countries.

The official Soviet press, which had not reported Siad Barre's presence in the country until he left yesterday, said that the Somali leader and the Kremlin exchanged opinions on questions of mutual interest."

That terse description was interpreted by several well-informed diplomatic sources here as indicating that the Somalis and the Soviets were far from agreeing on how to compose their differences. Diplomats and journalists were left with far more questions than there were answers about the Somali leader's visit and the character and substance of his talks with the Kremlin leaders.

Soviet leader Leonid Brezhnev did not meet personally with Siad Barre, an omission that sources called a clear Soviet snub. Brezhnev and Siad Barre are both president and party chief in their respecive countries, and thus theoretically of equal official status. Instead, the Somali leader met with Soviet Premier Alexei Kosygin, Foreign Minister Andrei Gromyko and party ideological chief Mikhail Suslov.

The Somali ambassador here, who during Siad Barre's visit denied knowing the whereabout of his leader, last night reportedly described the talks as "lengthy and fruitful." According to Tass, Siad Barre sent a message to Brezhnev from his plane upon departure, expressing "cordial regards and gratitude to Brezhnev an the Soviet government for a warm and friendly welcome."

The Soviet Union has been supplying both, Ethiopia and Somalia with arms but in recent weeks, some sources have reported, the arms resupply to Somalia, which is openly supporting a guerrilla movement that has captured a vast region in eastern Ethiopia, has slackened.

While ignoring Said Barre, Tass at the same time was loquacious in its praise of a simultaneous visitor. Yasser Arafat, a man who is not the leader of a nation, but of a guerrilla organization, the Palestinian Liberation Organization, Tass reported in some detail Arafat's talks and his final message. Siad Barre got nothing. When Mengistu Haile Marian, the Ethiopian leader, was here in the spring, the government press carried both his photographs and accounts of his activities.

Despite the officials silence, some observers theorized that Siad Barre may have come at the right moment for his purposes. Said one Western diplomat: "He has gone as far as he can on the battlefield and still has not caused an open break with the Kremlin. He needs Soviet bullets for his Soviet guns. The question is, what can he offer them (the Soviets)?"

The war between the two nations has placed the Kremlin in an untenable position that they cannot allow to continue," according to one diplomatic source. The Soviet Union, for some years, the principal patron of Somalia, took on Ethiopia after Mengistu cut off U.S. aid.

The war between the two Soviet clients has set back the Kremlin's attempts to wield permanent influence in that part of the world and the rift with Somalia could jeopardize the Soviet naval facility at Berbara, which serves its growing Indian Ocean fleet.

Wire services reported the following other developments.

Diplomatic sources in Beirut were quoted as saying that the Soviet Union will supply Ethiopia with 48 advanced Mig-21 fighters and large consignments of tanks and missiles under a $385 million arms deal. Included in the deal are SAM-3 and SAM-7 antiaircraft missiles, as well as the wire-guided anti-tank missile Sagger.

Meanwhile, President Hassen Gouled of Djibouti was quoted by the Kuwait newspaper Al-Qabas as saying his country's economy was onthe verge of collapse because Ogaden fighting had cut Ethiopian transit trade, on which Djibouti is largely dependent.

In Damascus, the Eritrean Liberation Front claimed that its forces have captured Agordat and that only three major Eritrean towns remain in Ethiopian hands. The front, one of three guerrilla groups fighting for independence from Ethiopia, claimed that the rebels control 95 per cent of the province.