Pulse To Tone Converter based on Arduino (sorry no good schematic, just drawing):
Video how it works:
Operation:
It detects rotary pulses on the phone line and counts them according to preconfigured time thresholds, then converts counted pulses to digit, selecting needed audio file from SD card an plays it as a tone to the phone line.
Arduino Nano code: