Check the video here:

Step 1: Connect the devices

Wire them up: Uno's GND to one pin of the speaker, each of Pin 11 and Pin 12 to a resistor respectively, then the resistors to the other pin of the speaker. In the end, connect the Mars board to the computer with a type-C cable.

Step 2: Open Arduino IDE, write the code and Tone library, and run the program

First write/copy the code in the Arduino IDE (here I use the version 1.8.0).

Include the Tone library. Click Sketch -> Include Library -> Manage Libraries.

On the manager window, type in tone to search (it may take a while to auto-update), find ToneLibrary and click Install.

Then select Tools -> Port and Board. Click the upload icon to burn the code to the Arduino board.

Step 3: Power on and "dial" the phone number

Power on the circuit by the USB cable connected to the computer. Open Serial Monitor in the IDE and enter the phone number on the window.

Then the speaker will dial the number you entered. Place the telephone receiver mic near the speaker, and the phone will dial automatically. Saved the rotary panel! Since the modern smart phones cannot dial, we can test only. Hit the Call on the mobile phone, tap out a tele number and enter the same one on the serial window. Listen, the same sound!

BTW, I found that if the resistor is removed, the speaker will make louder sounds. But, that's not so safe in protecting the speaker. So be cautious when trying.