**************************************** **************************************** **************************************** ***
Easywave time: 2014.09.14
Category: Linux application-open source server opensips introduction statement: reprinted, please keep the link
NOTE: If any error occurs, please correct it. These are my Learning Log articles ......
**************************************** **************************************** **************************************** ***
I. Introduction to opensips
Opensips is a mature Open-Source SIP server. It not only provides basic sip proxy and SIP routing functions, but also provides some application-level functions. The structure of opensips is very flexible. Its Core routing function is fully implemented through scripts, and various routing policies can be flexibly customized. It can be flexibly applied to speech, video communication, Im, presence, and other applications. At the same time, opensips is currently one of the fastest sip servers and can be used for telecom-grade product construction. With its scalable and modular system architecture, opensips provides a highly flexible and user-configurable routing engine, it can provide powerful and efficient routing, authentication, Nat, gateway protocol conversion, and other functions for services such as voice, video, Im, and presence. Because of its stability and efficiency, opensips has been applied by many telecom operators in their own network systems. Its main functions are as follows:
- SIP registration server/Proxy Server (LCR, dynamic routing, dialplan)/Redirection Server
- SIP presence agent
- SIP b2bua
- Sip im Server
SIP to SMS/XMPP Gateway
- SIP to XMPP Gateway
- SIP Load Balancing
- Sip nat traversal
Ii. opensips open source Official Website
The opensips open-source official website is shown in:
Opensips open source web site: http://www.opensips.org/
Iii. opensips System Architecture
The opensips architecture is open and flexible, and its core function control can be implemented through script control. Each function is also built through module loading. Configuration File analyzer built using lex and YACC is an important part of its architecture design. Through this analyzer, opensips has designed its own syntax rules, so that we can adapt to the scripting in the configuration file in the SIP standard language, so as to simplify the program and facilitate code reading. At the same time, this design also makes the execution speed of the opensips. cfg configuration file reach the level of C language. Its architecture is roughly as follows:
The top layer of the opensips framework is the opensips used to implement the SIP message routing logic. CFG script configuration. In the configuration file, you can use the parameter and function provided by core or functions provided by many modules. For example, in the previous Server Load balancer example, is_method ("invite") is a function provided by the textops module. Both src_ip and src_port are parameters provided by core. The lower layer provides basic functions such as network transmission and SIP message parsing. On the left side, use the corresponding database adapter, but use multiple databases to access data. In this architecture, we can easily add the required functions by adding a function module without affecting the original system. In addition to the advantages of opensips described above, opensips also provides a series of interfaces for managing and maintaining commands. We can use the MI Management interfaces provided by core and module to conveniently monitor the system and module status. For example, you can obtain the status of the current process through the first-in-first-out ps command of the core. You can use the first-out get_statistics command of the core to obtain the current shared memory and the usage of private memory of each process. Through the MI Management Interface, we can also easily modify some parameters at runtime. For example, for the load_balancer module, we can use the FIFO lb_reload command to update the configuration information of the target group, you can use the FIFO lb_status command to activate or disable a target. These commands are very useful in practical applications.
We hope we can port the product to the arm to test whether the product can be made into a SIP server ......
Introduction to Open-Source SIP Server opensips