Foreword Because the development and update of computer network technology is faster than PBX, the price of equipment has fallen sharply. Establishing an Internet (or Intranet) -based IP telephone network to replace traditional telephone equipment systems has become the goal of enterprises.
LAN IP phone LAN IP phone uses unified network communication equipment and wiring to transmit voice and data. In a traditional PBX (private branch exchange) system, voice calls enter the office through a series of standard voice lines connected to the office PBX, that is, through a dedicated device to receive and channel voice traffic on standard telephone wiring. However, in a LAN telephone voice network, voice calls are received and channeled through an IP-based PBX, and this IP PBX is connected to an existing data network. IPPBX can be an independent solution, or it can be decomposed into several distributed devices. The specific functional block diagram is shown in Figure 1.
The main advantages of this IP phone:
? Easy to move and add terminal equipment;
? Support multimedia terminal;
? Conducive to the development of computer telephony integration technology;
Figure 1 LAN IP phone function module diagram
Figure 2 Block diagram of AT75C220
Figure 3 IP phone structure diagram
Hardware platform Generally, the basic design requirements of hardware are: high density, low power consumption and low cost. Many features of VoIP correspond to specific application requirements, such as: (1) system segmentation, including packet data packet collection and routing; (2) software performance that defines product functions; (3) network management capabilities that meet high availability.
LAN phone products work in pure IP mode, so after the phone is connected to the wide area network, it should be compatible in network management. The VoIP phone of this solution is a terminal product with the gateway moved down. It can be directly connected to the Ethernet without going through the gateway, and the relevant address information can be used after configuration. Its development is based on Atmel's AT75C220 development board. AT75C220 is a high-performance processor chip designed for various Internet applications. Its core component-ARM7TDMI microprocessor has a running capacity of 40MIPS, and the OakDSPCore coprocessor (voice processing chip in Figure 2) dedicated to voice processing can run up to 60MIPS. The exchange of information between the two uses an efficient dual-port mailbox mechanism. This determines that the AT75C220 can integrate the control functions of the general CPU and the information processing functions of the special CPU, which improves the integration of the system. At the same time, the operation instructions of the ARM processor are relatively simple, which reduces the complexity of development.
In addition to the standard serial interface for connecting to a computer and the RJ11 interface for connecting to a telephone handle, the AT75C220 development board also has two standard RJ45 Ethernet interfaces for connecting to a gatekeeper. The ARM7TDMI core processor controls the operation of the entire VoIP phone and provides a universal I / O interface for connecting a dial keypad, LCD display, and ringing circuit. The structural block diagram of AT75C220 is shown as in Fig. 2.
The AT75C220 development board is equipped with flash memory for storing application programs. The computer can use the super terminal program to communicate with the AT75C220 chip through the serial interface on the development board to realize the application program programming of flash and other software management functions. The PC for developing AT75C220 application software must be started to run the siap-mClinux operating system. After the application program development is completed, download the img file containing the application program and operating system kernel to the flash on the 220 development board through the tools provided by 220software set, and finally complete the system development.
The structure of a VoIP phone is shown in Figure 3. The user interface part is no different from a normal phone, and the display is used to display related information, such as the number dialed when the call is initiated, and the caller ID. In addition, a VoIP phone can be connected to a personal digital assistant (PDA) device through a serial port to implement functions such as software upgrades and automatic dialing. The function of the voice interface is to realize the conversion between the voice analog signal and the standard 64Kbit / s PCM signal. The network interface is responsible for the transmission and reception of voice packets and the exchange of various call signaling. The VoIP phone is connected to the gatekeeper on the LAN through the RJ45 plug.
Figure 4 H.323 call signaling process
Software implementation This implementation relies on the network protocol stack and real-time operating system (RTOS). Most application systems require RTOS to handle multiple processes and calls simultaneously. The RTOS used should have the following characteristics to meet the complexity of the communication protocol: the system core is small; the interrupt processing time is short; the continuous running time is long; the processing capability of multiple millisecond or microsecond timers. ARM-mClinux is a very good embedded real-time operating system, it provides a variety of functions for real-time system development, debugging, and operation, such as multi-tasking mechanism, kernel can be tailored, network functions, real memory management strategies, etc. At the same time, the Linux kernel source code is completely open, which is undoubtedly very beneficial to reduce development costs and improve the reuse of software development.
For the network protocol stack, this solution uses a standard H.323 protocol stack to interconnect with the public network. From the layered point of view of TCP / IP, H.323 is an application layer protocol family, which contains protocols suitable for various media communication and signaling control, and the established foundation is TCP or UDP protocol. According to the actual use requirements, the protocols discussed in this article are G.723.1 and G.711 in speech coding and H.225 and H.245 in call control signaling. Under the normal design capacity of the CPU, all the processes of the system will be blocked in their respective message queues, only the lowest IDLE process is running, and the total number of messages in the message queue is at a relatively low number level. Increasing the process may increase the common data area and internal information, and correspondingly introduce a complicated management mechanism.
Based on the above software requirements, the VoIP phone must be able to communicate with gateways and gatekeepers that comply with the H.323 standard, and realize the voice communication function between the VoIP phone and the VoIP phone and between the VoIP phone and the ordinary phone carried by the gateway. In addition, VoIP phones should also have certain recording and playback capabilities.
For IP phones, the main software implements the communication between the phone and the gatekeeper and the interworking between the phones. The call flow is shown in Figure 4.
The channel realization mechanism of the above process is TCP or UDP. After the IP phone successfully logs in to the gatekeeper, the connection process is completely similar to the connection between ordinary phones. After picking up the phone, it sends a "call request" (udp) to the gatekeeper, and the gatekeeper sends "Whether to run caller dialing" after receiving it. "(Tcp), if not allowed, prompt to hang up; if allowed, the caller starts dialing after receiving the dial tone, sends a" dial information "message (tcp) to the gatekeeper, and the gatekeeper sends" being "Call idle information" message (tcp), and then send back ringtones and ringing tones to the calling and called parties, respectively. After waiting for the called party to go off-hook, the called party sends a "called off-hook" message (udp) to the gatekeeper, the gatekeeper sends a "stop ringing" (tcp) to the called party, and the gatekeeper sends the called party to the called party. Machine â€message (tcp), enter the conversation (udp) state. The processing of speech involves the 220 speech processing module.
Messages sent by the gateway to the gatekeeper: Whether it is a login message sent by a high-level client to the gatekeeper, or a call processing message sent by an IP phone or switch to the gatekeeper, it will be placed in the message queue named mqRecvBottom first , And then sent to the following three queues according to the transmission method used by the message: signaling TCP transmission _mqSendTCP; signaling UDP transmission _mqSendUDP; voice transmission _mqSendData (can be forwarded through the gatekeeper, or directly in two Sent between gateways), and then sent out through the socket.
Solution of several key problems Pick-up and hook detection and dial number receiving
AT75C220 provides several user-defined universal I / O interfaces. Only through a certain hardware connection and software programming, you can achieve the detection of off-hook status and the reception of the number dialed by the user.
Ringing
There are bits in AT75C220 internal register specially indicating whether there is incoming call. The application software periodically detects this bit. Once an incoming call is found, it immediately sends a ringing indication signal through a general-purpose I / O port that is pre-programmed and determined. This signal can be used as an enable signal for the ringing circuit.
Voice processing module Voice processing functions are all controlled by ARM7TDMI controlled OakDSPCore.
During an IP call, the 64Kbit / s PCM digital voice signal sent from the analog front-end circuit is compressed and sent to the network interface module; at the same time, the compressed voice signal sent from the network interface module is decompressed to form a 64Kbit / s PCM digital voice The signal is sent to the analog front end.
Through flexible programming of OakDSPCore, VoIP phones can easily realize the recording and playback functions of voice messages.
When the user dials from the dial, the function of OakDSPCore's DTMF signal generator is started by programming, and the corresponding dual-tone multi-frequency signal is generated in the user's earpiece. If necessary, the DTMF signal can also be sent out after being compressed and encoded like a voice signal.
Voice compression and decompression use G.723.1 algorithm. In order to perform effective voice compression, many important factors must be considered. First, when all channels are working, you must ensure that there is no degradation in performance. The data packet must be configurable to ensure maximum flexibility. In addition, the G.723.1 algorithm used in this topic uses voice activation detection technology. VAD technology is the basis of adaptive gain control, which can further realize the bandwidth compression function and can be used together with adaptive noise generators. VAD technology enables the sending end to detect the gap between local utterances and not to send a complete voice frame during this period. Instead, a statically inserted description frame with fewer bits is included. This frame contains only the noise required by the decoder input. The parameters enable the receiving end to generate appropriate background noise accordingly, so that the call effect is close to the real conditions, and the coding rate is further reduced. The determination of the VAD threshold is a key factor for accurately judging voiced / silent. For example, continuous speech for a long time will increase the estimated value of the background noise, and the corresponding threshold, so that the speech of low amplitude that occurs next is not detected. One solution is to change the cut-off frequency of the low-pass filter when speech is detected, that is, to use different methods to estimate the noise energy when there is sound / no sound.
Voice quality Network delay and jitter are key factors affecting voice quality. Packaging is also an important factor that affects latency. The real-time performance of packaging and the efficiency of packaging are a contradiction. How much information is gathered and packaging is closely related to bandwidth must find an appropriate threshold. "Jitter" is a unique phenomenon of packet switching. The method to eliminate jitter is that the receiver uses a "jitter buffer" to make up for the unreliability of the packet network. This buffer can be a dynamic queue, and the receiver determines the network traffic status according to the RTP timestamp, thereby changing the size of the buffer in a timely manner. In specific implementation, a ring queue pointer table can be established to manage the occupied buffer area. For simple implementation, you can set a fixed number of arrays, and then identify several flags for management control. In addition, echo cancellation is also one of the important aspects. A good echo canceller must have a short convergence time and a small residual echo, reliably detect stress, and be able to handle background noise and narrow-band signals. In this project, the G.165 algorithm in DSP is used to eliminate the voice echo to the maximum extent.
Conclusion As an emerging communication terminal product, LAN IP phones have a lot of room for development. A variety of sample forms have appeared, but the general trend is: simple hardware, high integration, real-time software, good reliability, and It also needs to support multiple business types. The design scheme proposed in this article better grasps this trend. The device can not only maintain the operation process of the traditional phone for users, but also seamlessly connect with the wide area network, greatly reducing the communication cost, and has strong practicality.
Yuchai 76-200KW Diesel Generator
Yuchai 76-200Kw Diesel Generator,Yuchai 200Kw Generator,Yuchai Engine Generator,Diesel Generator With Yuchai Engine
Shanghai Kosta Electric Co., Ltd. , https://www.ksdgenerator.com