Commands

dial

Supported By

Syntax

dial number [with modem [command]]

Number and command yield strings.

Examples

dial steve -- steve is a variable containing a phone number
dial "555-1212"
dial "555-1212" with modem
dial "555-1212" with modem "ATS0=0S7=1DT"

Description

Without the with modem keyword, the dial command plays the dial tones for the given phone number. With some land-line telephones, you can hold the handset against your computer's speaker while the dial command is executing to dial the given phone number. The volume of the generated tones is controlled by the dialingVolume property.

With the with modem keyword, the dial command will dial the given phone number using a modem attached to a communications port. If no modem command is specified, the default is "ATDT". The communications port used is determined by the dialingPort property. There is a one-second delay between opening the communications port and issuing the command, and a delay between issuing the command and closing the port determined by the dialingTime property.

Notes

The dial command is synchronous: it will not return until it has finished dialing. (This is different from the play, speak, and tone commands, which are asynchronous.)

OpenXION will use RXTX (gnu.io package) or the Java Communications API (javax.comm package) to communicate with the modem, whichever is available. If neither package is available, dial will do nothing but set the result to an error message.

Security

To use the with modem keyword, OpenXION's security settings must allow the TELEPHONY security key. If the required security key is denied, a script error will be triggered.

See Also

dialingVolume, dialingTime, dialingPort, serialPorts