Wednesday, April 10, 2013

Raspberry Pi GSM gateway

If you travel a lot, you’ll be used to absurd roaming charges when you use your mobile phone. But sometimes your phone’s an absolute necessity – those of us at the Foundation can’t really go overseas for work or for holiday without paying those charges, because we need to be in touch with the office and with a lot of other people around the world who need to talk about things Pi. (And we like to be able to phone our mothers.)

Holger Leusch, Benjamin Reichel and Karina Hochstein have found themselves with a similar problem. Worse still, Holger travels to Cambodia a lot, and his German phone provider doesn’t even have a roaming agreement with any of the Cambodian telcos, so he’s not able to use his phone there at all. He found VoIP unusable in Cambodia, with patchy calls, lousy bandwidth, delays and dropouts. Like us, he needed to be in constant touch with his office.

Enter (you knew this was coming, didn’t you?) the Pi.

Many of those in Holger’s position would look into buying a SIP-based GSM gateway. GSM gateways are expensive things: Holger’s research found that a single GSM port (and you’ll need two, one at each end) was priced between €200 and €400. “For this to pay off, I would have to make a whole lot of phonecalls.” So he, Benjamin and Karina built their own, using a Pi running RasPBX; a Huawei dongle for 3G; a Chan dongle which works as an Asterisk channel driver; and a USB modeswitch. The whole kit came to €75.

Holger says:

Now when a caller in Europe calls my german GSM number, first my domestic Snom phone rings, then after 5 seconds, my Cambodian mobile phone gets called. As a sideffect, my Cambodian friends from now on can call and SMS my German phone back at local rates of a few cents…

The connection quality over the 10.000 km spanning 64 kbps Asterisk SIP trunk between both gateways actually is so amazing that none of the callers even noticed that I was out of the country at the time!

Please be aware that in some countries, telecoms law around GSM gateways is a bit fuzzy. In the UK, Ofcom says:

Ofcom has recently clarified that it is entirely legal under UK law for end-users (whether businesses or ordinary consumers) to buy, install and use GSM gateways for their own use. However it is currently illegal under UK law for anyone to use GSM gateway equipment to provide a communications service by way of business to another person or organisation, irrespective of where the gateway equipment is located, or how many or few end-users are connected to each gateway. This prohibition on 'commercial' use applies equally to the mobile network operators (MNOs) as to other organisations, since the MNOs' licences do not currently extend to the installation and use of GSM gateways.

Basically, you can build a gateway yourself in the UK – but woe betide you if you try to sell or lease one. The mobile network operators sometimes take this even further (for reasons which you might, when you consider all the lovely money that results from those roaming charges, think to be a bit…venal): for example, if Vodaphone suspects you’re using one of its sim cards in a GSM gateway it says it will disable the card. So be sure to research what the local rules are carefully before you implement something similar yourself.

You can read more about Holger, Benjamin and Karina’s setup at Carrier Connect Shout Out.

 

No comments:

Post a Comment