That command should work.
To test it connect with hyper terminal.
Type
ATZ
You should see OK displayed.
Now type
ATS0=4
You should see OK displayed
Now type
AT&W
You should see OK again.
ATZ does a reset on the modem.
ATS0 (that is zero and not the letter O) sets the internal register s0 to the number of rings you want the modem to answer the phone with.
AT&W writes the configuration to the modem's memory so when you turnit off and back in the modem remembers that setting.
Now here is the real problem. The modem is controlled by the program you are running! It that program has a modem init string it will change the settings you are using from hyperterminal.
The modem by itself will only pick up the line when the phone rings with ATS0=4. It is up to the program to actually do something when the modem answers the call.
Good Luck...