The term dialogue refers to speech with 2 or more persons involved.
People, due to their misunderstanding of the word "dialogue" have attempted to introduce the word "polylogue", and you'll undoubtedly be able to find uses of it on google but, as far as I know, no major dictionaries have recognized it; I wouldn't use it.
To answer your question directly: If more than 2 characters are chatting in a play, it is still called a dialogue.
I'd not come across polylogue before, but the OED defines it as "A discussion involving more than two people".
A dialogue is defined as: "A conversation carried on between two or more persons; a colloquy, talk together. (The tendency is to confine it to two persons, perhaps through associating dia- with di)"
So I guess that by dictionary definition they are synonymous, but in the real world they can tend to be used in different ways. I personally prefer to think of dialogue as meaning conversation between two or more people.
And it might be interesting to see that a duologue is: "A conversation between two persons, a dialogue; spec. a dramatic piece spoken by two actors."