Signalmen at adjacent signal boxes largely communicate with each other using bell signals. Compared to voice messages, bell signals have the advantage that they are quicker to send and have less risk of being misunderstood. In the early days of railways, they also had the advantage that the equipment they use is simpler than a telephone.
Not all codes are used by all signal boxes. E.g. Only boxes that may be switched out would use 5-5-7.