3

I have a USB GSM modem (HUAWEI E160). I got some software on a Windows laptop that lets me place phone calls and send texts via the modem, to regular phones. Is there any way to do something similar on UNIX/Linux?
What I'm trying to do is send NAGIOS alerts via phone. I've set up a script which creates an MP3 (Using text2wave and LAME) so all I need to do now is get it to send the audio file via a phone line, it doesn't have to do anything complicated other than;
Place the call
Wait for pick-up
Play the message
Hang up

EEAA
  • 108,414
  • 18
  • 172
  • 242
Smudge
  • 24,039
  • 15
  • 57
  • 76

3 Answers3

2

There is always Asterisk. the open source PBX, which I believe, will allow you to do this, however, it would typically require an analogue or digital telephone line and an interface card. It may be able to ineract with your GSM device, but it's not something I've ever looked into.

Bryan
  • 7,538
  • 15
  • 68
  • 92
1

Your best bet is to try and use AT commands; I happen to have one of the same devices (E160E) on my desk, but I've only ever used it as a data modem. Curiosly, lsusb reports it as

Bus 002 Device 006: ID 12d1:1003 Huawei Technologies Co., Ltd. E220 HSDPA Modem / E270 HSDPA/HSUPA Modem

Have a look at How to Use Modem AT Commands for USB Modem at Linux; with "ATi^M" I got

Manufacturer: huawei
Model: E160X
Revision: 11.608.05.00.432
IMEI: [redacted]
+GCAP: +CGSM,+DS,+ES

Some common AT commands are linked from the 3G modem wiki; for the rest you'll need to look at the 3GPP specs linked from the top of that page. I'm no expert (you might get better luck at e.g. Super User) but if you have a look through the basic AT command set you might be able to work out how to dial a number, send your data, and then hang up.

Andrew
  • 7,772
  • 3
  • 34
  • 43
0

You might find it easier to get it up and running using a phone with bluetooth and the chan_mobile module in Asterisk, the problem with using a USB connected GSM modem is getting the audio into it (placing data calls is easy)

You could also look at the 'Festival' system in Asterisk that does text-to-speech, rather than pre-record a load of MP3's it could read the alerts to you, not sure how well it'd get on pronouncing "SRVAX1B DOWN Ping No Response" but could be worth a shot.

Simon Hodgson
  • 681
  • 3
  • 8
  • 15
  • Pronunciation is amusing, it was worse with the default voice but I managed to find a reasonably good one – Smudge Jul 28 '11 at 14:51
  • Should probably have added to that, I achieved this eventually by using Twilio, it fitted in with what I was trying to do much better. I've even got it so I can acknowledge and scilence the alerts on my phone =) – Smudge Jul 28 '11 at 14:52