4

I won't know for certain until I've implemented it, but I've marked ppumkin's answer as The Answer.

I will have a Huawei 3G (or GSM) dongle attached to my raspberry pi. I haven't purchased it yet, since the model may be determined by the answer to this question.

I would like my raspberry pi to be able to receive a phone call through the dongle, using a headset to allow the user to hold a conversation. It has no need to initiate the phone call.

Basically I'd like my raspberry pi to act as a voice-only phone. Any help would be greatly appreciated.

This project uses Python on Raspbian Wheezy.

One more note: I'd rather not use a full PBX system like Asterisk because this functionality forms only part of the overall system.

EDIT: To narrow the question, I'm concerned mainly with the communication between the dongle and my python program. I expect that playing sounds and capturing microphone input is widely documented. To be more specific: If a call is made to the GSM dongle attached to my pi, how do I get a python script to answer the call?

EDIT 2: This list of dongles that can be used with Asterisk leads me to believe that it is possible (thanks ppumkin)

A little background on the project
I will be putting one piece of equipment each in a series of rural classroooms in Southern Africa (to start with). The kit will consist of a projector, an Rpi, and a GSM dongle. The purpose of the kit is to allow teachers anywhere in the world to hold remote lessons with students there who would not otherwise have access to education. Since the kit will have to be built through donations, the price of the components is crucial.

The teachers will have 2-way voice communication and 1-way blackboard. The blackboard will be controlled via SMS, but the voice communication needs to be done over GSM voice. The geographic locations that I'm looking at will have GSM coverage but, if anything at all, they will have at most 2G data coverage.

All communication over GSM will come from a server which will be hosted in the same country as the classrooms and the link between that server and the teachers will be over TCP/IP.

neuro
  • 173
  • 1
  • 2
  • 8

1 Answers1

5

For the default use of them that is not possible with GPRS/EDGE/3G/HSDPA/4G dongles. They are designed for data only.

But as pointed out by the OP there does seem to some development for Huawei dongles. What it requires though:

  1. Check if the dongle supports voice. Some microchips have the audio processor built in with everything else but the firmware disables it usage.
  2. Flash the dongle with a custom firmware that will enable the audio hardware and API

Loading custom firmware might brick (render the device useless) so take extreme care before trying anything like this.

It is the flashing of custom firmware that will unlock the GSM API and the use of a experimental Asterisk channel provider chan_dongle.

It all seems experimental at the moment, however looking at the site people manage to set up 48 GSM channels using Asterisk! Pretty impressive...

I suspect Asterisk does all the encoding and decoding of audio and passes the data to the custom firmware which allows you to make a normal phone call.

The alternatives

  1. What you can do though is run Asterisk on the Pi and connect to VoiP servers.But there is no microphone the Pi and USB Audio devices seem to cause allot of problems with recording audio.
  2. Just buy a cheap mobile phone if you need to make phone calls.
  3. You can buy a hardware GSM gateway. You put sim cards in there and the hardware does all the work. You just use Asterisk to connect to it like a VoiP connection.
Piotr Kula
  • 17,336
  • 6
  • 66
  • 105