VIENTIANE, Laos — It was brief and it was only pleasantries, but President Obama and President Rodrigo Duterte of the Philippines spoke to each other on Wednesday, just two days after Mr. Duterte’s profane outburst prompted Mr. Obama to cancel their first meeting.

The two men spoke while they were waiting with other world leaders to enter a gala dinner at a summit meeting of the Association of Southeast Asian Nations here, according to a White House official. The official did not say what the two men discussed, except to suggest that it was not substantive.

For reporters covering the dinner, the prospect of a meeting or handshake between Mr. Obama and Mr. Duterte was the story of the evening. Publicly, at least, it fizzled: At a photo session with the leaders, Mr. Obama stood several spots to the left of Mr. Duterte. At dinner, they were seated far enough from each other to make a chance encounter unlikely.