📜 ⬆️ ⬇️

SIP telephony for home - implementation, experience, chips

Hello.

In the comments to various topics on Habré, I often saw class questions “Why do you need SIP-telephony at home” and “How all this mess works”. Some topics on Habré have already been disclosed, but much remains in the shadows. Therefore, I decided to describe the scheme used by me for SIP devices and services, and to outline some plans for the future.

Just repeating the axiom that SIP is not only cheap long-distance calls through sipnet or other operators, I will not, and I will try in this topic to reveal the diversity of possible options for using SIP in everyday life.
')
Currently, as a platform, I use a great solution based on the CommuniGate Pro server from ITooLabs, partly already described on the habrre - habrahabr.ru/blogs/the_future_is_here/65461 .

I want to add that the capabilities of the platform are constantly increasing, for example, at present there is a test operation of the solution for the full integration of the platform with mobile telephony from one of Moscow operators, i.e. A mobile phone becomes a full-fledged SIP client with the ability to call from it to short internal numbers, display a full-fledged Caller ID when making calls to it via SIP URI or redirecting city calls, etc.

I cannot help but point out that earlier for the same purposes I had rather successfully used my own CGP server installed on a VPS hosting. And I used it in the free version (as far as I know, a fully functional Community Edition for 5 users is still free). In addition to installing CGP from a hoster, it can be put on a home server (there are versions for a huge number of Axes), or to rent it. Finally, you can replace it with any SIP server (Asterisk, OpenSER, 3CX, etc.). However, in the latter case, it will be necessary to fasten a lot of things to achieve the level of unification and convergence of communications (telephony, mail, voicemail, IM, etc.), which in CGP (of course, for money) is already out of the box.

So, in my case, the first "heart" of the whole implementation is the SIP server. What does he give:

1) First of all, this is my personal telephone PBX with incredible capabilities for managing voice (and not only) communications. Partial opportunities will be disclosed below.

2) That is the most notorious opportunity to make outgoing calls through the system at the lowest rates, combining the offers of different operators depending on the called direction.

For example:
- Outgoing calls to Moscow city numbers are automatically made through the following VoIP gateway. The cost of the call is completely free.

- Outgoing calls to city numbers of many large Russian cities go through the operator Evrofon (the brainchild of Euroset). Cost - 0.49 p. per minute.

- Outgoing calls to city numbers of other Russian cities, numbers of mobile operators and international calls are made through the PCTel operator. Cost - 1 p. per minute.

- Naturally, you can connect another hundred operators, for example, a Multiphone for calls to Megafon numbers in Russia, etc.

- Filelover for outgoing calls: if an operator is unavailable, the call will automatically be made through the next operator in the list. I recently encountered this in practice. The setting for calls through Europhone was off, and PCTel was the next highest gateway. For 2 weeks, I called another city, naively believing that Europhone was used with its 0.49 p. per minute, and was very surprised when the money ran out not on him, but on the PCTel account.

3) Ability to connect to the system (use as SIP clients) a huge number of devices - these are softphones, hardware SIP phones (landline, Wi-Fi, DECT), SIP gateways with a telephone connected to the FXO, and even a mobile phone in the case of a solution ITooLabs.

Here, for example, that I use or used as clients:

- Softphones X-Lite, SJPhone (laptop), Fring (Widows Mobile communicator), QIP Infium (desktop, laptop), Nokia softphone, built-in communicator, built-in CGP Flash client Pronto! or external flashphone.ru and many others.

- ITooLabs program (business communicator (softphone developed by ITooLabs specifically for the CGP server, taking into account typical business needs)

- VoIP Gateway Linksys SPA3000, connected to MGTS, to receive INCOMING calls from the city, and transfer them to SIP.

- The same VoIP gateway, but in another one, for receiving calls via SIP or making outgoing calls - regular or SIP, depending on the number dialed on the regular DECT telephone connected to it. A little later, talk about it a little more.

But I would also like to connect to the system:

- Stationary SIP phone.
- Combined SIP / DECT device class Siemens Gigaset C470IP / A580IP.
- SIP videophone.
- Softphone with a video camera on the home HTPC - multimedia computer (spoke about the dream about this below).

4) the ability to set up accounts for relatives in the system, and give them both phone numbers (well, this is standard) and mailboxes with other features, giving them, in particular, the ability to transparently use the above described tariffs for outgoing calls without thinking “a through which operator call cheaper here. ” Relatives can be connected either via softphones (the cheapest option) or through any piece of hardware described above - the Internet would be available.

5) it is natural to arrange conferences between different internal and external numbers, for example, to assemble yourself (on a softphone), a home number (via a gateway and a DECT device connected to it), relatives (on a softphone, SIP phone or landline telephone) to the conference, add city and long-distance numbers to the conversation, and at the same time only pay for a call to landline numbers going through external operators.

6) Configure the rules for processing calls in a single system. For example:

- all calls in the evening and on the weekend go both to my mobile and home VoIP gateway and softphone (where I’ll get closer, I'll take it there),
- calls from numbers included in a certain group can immediately go to the answering machine, without disturbing me.
- calls from subscribers included in other groups can go to all devices and softphones at once.

7) Ability to transfer calls within the platform, and not only. For example, taking a call to a softphone, I can transfer it to my home number or mobile.

8) And so on. You just need to include fantasy, because the options arise mass. I can then send here again to the review of the ITooLabs solution on the habre, there many buns are also described.

In addition to the first "heart", my implementation has a second one - my favorite VoIP gateway Linksys SPA3000.

This gateway, Linksys SPA3000, previously, before the purchase of the company Sipura Linksys, was called Sipura SPA3000. Then it was discontinued, but is still being sold on EBay for ridiculous money. I bought mine there for about 40 bucks. A newer version is now being sold, the Linksys SPA3102. It is identical to the telephone part of the SPA3000, but besides the LAN port it has a built-in WAN port and can act as a router. However, discussions on the forum show that the power of the gateway’s router is small, and with a large load it begins to reboot. That is why the gateway is better to connect to another router as a client, and then everything works great.

The SPA3000 (followed by 3102) is not without reason called the “Swiss knife” - it has an incredible amount of settings, and is essentially a professional device, often used for business purposes. However, this is associated with some difficulty in setting it up, which for beginners is not always able to do. Various settings combined in hundreds of options may not be obvious even after reading the documentation, and often you have to resort to the help of forums (of which, by the way, there are also very many).

What features does the gateway give me personally?

- to make free calls to Moscow city numbers via the Internet, from anywhere in the world.

- acting as a small SIP operator, provide this gateway as a free call to Moscow for my family and friends, including from other cities (and maybe in the future and countries).

- receive incoming calls to a direct Moscow city number, physically being at the same time anywhere, and not paying any subscription fee to the SIP provider (well, except for the usual monthly tribute to MGTS).

- assign this direct number to any SIP device in your network or group of subscribers.

- call your city number, enter your PIN and enter the voice mail system, listen to the messages on the answering machine.

- call your city number, enter a PIN and make an outgoing call at long distance at IP-telephony rates, either directly via SIP (to the internal numbers of my PBX, or to any SIP address of the format ivanov@sipnet.ru) - the latter, of course, completely is free.

- get a correctly identified caller's number (Caller ID, if the city PBX is supported), which can then be sent to the SIP server in the same way, and then almost to any SIP clients. That is, the caller's number is displayed correctly.

So far, I have such a gateway only at home in Moscow. Now he simply transfers all calls to my home number to the system, and I can pick up the phone even on the mobile, at least on the softon, at least on the home DECT device. The caller's number, I recall, is determined and transmitted, incl. can be processed by the rules described above (send to voice mail, transfer to a specific internal number, etc.)

If you change the scheme a little, the caller on the landline may be asked to choose several options: “Good afternoon. To call Dmitry, press 1, to call Ekaterina, press 2. If you have a PIN code to enter the system, please enter it. To leave a message, just stay on line). Those. You can implement the simplest (and not only) IVR.

If you take another such gateway (do not buy it, just everything, please!), And put it in another city or country, then you can get free outgoing calls to these cities and countries in exactly the same way. If you add their numbers to the system (as I have got my Moscow number), then any person who called him can also listen to the IVR message, enter the PIN for the call at my telephony rates - and not pay for the long-distance call of his GTS.

If my office used an analog telephone, not a digital one, I would definitely connect such a gateway to it, having received the opportunity to receive calls to my work extension number on the platform (and therefore at home, to mobile, to voice mail), subjecting their tight filtering by the rules. Call the boss immediately to voysmail (there should be a smiley). In this case, it is convenient and almost free to receive work calls in any roaming, where there is Wi-Fi or other Internet. Also in this case it would be possible to call from any of your SIP clients to the internal numbers of the company, call offices in other cities and countries at the expense of the employer ... Where are my seventeen years old ...

Another important element of the implementation are external numbers (DID):

- As you have already guessed, one of such numbers I have is a free Moscow direct number from MGTS, on which there is a VoIP gateway.

- I can take calls from America to my direct +1 575 322xxxx number in Google Voice. The scheme is as follows: Google Voice -> Gizmo5 -> my SIP address. The Americans who dialed it (usually by mistake) get into the system and can be redirected to any of the internal numbers (as long as this is my mobile, but IVR options are also possible).

- You can also connect incoming numbers in other countries (UK, etc.), both paid and free (usually with an extension). While irrelevant.

- If I do not want to give anyone my direct home number, I use a COMTUBE number with an extension (it’s good that the caller’s number is also correctly transmitted to the system).

Here in some topic they asked how to integrate SIP with Skype. On the one hand, the protocols are completely different, but there are already implementations of Skype for SIP, incl. enterprise level. I use a very simple solution - I use Skype + SIP gateway from SIPNET. In particular, any Skype user can call me by simply calling skype.sipnet.ru and entering my personal 7-digit number in SIPNET with an extension dial. This call will automatically go to my mobile (well, or wherever I want to send it).

Similarly, any SIP network subscriber can call any Skype user in skypename@skype.sipnet.ru as a normal SIP URI, and call me on Skype. I can call someone on Skype from any SIP client in the same way.

If you add something like Asterisk with its huge customization capabilities to the system, you can integrate the telephone system with the smart home management service. Here is the first thing that comes to mind:

- the intercom at the door comes by calling the right SIP-clients, incl. with video from the camera

- open the door by dialing a PIN code, etc.

- we call to a certain internal number to listen to the sound in another room,

- we call the number to view the image from the IP camera, etc.

Yes, I promised to tell you about a softphone on a multimedia computer with a video camera ... I mean this:

- I sit, suppose, on a sofa, and I watch a movie on a plasma.

- At this point, someone impatient to call me.

- The call is displayed on the plasma screen, and the film pauses.

- On the plasma, you can see the number of the caller, his name from a single phone book and a photo, if any.

- Next, I select from the remotes, reject the call (then it will go to voice mail), accept the sound or accept it from the video.

- If we accept the sound, then calmly talk through the microphone and speakers of the audio system.

- If we receive sound from video, then besides the conversation, we also see each other with the interlocutor.

Say fiction? I saw similar addons for Asterisk bundles with Windows Media Player. I think, and under Linux there are already similar solutions. Will seek.

Another nice trick: I really like to dial a given short number on any SIP-device, and listen to news from Ekho Moskvy or RSN. These are also SIP services open to everyone (not only their users) from SIPNET. It's a pity that few resources are available in this way.

Again, the possibilities of the sea. Every day new ideas come to my mind. Among the plans, as I already wrote, connecting several SIP devices, perhaps installing a gateway in my hometown, and much more. It is worth noting that I do not use all this for business purposes, otherwise many of the chips would become even more relevant and in demand than they are now.

It is not without reason that SIP was taken as the basis for one of the concepts of communication networks of the future generation - behind it both the future and the present.

I deliberately omit the description of the capabilities of the ITooLabs platform (well, or CGP to a lesser extent) in terms of unified communications - since it was originally created as a very powerful mail server, then received at least a functional telephone and IM part. Chips such as a message via SIP / SIMPLE or XMPP / Jabber about a new letter or voice mail message (which is also an ordinary letter), receiving and making calls from a Flash client, unified contact lists for mail, IM and telephony with single processing rules, and much more, are very helpful to live. But this is a topic for a separate topic.

I apologize if the material is not structured and not designed to the necessary extent - I am lying at home with the temperature. For the same reason, there are no pictures.

I will be glad to answer questions.

Source: https://habr.com/ru/post/95657/


All Articles