Desktop Phone Dialer

Looking to see if anyone has a working version of a phone dialer desktop app. I need it to work on windows and Mac so the TAPI plugin from MBS will not work. I have a USB USRobotics 56k Modem to dial through so the serial socket should work for it. I know this is kind of old school so dig out your old programs! Any help would be greatly appreciated.

Blast from the past but I would think you could just send the AT command set to the serial port

ATDT1234567890 should dial that number if my crusty old memory serves

From the old dos prompt
copy con com1
ATDT1234567890 ^Z
Enter

[quote=374564:@Tim Kearns]Blast from the past but I would think you could just send the AT command set to the serial port

ATDT1234567890 should dial that number if my crusty old memory serves

From the old dos prompt
copy con com1
ATDT1234567890 ^Z
Enter[/quote]

This does indeed dial the number, however, once the other end pick up the phone, the modem will start screaming to try handshaking with the (supposed) other modem :wink:

Many years ago I developed a shareware solution to do exactly this. It took some work to find a working solution with the AT commands.
I should have the source code somewhere and will try to find it to provide some help.

Does it have “Caller ID” as well?

Thanks.

Lennox

[quote=374678:@Lennox Jacob]Does it have “Caller ID” as well?

Thanks.

Lennox[/quote]

I also have this as part of another shareware solution I used to provide SOME years ago.
On this weekend I will try to put some order on my old source code and find the interesting parts.

I assume you have some knowledge about analog modems and the AT command set. Unfortunately, the AT command set is not as standard as one can think and the mileage can vary on different hardware. I recommend to find some documentation about various modems and the AT command set variations. Additionally, knowing how the Serial communication works is required.

Anyway, below are the most important parts about using an analog modem as a telephone dialer and caller id reporter.

Dialing the phone require first to initialize the modem properly. The important thing to understand is an analog modem is mainly build to dial online services, that is expecting on the other side another modem to handshake with. That said, the modem has to be initialized in a way to allow dialing a voice phone number avoiding the modem to try screaming as if it has to communicate with another modem.

For the following to work, you need an analog phone to be connected in parallel to the same analog phone line where the modem is connected. After issuing the dial command, and modem dialed the number, you have to pick up the handset in 10 seconds and optionally hangup the modem after that. Or just wait 10 seconds after when the modem will hangup automatically.

Initialize the modem:

// The modem init string is built with:
// &F = reset to factory settings
// E0 = set echo off
// S0=0 = turn off auto-answering
// S7=10 = wait X seconds for carrier prior to hang up
// S8=2 = set comma pause to 2 seconds
// S9=255 = set minimum time for carrier recognition to 255/10 of second
// S29=70 = set the flash modifier duration in units of 10ms
// X4 or X3 = wait/noWait for dial tone
// M0 = mute speaker
// M2Ln = speaker always on and volume level to n

dim initString as string = "AT&FE0S0=0S6=2S7=10S8=2S9=255S29=70"

if WaitDialTone then
initString = initString + "X4"
else
initString = initString + "X3"
end if

select case SoundVolume
case 0
initString = initString + "M0"
case 1
initString = initString + "M2L1"
case 2
initString = initString + "M2L2"
case 3
initString = initString + "M2L3"
end select

initString = initString + chr(13)

After the initialization, to dial a voice phone number here it’s the dial command:

// The modem dial string is built with:
// D = dial
// P = pulse or  T = tone
// ^ = disable/enable calling tone (this is a toggle)

dim dialString as string

dialString = "ATDT^" + numToDial + chr(13)

For caller id, it’s simpler. The only thing to pay attention is there are different commands for this, depending on the hardware. Below are the most common (if not all) variations of commands to enable caller id reporting.

// Initialization string depends from the modem brand/model
// and it's generally one of the following.
// Try them in order until you get an OK answer. ERROR answer means is not a valid command

dim cidStrings() as string

cidStrings.append "#CID="
cidStrings.append "+VCID="
cidStrings.append "%CCID="
cidStrings.append "#CC"
cidStrings.append "*ID"
cidStrings.append "+FCLASS=8;+VCID="
cidStrings.append "#CLS=8#CID="
cidStrings.append "+CLIP="

// enable Caller ID reporting
dim cidONCmd as string = "AT&FE1S0=0"+cidStrings(TheRightOne)+"1"+endofLine.Macintosh

// disable Caller ID reporting
dim cidONCmd as string = "AT&FE1S0=0"+cidStrings(TheRightOne)+"0"+endofLine.Macintosh

The above is the meat of the whole process. I hope this can be useful to some of you.

You Are AWESOME. Thanks so much for digging that out for me. I very much appreciate it. Now I have a direction to go in. I will definitely do my research to get it working correctly with my modem. Thanks.

On a side note, if your intention is to build something for you and you own a so called VOICE modem (that is a modem capable of streaming the voice via serial) you can do much more. In particular, all the voodoo I explained to use a data modem to dial a voice phone is not needed. Additionally, you might be able to initiate a phone call, stream the audio via the computer speaker and use the computer microphone as well to talk.

It is a USRobotics Model USR5637. The USRobotics website says it is a voice fax and data modem. So does this mean that I do not have to initialize the modem before dialing? I am building the software for the company I work for. It is going to be marketing software for use in Montana. It just needs to dial out and be able to use the computer speaker and microphone so a our marketing person can talk to the person on the other end over the computer.

If this is a voice modem, as I said, you can still use what I described above to simply dial the phone, but then you have to use the real phone to talk.
However, being a voice modem, you can use the official method described in the AT command set for this modem to dial a voice phone and stream the audio via the modem.
This will require you to capture the modem stream (in whatever format is), convert it and play through the computer speaker. Same for the opposite direction, that is capture the computer connected microphone input, encode in the format wanted by the modem and stream it over the phone line.
For the details about how to enable the voice mode, the audio encoding format and various settings, you have to follow the modem reference.

Still having a problem getting it to work. Started thinking that I shouldn’t be trying to reinvent a 20 year old wheel. Anybody know of a way to use a wifi dialer or google voice with the command line? Any suggestions would help. This modem has problems.