Those tones were DTMF. Tapping out the number on the hook was how pulse dialing (the other dialing standard) worked. Pulse dialing was superseded by DTMF at some point, but switchboards supported both for a long time. That's why you could use your tone generator (or your mobile phone!) to dial, because that's literally the exact same way that your phone dialled.