Introduction
1. About the SIP protocol
Currently, there are three basic communication protocols based on VOIP: H 323, SIP, and MGCP. The following describes the comparison between the H 323 protocol and the SIP protocol.
H.323 was proposed by ITU. It attempts to regard IP phones as well-known traditional phones, but the transmission mode is changed from circuit switching to group switching, just like analog transmission to digital transmission, and coaxial cable transmission to optical fiber transmission.
At present, many countries, including China, adopt H.323 as the protocol between IP Phone Gateways. The whole IP phone system only uses the IP network as the transmission medium, A circuit switching system is used for user access, and the IP Telephone Gateway is used as the interface between the Circuit Switching Network and the IP network. At the same time, most telecom operators have also considered H.323 as the first choice for building a new generation of video conferencing systems, and transferred the traditional circuit-based H.320 video conferencing applications to IP-based H.323 systems. In terms of application scale, H.323 has become the dominant factor in VOIP and multimedia communication protocols in actual telecom operations.
SIP is called the Session Initiation Protocol ). SIP is a protocol proposed by the Internet Engineering Task Group IETF. It aims to replace some of the H.323 Protocols, mainly considering that in the next generation network NGN, IP Products and IP gateways will be widely used and integrated in the network, so that IP addresses can be used for end-to-end services; the pure IP-based SIP draws on HTTP and SMTP, which is simple in structure and scalable. In addition, SIP also provides excellent QoS support. For implementing VOIP and multimedia communication over an IP network, SIP has unique advantages in fully meeting the application requirements of NGN, and will certainly become an important solution for the Next Generation Network VOIP.
At present, there are more and more products that support SIP on the market, especially terminals. There are a variety of enterprise-level application solutions, such as SIP-based call centers and video conferences. Therefore, it can be said that SIP will become the main force of next-generation network protocols.
SIP is an application layer signaling control protocol used to create, modify, and terminate sessions of one or more participants. These sessions can be Internet multimedia meetings, IP phones, or multimedia distribution such as voice mailboxes ). Session participants can communicate with each other through multicast, unicast, or a mixture of the two. For more details about SIP, refer to related websites and books, such as sip forum.
2. Development of the SIP protocol stack
To achieve device interconnection and network interconnection, a corresponding application layer-based SIP protocol stack needs to be developed. Currently, open-source) SIP protocol stacks are commonly used in Vocal and OSIP. They are both mature and commercially available SIP protocol stacks with features listed in Table 1.
This design uses Libosip2 for program development. It is a gnu osip library. OSIP is well encapsulated and can complete function operations as long as the write point callback function is used. It is relatively simple and is compiled in C language and readable; the disadvantage is that there are many bugs and you need to pay attention to improvements during debugging.
|
Table 1 Comparison of Vocal and OSIP features |
3. Hardware Design of Voice Gateway
Currently, there are many IP voice terminals, including ARM + DSP solutions and SoCSystem on Chip Solutions. These solutions have their own characteristics. Here we use a network processor + DSP single-port gateway solution. The solution is described in detail below.
① UBICOM IP2022 network processor is used as the gateway's master chip. It is a 16-bit high-performance CPU with a execution speed of 120 MIPS. The chip has 64 KB Flash, 16 kb sram (program), and 4 kb sram (data) 10-bit ADC; The in-chip duplex communication module can use software to implement various common communication interfaces, and then use the relevant integrated development environment, A powerful embedded universal communication development platform with easy software development.
The IP2022 network processor can be used to support the communication physical layer, protocol stack, application of specific devices, and peripheral software modules of specific devices, users can use pre-created software modules and configuration tools to program and re-program them, so as to create a true single-chip network application solution for communication between various devices and between humans and machines.
IP2022 contains full-duplex serializer/disserializer SER/DES). It can be directly connected to various common network interfaces to implement 10 BaseT Ethernet MAC and PHY in the chip), USB, and other fast serial protocols.
IP2022 implements peripheral communication and control functions in the form of software modules, providing greater system design flexibility than traditional hardware. IP2022 also provides TCP/IP network protocol stacks and a series of additional software required for complete end-to-end connectivity solutions.
Because IP2022 contains two SER/DES components, it can be easily converted from one format to another, so it can also be used as a protocol converter. Most commands are executed in a single cycle. The throughput can meet the requirements of various new network connected applications, and the program flash memory can also provide online and offline re-programming, as shown in figure 1 of the specific structure of IP2022.
② The role of DSP in network speech products is irreplaceable. It mainly completes audio and video coding and decoding. Therefore, when selecting a DSP, we must consider meeting the current basic requirements, such as session functions and future needs, such as video requirements and Voice Email functions. The VP111 product of Voice Pump has the following features:
In-chip integration program and data storage;
Main processor interface;
Time division multiplexing string interface;
Sigmadelta A/D and D/A converters;
Multi-function input/output pins;
G.726 ADPCM Audio and Audio Encoding;
G.711 A/mlaw PCM Speech Encoding;
Voice detection (VAD );
Comfortable sound generation (CNG );
G.168 suppresses line echo;
Q.24 DTMF detection;
Fax/Modem detection;
Audio generation;
Anti-jitter buffer;
T.38 Fax relay.
③ The peripheral interface circuit uses Agere's L9214 as the user line interface (SLIC ). It is characterized by a small package with a lead Chip Carrier (MLCC. Compared with standard encapsulation, the space occupied by the circuit board is reduced by about 70%, reaching a very low power consumption level. Because the chip is small in size, it helps equipment manufacturers reduce total electronic costs, increase the flexibility of the design, and access the codecs of all manufacturers. In addition, the product's low power consumption also helps reduce the total cost of the device system and improve system performance. This chip supports a 3.3 V operating environment and does not require an additional 5 V power supply, thus saving additional costs.
|
Figure 1IP2022 Internal Structure Diagram |
In addition, CPC5610A is also used as the interface between standard telephones and communication devices and gateways. It is called the single-encapsulation DAA data access device first in the industry ), including the root-mean-square value of the isolation barrier rated in one chip ). This DAA also provides normal AC and DC telephone lines, two-to-four-line hybrid functions, on-board and off-hook detection, caller identification, half-wave ring detection circuit; this chip, suitable for set-top boxes and telephone applications, can replace transformers and a wide range of other discrete components to reduce board space and costs.
Figure 2 shows the gateway hardware.
|
Figure 2 gateway hardware Diagram |
4. Software Design of Voice Gateway
Voice Gateway provides the following functions:
Dialing, DTMF transmission, call creation, and call display;
The basic session after the call is established.
During the development of the IP network processor IP2022, the developer has provided a wealth of interfaces and Protocol modules for your reference, which greatly shortens the development cycle and time, allows you to focus on the required functions. These modules include:
① Source code compilation, debugging, and environment support for Windows98/ME/2000;
② IP Modules Configuration tool. Various communication interface functions are compiled to link different IP Modules;
③ GNUPRO compilation tool developed by Red hat, including C compiler, linker, loader. debugger, libraries and utilities;
④ Network Communication Development IP module;
⑤ IPOS-a real-time operating system running on IP2022;
⑥ IPEthernet -- Implement 10 BaseT MAC/PHY;
7. IP Stack: Implements TCP/IP stack, including TCP, UDP, IP, ICMP, ARP, DHCP, Client, and SLIP.
In terms of processing the SIP protocol, the function call provided by OSIP is used directly to implement basic functions of the SIP protocol, shielding the internal details of protocol processing.
The VP111 DSP processor directly uses the provided function library to implement DSP initialization and encoding/decoding algorithms. Speech Codec types include G.723.1, G.729, G.711a, and G.711u.
Conclusion
The gateway program compiled by Figure 3 has successfully registered with the SIP testing platform of the relevant manufacturer and can complete the basic session function. At the same time, in the LAN network, DHCP or static IP addresses are successfully registered and used for session operations.
|
Figure 3 flowchart of the basic session function of the Gateway Software |
Because we use the basic session function of open-source OSIP, the overall advantages of the gateway have not been realized. The original design idea of the gateway is to realize the basic session function, so as to achieve the minimum device size and the smallest device size. It turns out that this solution is feasible. If the commercial SIP protocol stack is used and the relevant storage devices are appropriately expanded, more internet applications such as instant messaging and voice and telephone functions such as conference, voice mail, and click dial-up functions can be fully implemented ).
Related Articles]
- Design and Implementation of an IP Telephone System Based on the SIP protocol
- Next-generation multimedia communication protocol SIP and Its Implementation
- VoIP call ID Display Technology in the SIP protocol