
Everyone loves to travel, for example, this time I managed to visit three capitals: Prague, Vienna, Budapest. But the post is not about that, but about the fact that during the week of travel I spent only 7 euros on a telephone. Without limiting yourself in conversations with loved ones, and even working. I spent a few minutes on the roaming setup before the trip.
A personal example is written instructions for building roaming with their own hands. In addition, under the cut you will find: the stages of a call in roaming, options for the implementation of each stage with your own hands, a description of roaming SIM-cards fully integrated with SIP and IP-PBX.
For ease of understanding and description, we divide roaming into 3 stages:
- Home network (take a call from friends and relatives and send to the network)
- International call (transfer call to travel country)
- Foreign network (take a call to your mobile phone in the country where you are now)

Now we will describe: how you can independently implement each of the three stages.
')
All native roaming options:
1. Home Network
Task : to get Internet calls to your home mobile
Solution options:
- Install GSM gateway. A very costly option, plus there may be issues with the settings and stability of its work (just turned off the light or the signal is weak), and mobile operators do not like this very much, even turning it off.
- Purchase a virtual number in your region and forward calls to it. Initially, the fastest, most reliable and cheapest option (in most countries you can buy a number from 120 rubles per month). CallerID of the caller is fully transmitted. Minus - you need to pay your “home” mobile operator a minute for forwarding. But this minus costs, it is enough to give your new number to everyone who calls you often.
- Perhaps your “home” mobile operator sends calls via SIP itself, but so far only MegaFon has seen a similar function. Such calls can be received on an external line of a virtual PBX (for example, a free PBX from Zadarma) and then you can do everything with them that is convenient.
2. International call.
Objective : to get the highest quality and cheap calls to the country (s) of the trip, but that it is connected to the home network.
Solution: any quality VoIP-operator will do. You can not be afraid of loss of quality due to VoIP, almost all mobile operators for roaming also use VoIP-joints. So the main thing is that the operator uses "quality" partners / suppliers, therefore we do not recommend choosing the cheapest services. For example, Zadarma uses for calls only premium quality connections, with proven major suppliers. It is convenient to use the services of the operator with which the interface with the home network is implemented, so as not to make unnecessary joints and not lose in quality.
3. Foreign is
Task : take and send a call in another country.
- Receive calls and make calls over the Internet. Under all popular mobile phones there are SIP-clients. Pros: the cheapest option (incoming free outgoing on VoIP-rates). Cons: rigidly tied to the territory with WiFi and its quality (not always the hotel Internet is enough for normal voice transmission). Last you can try to improve the "play" with the audio codecs.
- Buy a local SIM card and forward calls to it. Pros: you can usually get the Internet in a package inexpensive. Cons: you need to look for where to buy and understand the tariffs; The cost of time and money to buy in some countries can be substantial. Calls to the "home" country will usually be expensive.
- Roaming SIM-card Zadarma . Recently, the Zadarma project offered a SIM card tightly integrated with IP telephony. You simply choose to bind a card to any SIP number in the system or in a virtual PBX, and get IP telephony in your mobile (with all the functionality and prices of IP telephony). Pros: no need to spend money and time to buy a new SIM-card in each country; full integration with your account, virtual PBX, simplicity and ease of use. Cons: in some countries, local operators have cheaper Internet packages, but not always.
Building your roaming:
I describe in detail how I built my own version of roaming.
1. Home Network
The fastest and easiest way: to get a local number and forward calls to it from your mobile.
We do : go
to the site and purchase a number.
If you already have a SIP-linked phone number, you can dock it for free with VoIP through the “extra external line” feature of the free PBX. I have been using a virtual Moscow number for work for a long time, so I just took it with me.
2. International call.
To this end, we use for this the same operator as for paragraph 1, then nothing needs to be done. Just do not forget to forward calls from your mobile when going abroad (** 21 * + phone number associated with SIP # and click "call")
3. Foreign network.
Convenient to buy and set up a SIM card in advance. Zadarma SIM card can be ordered by mail, it will allow you to receive calls directly to your SIP login, and there you will also bind a virtual number from your home network.
We do :
- we order a card in your account
- activate, choose the same sip-login, which already has a number.

Everything! When traveling, just insert the SIM card into your phone!
By default, outgoing calls will go with the caller ID of the virtual number you have purchased, this is the convenience - you will be called back. If necessary, you can confirm your mobile number and call with his caller ID.
Additional functions:
PBX: You can also enable a free virtual PBX on the site and link a SIM card to it.
We get the functions of PBX, which can be useful in the trip:
- business hours - if you are in a different time zone, you can limit calls so that you will not be disturbed at inconvenient times;
- voice greeting and menu - full-fledged imitation of the office, employees' phones can be added to the call queue to receive calls when you do not pick up the phone;
- call recording, voice mail - always “remember” who called and why.
And much more.
A way to save even more:
For maximum savings, you can combine several methods of roaming:
- in order not to pay for forwarding your mobile, it is better to give all your friends / acquaintances a new virtual number for the duration of the trip, let them call on it (if you had a virtual number before - calls and so go to it)
- if the hotel has enough quality WiFi, you can install the SIP client in your android / ios phone, and enable conditional forwarding (and receive calls on the phone when you are connected to wifi), then you will need to pay for roaming only when you left the hotel and there is no wifi.

- if there is internet but not cheap / quality enough for calls (for example, mobile internet from the same SIM card for roaming), you can save on the outgoing connection. To do this, request a connection via a WAP link.
SIM card integration with external PBX / Asterisk / CRM
Since the travel SIM-card is attached to a regular SIP-login, it can be integrated as a regular SIP-account. For voice integration, simply connect your PBX to the server to any other SIP login. (Asterisk connection settings can be found
here ).
- for making incoming calls to the SIM-card - call the SIP-login to which it is attached (but note that when you make calls to the SIM-card on the network, we will not be able to transfer CallerID to it, because the server will not be able to trust you. Incoming CallerID will be transmitted when an incoming call to a virtual number sent to the same SIP).
- To call from your SIM card to your PBX in the same way: dial the SIP number to which the PBX is connected to in the system.
For integration with CRM, or call tracking, or any similar services, an
API is suitable. It is possible to receive both call statistics, incoming call notifications, and create outgoing calls. To order an outgoing call through the API, the / v1 / request / callback / method is suitable. In this case, the card will be considered payment for the incoming, and not for the outgoing connection (which is cheaper).
SMS notifications can be sent either via the built-in method / v1 / sms / send /, or through any external service to a free English number that is provided with a SIM card.
The article describes several options for building your own roaming, and everyone is free to decide how it will be more convenient and more profitable for him personally.