# Problem of making entities agree on some wavelength

I remember seeing this problem somewhere before, but don't remember what it's called and can't find it again.

It was presented as two guys having $$n$$ phones each that don't ring when called. Each phone from one person is connected to one phone of the other person, in some random permutation. They can each test one phone every "round", to check if they are using a connected pair of phones and thus able to communicate (this is in some way a consensus problem). They had to devise some strategy beforehand to be able to communicate (and minimize the amount of rounds necessary). Of course, the application behind this would be to make two entities connect on some same wavelength at the same time.

What is this problem called, also what are the best strategies?