I was tired of walking with several phones to receive calls for work, therefore I wanted to resume the idea of creating my own PBX office based on FreePBX with a gsm gateway based on Huawei 1550 usb modems. Since its creation is not the primary task, then it’s decided independently, in free time and as much as possible free of charge.
This is not the first attempt to make a budget PBX. Once we set up a PBX with HUAWEI modems based on a Raspberry microcomputer. However, she behaved extremely unstable, the modems constantly “fell off” and had to be abandoned.
This article is not a complete guide, but rather a knowledge base and links, since I went through a hundred of them in search of a really working solution. But on the other hand, you can just walk the handle on this thorny path with me (well, almost simply – unfortunately, it just won’t be accurate).
I’ll say right away that I’m not a programmer (well, I dabbled about twenty years ago, now I’m not really going to write two lines of code even on BASIC), I only saw Linux a couple of times from the graphical shell. But since I eventually mastered the task by 80 percent on my own (in the last stage, I still called for the help of a freelancer), I hope that the way I have traveled will inspire you to great deeds.
Why do we need our own PBX.
So the goal looks something like this:
PBX, based on FreePBX free software, has on board several HUAWEI 1550 USB modems with SIM cards from different operators, it is connected to a virtualАТС Zadarma, which will allow cheap calls abroad + to receive calls from virtual numbers (for example, our phone numbers in other countries). Also in the office there is a couple of fixed VoIP telephones, which will be used to receive calls in the office.
All incoming calls will follow a certain logic, allowing me not to carry several phones with me. And if necessary, I want to be able to quickly change the routing.
What is needed from iron.
I already had a basic iron set: The old Celeron-1.8 in a mini case lay in the closet, 3 HUAWEI E1550 modems that were already unlocked (unlocked independently according to instructions from Ineta), two old-fashioned telephone telephone Linkssys SPA922 and YeaLink T22P. There is also a long-used account in the service.
Zadarma (it is used for international calls practically free of charge (for example, the USA and Canada have a zero tariff for me) and the purchase of virtual numbers in the country of the world I need).
Call routing logic.
In advance, write down on paper the scheme according to which incoming and outgoing calls will be configured. Draw all the points of contact between your PBX and the outside world – landline phones, soft backgrounds, mobile and virtual numbers. Now try to connect it into a single system 🙂
Let it be primitive for the time being – in the future you will be able to complicate everything and increase it.
Incoming Call Routing Logic:
If we are called to a virtual number behind the cordon, then this call is transmitted through Zadarma to the PBX and we can pick up the phone in the office. If you call one of the SIM cards – the same. If no one picks up the office phone (either busy or the phone is disconnected), then the call is forwarded to the director’s or manager’s mobile phone (via a backup SIM card).
Outgoing call routing logic:
Calls from the office are sent through the desired SIM card to the PBX, depending on the phone number, calls to the cordon are forwarded and left through the virtual PBX Zadarma.
In consequence, this system can be complicated, but for a start it will come down.
Choice of software for office PBX.
I went through a few solutions. But most decisions require either money at once, or money afterwards, or are difficult to master. Since I don’t have knowledge of configuring Linux, it was decided to use a pre-installed FreePBX installation, which allows getting a ready-to-configure system from a boot disk.
Install FreePBX for newbies.
Go to the official website of FreePBX in the section Downloads, I downloaded the ISO-image 10.33.66 version for 32-bit systems and wrote it on a USB flash drive. However, the first installation ended in failure – on the screen was only a Linux console (without an installed FreePbx system). I tried to reinstall the system three more times – the result is the same. Googling on the English-speaking forums helped, it turns out that the ISO image of FreePbx cannot be installed from a USB flash drive – only from a DVD-ROM (later they told me that it depends a lot on your hardware). I had to buy a disc and attach an external DVD-rom. In this way the installation was a success.
Since I myself (without googling) do not know the knowledge of configuration and installation – I will provide a link (one of many that I went through) that really helped: Setting up freepbx 13 from scratch
So you have to suffer until you see this on the screen:
Now boldly on the second computer, drive in your server’s IP address and proceed to setup.
Configure and connect VoIP phones to FreePBX.
After setting up freepbx, I rushed to set up two available office phones. Actual according to the instructions:
Configure internal numbers
I connected two SIP phones – LinkSys SPA922 and Yelling SIP-T22P. The second one connected without any problems with a half-kick, but with an old LinkSys SPA922 it took about three hours – I didn’t want to connect to the PBX via the local network. The problem was simple – in the settings after the ip-address of the PBX it was necessary to register the port address through a colon! (I never guessed, I would have thought of it by chance).
The second problem was that as soon as I happily tied the telephone sets to the PBX, when I tried to test the call from the unit to the unit, there was no sound (no voice was heard in two directions). The solution was found after two hours of googling – it was necessary to forward a port range of 10,000-20000 via UDP in the settings of the router. So before, I checked that the same audio codecs were configured everywhere and that NAT was turned on.
Preparation and connection of Huawei modems to FreePBX 13
To prepare purchased (and preferably already unlocked for several operators) modems for work, you can follow this instruction http://pbx.gal.cv.ua/speedy-gsm/huawei
Of all the manuals for modem hooking to PBX on FreePbx – this was the working option http://pbx.gal.cv.ua/chan-dongle
Installing modems as gateways actually proved to be an extremely difficult task for someone unfamiliar with Linux. As each manual is replete with a set of console commands (not a graphical shell). I suffered for a long time (despite the fact that I once knew DOS and the console is not disgusting to me).
Before you just a black screen with a flashing cursor, and the manual tells you – now just download the driver here, unzip it and copy such and such a file into such a folder …. What ?? What to do something ?! How to download, how to copy? A person accustomed to copying and downloading mouse clicks like this can lead to panic.
The installation of a file manager like the old one has made life much easier. Midnight Commander http://rus-
linux.net/MyLDP/consol/midnight-commander.html – with its help, I was able to copy files from folder to folder and edit what I needed. But Midnight
Commander will help you only if you are familiar with at least some file managers like Far or Volcov Commander (yes, hello from the 90s).
Now the fun thing: you need to connect and configure external modems with SIM cards, register routing and do security settings (in the LOGS, I noticed that someone with external aypishnikov already started to break on my PBX).
Zadarma was added as another trunk in the settings. Now, if they call me one of the numbers purchased in Zadarma — I take calls on the office phone and vice versa — if I start dialing a foreign number on the office phone — then the call goes through the Zadarma trunk.
The issue of security settings is lit. here. However, in this issue (especially in it), I recommend connecting a consultant. If you are not going to connect to the PBX from external IPs – then close port 5060 – this will significantly reduce the risks.
I must say that at the second stage (setting up routes) I needed to connect an IP telephony specialist, by this moment my brain began to get bogged down (I’ve been picking it all from scratch for several days in a row), although many may think that the settings in the console Linux is more complicated than beautiful freepbx menus 🙂
I note that a VoIP specialist was found by me on freelance, within a couple of hours. Since 2/3 of my work was done on my own, the cost of finishing my work was only 20 USD. In the case of an initial full setup by a specialist, the amount would be different, of course.
The advantage of self-installation and configuration is that I can now independently resolve minor technical problems in case of anything.
In the photo – the result is just a body with protruding modems. Cases with modems had to be removed, since they did not want to climb into USB next to each other. I note that there are antennas on the cases, so if the signal in your area is weak, I recommend not to do this.
The plans – to place it unnoticed on the side wall of the table, next to the switch, so as not to have anore my eyes. Fortunately, neither the keyboard, nor the monitor, nor the mouse are needed here, because the setting is always done remotely.
The first thing to understand is that this type of call-taking automation using Huawei modems is certainly budget and difficult to call it reliable. It will suit you if you have a small number of calls. If they call you all the time, you should think about buying a normal GSM gateway or virtual numbers from your service provider.
The second is that during the first days of operation you will understand what is missing in your system. For example, I immediately wanted to make a normal voice greeting, music instead of waiting beeps, and so on .. The system can and should be improved 🙂
Third, you need to think about monitoring the performance of your lines and modems. There may be a hang and as a result – your customers will not call you. It is necessary to study this moment in more detail.
Update approximately in a month of work of automatic telephone exchange on GSM modems:
- You should carefully study the service conditions of your mobile operator – as some do not allow them to simply use their SIM cards in additional equipment and block them (for example, Life-cell is just a beast – they blocked the card without unlock rights)
- For GSM modems, you need either a high-quality motherboard (with normal USB voltage) or a high-quality USB hub with external power. Otherwise, modems may periodically “fall off” and behave unstably.
- Remember that GSM modems are a budget option, a normal GSM gateway is certainly better.
I wish you more calls from customers and applications on your sites!