If this is 95 or 98, there is a built-in "diagnostic" but it only will tell you if the modem is getting power and set up properly for the appropriate resources of IRQ and I/O address and that it can talk to the computer. It won't tell you if it candetect a dial tone. I have seen several modems that pass the diagnostic and still won't dial in. Detecting the dial tone uses a different part of the circuitry than the windows diagnostic that talks to the modem.
Here's how to test:
In ControlPanel, Modems, you will see list of com ports and modems. Click on the Diagnostics tab, select/highlight the com port your modem is on, then click on the More Info tab. In about 5-8 seconds you should see a window pop up with AT commands on the left and the responses by the modem to each one on the right. At the top of this window you will see the IRQ and address and the type of UART. If you get a message like Can't open port, the modem is not set up and you probably have a conflict. Look in Device Manager und