As computer network technology develops and updates faster than PBX, and equipment prices have dropped significantly, establishing an Internet (or Intranet)-based IP telephone network to replace traditional telephone equipment systems has become a goal for enterprises.
LAN IP Phone
LAN IP Phone uses unified network communication equipment and wiring to transmit voice and data. In the 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, voice traffic is received and channeled on standard telephone wiring through a dedicated device. However, in the LAN telephone voice network, voice calls are received and channeled through an IP-based PBX, which is connected to the existing data network. IPPBX can be an independent solution or it can be decomposed into several decentralized devices. The specific functional block diagram is shown in Figure 1.
The main advantages of this IP phone:
· It can easily move and add terminal equipment;
· Support multimedia terminals;
· It is conducive to the development of computer telephone integration technology;
Figure 1 LAN IP Phone Functional Module Diagram
Figure 2 AT75C220 block diagram
Figure 3 IP phone architecture
Hardware platform
The basic design requirements of hardware are usually: high density, low power consumption and low cost. Many of the performance of VoIP corresponds to specific application requirements, such as: (1) system segmentation, including packet aggregation and routing; (2) software performance that defines product functions; (3) network management capabilities that meet high availability. LAN
telephone products work in pure IP mode, so after the phone is connected to the wide area network, it should be compatible with network management. The VoIP phone in this solution is a gateway-down terminal product. This device can be directly connected to the Ethernet without going through a gateway and can be used after configuring the relevant address information. It is developed based on Atmel's AT75C220 development board. AT75C220 is a high-performance processor chip designed for various Internet applications. Its core component, the ARM7TDMI microprocessor, has an operating capacity of 40MIPS, and the OakDSPCore coprocessor (the voice processing chip in Figure 2) specifically used for voice processing has an operating capacity of up to 60MIPS. The information exchange between the two uses an efficient dual-port mailbox mechanism. This determines that AT75C220 can integrate the control function of general-purpose CPU and the information processing function of special-purpose CPU, improve the integration of the system, and at the same time, the operation instructions of ARM processor are relatively simple, which reduces the complexity of development.
In addition to the standard serial interface for connecting to the computer and the RJ11 interface for connecting to the phone handle, the AT75C220 development board also has two standard RJ45 Ethernet interfaces for connecting to the gatekeeper. The ARM7TDMI core processor controls the operation of the entire VoIP phone and provides a general I/O interface for connecting the dial keyboard, LCD display and ringing circuit. The block diagram of the AT75C220 is shown in Figure 2.
The AT75C220 development board is equipped with flash memory (flash) for storing application programs. The computer can use the hyperterminal program to interact with the AT75C220 chip through the serial interface on the development board to realize the application programming of the flash and other software management functions. The PC for developing AT75C220 application software must start and run the siap-mClinux operating system. After the application is developed, the img file containing the application and the operating system kernel is downloaded to the flash on the 220 development board through the tools provided by the 220software set, and the system development is finally completed.
The structure of the VoIP phone is shown in Figure 3. Its user interface is the same as that of an ordinary phone. The display is used to display relevant information, such as the number dialed when initiating a call, caller ID, etc. In addition, the VoIP phone can be connected to a personal digital assistant (PDA) device through a serial port to achieve functions such as software upgrades and automatic dialing. The function of the voice interface is to realize the mutual conversion between voice analog signals and standard 64Kbit/s PCM signals. The network interface is responsible for the sending and receiving of voice packets and the exchange of various call signaling. The VoIP phone is connected to the gatekeeper on the local area network through an RJ45 plug.
Software Implementation
This implementation relies on a network protocol stack and a real-time operating system (RTOS). Most application systems require an RTOS to handle multiple processes and calls simultaneously. The RTOS used should have the following characteristics to meet the complexity of the communication protocol: small system kernel; short interrupt processing time; long continuous running time; and 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 scalability, network functions, real memory management strategy, etc. At the same time, the kernel source code of Linux is completely open, which is undoubtedly very beneficial to reducing development costs and improving the reuse of software development.
For the network protocol stack, this solution uses the standard H.323 protocol stack to interconnect with the public network. From the perspective of TCP/IP layering, H.323 is an application layer protocol family that includes protocols suitable for various media communications and signaling control, and is based on TCP or UDP protocols. According to the actual use requirements, the protocols discussed in this article include G.723.1, G.711, etc. in voice coding and H.225 and H.245 in call control signaling. Under the normal design capacity of the CPU, all processes in the system will be blocked in their respective message queues, and only the lowest IDLE process is in the running state, and the total number of messages in the message queue is at a relatively low level. Adding processes may increase the shared data area and internal messages, and correspondingly introduce complex management mechanisms. Based on the above software requirements, the VoIP phone should be able to communicate with the gateway and gatekeeper that conform to the H.323 standard, and realize the voice communication function between VoIP phones and VoIP phones and between VoIP phones and ordinary phones carried by the gateway. In addition, the VoIP phone should also have certain recording and playback capabilities.
For IP phones, the main software realizes the communication between the phone and the gatekeeper and the communication between phones. The call flow is shown in Figure 4.
The channel implementation mechanism of the above process is TCP or UDP. After the IP phone successfully logs in to the gatekeeper, its 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. After receiving it, the gatekeeper sends "whether to run the calling party dialing" (tcp). If it is not allowed, it prompts to hang up; if it is allowed, the caller starts dialing after receiving the dial tone, sends a "dial information" message (tcp) to the gatekeeper, and the gatekeeper sends a "called party idle information" message (tcp) to the caller, and then sends a ringing tone and a ringing tone to the caller and the called party respectively. After waiting for the called party to pick up the phone, the called party sends a "called party picks up the phone" message (udp) to the gatekeeper, and the gatekeeper sends a "stop ringing" (tcp) message to the called party. The gatekeeper sends a "called party picks up the phone" message (tcp) to the calling party, and enters the call (udp) state. The processing of voice involves the 220 voice processing module.
Messages sent by the gateway to the gatekeeper: Whether it is a login message sent by the high-level user end to the gatekeeper, or a call processing message sent by the IP phone or switch side to the gatekeeper, it will first be placed in a message queue named mqRecvBottom, and then sent to the following three queues according to the transmission method used by the message: TCP transmission of signaling_mqSendTCP; UDP transmission of signaling_mqSendUDP; voice transmission_mqSendData (can be forwarded by the gatekeeper or sent directly between two gateways), and then sent out through the socket.
Solution to several key issues
Pickup and hangup detection and dial number reception
AT75C220 provides several user-defined general I/O interfaces. Only through certain hardware connections and software programming, the detection of the on-hook and off-hook status and the reception of the user's dialed number can be realized.
Incoming call ringing
There is a bit in the internal register of AT75C220 that specifically indicates whether there is an incoming call. The application software periodically detects this bit. Once an incoming call is found, a ringing indication signal is immediately sent through a pre-programmed general I/O port. This signal can be used as an enable signal for the ringing circuit.
Voice processing module The
voice processing functions are all completed by ARM7TDMI controlling OakDSPCore.
When making an IP call, the 64Kbit/s PCM digital voice signal sent by the analog front-end circuit is compressed and sent to the network interface module; at the same time, the compressed voice signal sent by the network interface module is decompressed to form a 64Kbit/s PCM digital voice signal and sent to the analog front end.
Through the flexible programming of OakDSPCore, the VoIP phone can easily realize the recording and playback functions of voice messages.
When the user dials from the number dial, the DTMF signal generator function of OakDSPCore is started through programming to generate the corresponding dual-tone multi-frequency signal in the user's handset. If necessary, the DTMF signal can also be sent out after compression and encoding like a voice signal.
Voice compression and decompression adopt the G.723.1 algorithm. In order to perform effective speech compression, many important factors must be considered. First, when all channels are working, it must be ensured that there is no performance degradation. The data packet must be configurable to ensure maximum flexibility. In addition, the G.723.1 algorithm used in this project adopts voice activation detection technology. VAD technology is the basis of adaptive gain control, which can further realize bandwidth compression function and can be used together with adaptive noise generator. VAD technology enables the transmitter to detect the gap of local voice and no longer send complete voice frames during this period. Instead, it replaces it with a static insertion description frame with less bits. This frame only contains the parameters required to generate noise at the decoder input, so that the receiver can generate appropriate background noise based on this, so that the call effect is close to the real conditions and further reduce the coding rate. The determination of the VAD threshold value is a key factor in accurately judging voice/silence. For example, long-term continuous speech will increase the estimated value of background noise and the corresponding threshold, so that the low-amplitude speech that occurs immediately afterwards is not detected. One solution is to change the cutoff frequency of the low-pass filter when voice is detected, that is, different methods are used to estimate noise energy when voice/silence is present.
Voice quality
Network delay and jitter are key factors affecting voice quality. Packing is also an important factor affecting delay. The real-time nature of packing and the efficiency of packing are a contradiction. The amount of information gathered before packing is closely related to the bandwidth, and an appropriate threshold must be found. "Jitter" is a unique phenomenon of packet switching. The way to eliminate jitter is that the receiver uses a "jitter buffer" to compensate for the unreliability of the packet network. This buffer can be a dynamic queue. The receiver determines the network traffic status based on the RTP timestamp, so as to change the size of the buffer in a timely manner. In the specific implementation, a circular queue pointer table can be established to manage the occupied buffer area. If you want to implement it simply, you can set a fixed number of arrays, and then identify several flags for management and control. In addition, echo cancellation is also one of the important aspects. A good echo canceller should have a short convergence time and a small residual echo, reliably detect accents, and be able to handle background noise and narrowband signals. In this project, the G.165 algorithm in DSP is used to eliminate voice echo to the maximum extent.
Conclusion
As a new communication terminal product, LAN IP phone has a lot of room for development. At present, there are many sample forms, but the general trend is: simple hardware, high integration, good real-time and reliability of software, and support for multiple business types. The design proposed in this article has a good grasp of this trend. The device can not only maintain the operation process of traditional telephones for users, but also seamlessly connect with the wide area network, greatly reducing the communication cost and having strong practicality.
Previous article:Design of Micro Inertial Measurement Device Based on ARM and MEMS Devices
Next article:Design of wireless home gateway based on ARM-Clinux
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- MSP430F5529 generates PWM waves with CCS
- M5StickC Smart Fishing Rod
- EEWORLD University Hall----Live Replay: ST's PLC Solutions in Industrial Automation
- How about this B-G474E-DPOW1 digital power development board?
- Company team building
- PCB modular layout - capacitor design
- Fujitsu White Paper Award Download | FRAM High-Performance Memory Optimizes In-Vehicle Electronic Systems
- Review summary: Erha image recognition artificial intelligence vision sensor
- MCU interrupt
- UTC time zone conversion of single chip microcomputer