- Building Telephony Systems with OpenSIPS(Second Edition)
- Flavio E. Goncalves Bogdan-Andrei Iancu
- 630字
- 2021-08-20 10:43:13
The VoIP provider's big picture
This book was created using the VoIP provider as it is the most common use case. Before we start digging in the SIP proxy, it is important to understand all the components for a VoIP provider solution. A VoIP provider usually consists of several services. The services described here could be installed in a single server or multiple servers depending on the capacity requirements.
In this book, we will cover each one of these components, from left to right, in the chapters ahead. We will use the following picture in all the chapters in order to help you identify where you are:

The SIP proxy
The SIP proxy is the central component of our solution. It is responsible for registering the users and keeping the location database (maps IP to SIP addresses). The entire SIP routing and signaling is handled by the SIP proxy and it is also responsible for end-user services such as call forwarding, white/blacklist, speed dialing, and others. This component never handles the media (RTP packets); most media-related packets are routed directly from the user agent clients, servers, and PSTN gateways.
The user administration and provisioning portal
One important component is the user administration and provisioning portal. In the portal, the user can subscribe to the service and be capable of buying credits, changing passwords, and verifying his account. On the other hand, administrators should be able to remove users, change user credits, and grant and remove privileges. Provisioning is the process used to make it easier for administrators to provide automatic installation of user agents such as IP phones, analog telephony adapters, and SIP phones.
The PSTN gateway
To communicate to the PSTN, a PSTN gateway is usually required, except when you have a SIP trunk. The gateway will interface the PSTN using E1 or T1 trunks. To evaluate a good gateway, check the support of SIP extensions, such as RFC 3325 (Identity), RFC 3515 (REFER), RFC 3891 (Replaces), and RFC 3892 (Referred-by). These protocols will allow unattended transfers behind the SIP proxy; without them in the gateway, it might be impossible to transfer calls.
The media server
The SIP proxy never handles the media. Services such as Interactive Voice Response (IVR), voicemail, conference, or anything related to media should be implemented in a media server. There are many SIP servers fitting this purpose, such as Asterisk (FreeSWITCH (Yate (http://yate.ro/), SEMS from IPTEL, and SilkServer for AG projects. The examples in this book will use Asterisk as it is, by far, the most popular.
The media proxy or RTP proxy for NAT traversal
Any SIP provider will have to handle NAT traversal for their customers. The media proxy is an RTP bridge that helps the users behind symmetric firewalls to access the SIP provider. Without them, it won't be possible to service a large share of the user base. You can implement a universal NAT traversal technique using these components. The media proxy can help you in the accounting correction for unfinished SIP dialogs that, for some reason, didn't receive the BYE message.
Accounting and CDR generation
An Authentication, Authorization, and Accounting (AAA) server can be used along with OpenSIPS. FreeRADIUS is a common choice. In several implementations, you can skip RADIUS and use SQL accounting. Some VoIP providers will leverage an existing AAA server while some others will prefer the low overhead MySQL accounting. Beyond accounting, there is CDR generation where the duration of the calls is calculated.
Monitoring tools
Finally, we will need monitoring, troubleshooting, and testing tools to help debug any problems occurring in the SIP server. The first tool is the protocol analyzer and we will see how to use ngrep, Wireshark, and TShark. OpenSIPS has a module called SIP trace, which we will use as well.
- Learning Cython Programming(Second Edition)
- Learning ArcGIS Pro 2
- Learning ASP.NET Core 2.0
- Bootstrap Essentials
- Unity 5.x By Example
- 青少年信息學(xué)競(jìng)賽
- 一塊面包板玩轉(zhuǎn)Arduino編程
- Python語(yǔ)言科研繪圖與學(xué)術(shù)圖表繪制從入門(mén)到精通
- Python Machine Learning Blueprints:Intuitive data projects you can relate to
- 監(jiān)控的藝術(shù):云原生時(shí)代的監(jiān)控框架
- MongoDB Cookbook
- VMware vSphere Design Essentials
- Magento 2 Developer's Guide
- Python深度學(xué)習(xí)入門(mén):從零構(gòu)建CNN和RNN
- 多接入邊緣計(jì)算實(shí)戰(zhàn)