Terminals 1, 2, 3, and 5 are correct.
Terminal 4 is a sinking output. Normally, terminal 4 is high via the 4700 Ohm pullup resistor. When you put a positive signal on 3, the NPN transistor will connect terminal 4 to terminal 5, dropping the voltage to near zero.