Programmatically dial a number of numbers on a modem?

At work, we just got a large number of exotic cellular devices that need to be programmed. To do this, you connect a standard home phone and dial a series of numbers with pauses between them.

For me, this is a task that requires automation, and we have one Linux desktop (Asterisk test machine) with a modem on it.

So how can I automate this task?

+4
source share
5 answers

Just send the necessary AT commands to your modem via the modem corresponding to the /dev device, for example. ATDT 12,456567,21

+2
source

I think you should be able to open the modem device (often associated with / dev / modem) and enter the modem codes into the reset modem (atz, possibly), then the codes for dialing (atd), then the number, with "," to pause .

You can automate this, perhaps in almost any language that allows you to write to a device file.

Take a look at the link here: http://www.zoltrix.com/support_html/modem/USEMODEM.HTM

+2
source

My typical dial string (everything is directed to the modem device):

  • ATZ (expensive modem, forget everything you knew)
  • ATS11 = 33 (I liked the speed dial)
  • ATF0 (Automatic negotiation of connection speed)
  • ATL3 (I like it loudly)
  • ATM3 (I like to hear a handshake loudly)
  • AT & G (x) (If you have a modem in the USA and need to use it in the rest of the world (guard tone))
  • AT & K3 (hw flow control; if not available, use software via AT & K4)
  • AT & R1 (CTS (transparent to send) is always on. RJ-11 bypass connections in static free softener sheets help with this.

Finally, and most importantly:

  • ATDT (number) (dial using DTMF) Depending on the age, your modem may support ATDP (pulse dialing).

Just keep in mind +++ is an escape sequence that returns you to the modem console :) Good luck. +++ ATH0 and you hung up. ATH1 removes it from the hook and does a bit more. ATA answers an incoming data call. Comma, - pause.

Yes, others are related to the Hayes AT command set, I actually used it for many years as SysOp BBS :)

Finally, Kermit screw, use Zmodem .

Links: Synchronet , WWiV , other exercises for the reader, although I humbly suggest looking for Renegade, Telegard, TaG and others.

Oh dear, I left the tangent.

+1
source

If you need to pause and respond to answers back from the device, this is exactly what expect was invented for

+1
source

Use the Hayes command set :

The following commands are understood by almost all modems that support the AT command set, whether old or new.

D dial

Dial the next number and then shake hands

  • P - Pulse dial
  • T - Touch Tone Dial
  • W - Wait for the second beep
  • R - Reverse response after dialing
  • @ - Wait up to 30 seconds for one or more callbacks
  • , - Pause for the time specified in register S8 (usually 2 seconds)
  • ; - Stay in command mode after dialing.
  • ! - Interception of the Flash switch (pull for half a second, as when transferring a call.)
  • L - Dial the last number

See Linux Modem-HOWTO for more details.

0
source

Source: https://habr.com/ru/post/1306035/


All Articles