1 Introduction 1.1 VoWLAN Overview VoWLAN is one of the emerging applications of WLAN. VoIP transmits voice signals over a data network; WLAN (Wireless Local Area Network) provides wireless internet access through a wireless access point. VoWLAN can be seen as an organic combination of the two. It can utilize existing WLAN networks to achieve wireless VoIP calling capabilities. Enterprise employees can use VoWLAN to conduct voice communication, access email, and other connected network resources anytime outside the office, thus improving network resource utilization and reducing call costs, thereby saving the enterprise's overall IT expenses. For residential users, VoIP phones connected to broadband 802.11 wireless networks can also reduce call costs. The data flow of a VoWLAN system is as follows: voice signals are transmitted through the access point (AP) to the VoIP gateway, which can be the original wired VoIP gateway. In this way, voice data is transmitted between the IP network and the PBX (PBX). This method allows the functions of traditional wired office and residential telephones to be realized in VoWLAN. Operators only need to add voice gateways, billing systems, and other equipment to provide VoWLAN applications for their WLAN hotspots, achieving an efficient combination of data and voice communication. 1.2 SIP Overview Currently, VoIP primarily involves three basic communication protocols: H.323, SIP, and MGCP. SIP, or Session Initiation Protocol, is a protocol proposed by the Internet Engineering Task Force (IETF). Compared to H.323, SIP focuses on using IP telephony as an application on the Internet, adding signaling and QoS requirements compared to other applications (such as FTP and email). They support essentially the same services and both utilize RTP as the media transmission protocol. SIP is a text-based protocol, similar to HTTP. Text-based encoding means that the meaning of header fields is immediately apparent, such as From, To, and Subject domains. This distributed, almost entirely documentation-free standard specification style has proven its superiority in past practice (the widely used SMTP email protocol is a prime example). The SIP message body is described using SDP, with each item in the SDP formatted as an '=" sign, making it relatively simple. SIP easily supports supplementary or intelligent services; these services can be implemented by fully utilizing the already defined header fields of SIP and making simple extensions to SIP. For example, for call forwarding, simply adding the Contact header field to the BYE request message and including the intended third-party address can achieve this service. For some intelligent services that are difficult to implement by extending header fields, service proxies can be added to the architecture to provide supplementary services or interfaces with intelligent network devices. The SIP protocol borrows design ideas from other Internet standards and protocols, and in terms of style, it follows the Internet's consistent principles of simplicity, openness, compatibility, and scalability, making it relatively simple. 2 System Hardware Design 2.1 Central Controller The central controller MCU uses the UBICOM IP2022 network processor. It is a microprocessor specifically designed for Internet-edge. Its main features include: handling protocols through software instead of hardware logic, reducing chip complexity; using memory-to-memory operations for arriving packets, eliminating the need for large-capacity, expensive on-chip caches and packet buffers; a streamlined real-time operating system with no memory-hungry requirements; the ability for designers to implement various Internet-edge applications through software design; IP2022's memory is divided into on-chip and off-chip parts, employing a Harvard architecture with separate data and code memories; 4KB on-chip data memory, 64KB on-chip flash memory, 16KB on-chip PRAM, external memory, and extra flash memory for storing more code, such as embedded web server code, as well as some DLL functions and online firmware upgrades. SRAM is used to expand PRAM space, for example, for buffering packets. 2.2 Voice Module This module uses the TLV320AIC10. The TLV320AIC10 is a newly released low-power Σ-Δ type 16-bit A/D and D/A audio interface (AIC) chip from TI. It is controlled by five control registers. Control Register 1: Software reset, DAC 16-bit or 15+1-bit mode selection, and enable/bypass selection for anti-aliasing filters, sampling filters, and interpolation filters. Control Register 2: Determines the operating mode and sampling rate. Low-power mode control, frequency divider register control (determines the filter clock frequency and sampling period). Control Register 3: Software power-off, analog and digital signal feedback and event control mode selection; ADC 16-bit or 15+1-bit mode selection. Control Register 4: Input/output gain control (achieved by controlling the input and output programmable gain amplifiers). AIC initialization mainly involves setting these four register parameters. This device is easy to interface with a microcontroller, making development and use more convenient. This is particularly suitable for various VoIP, cable modem, voice, and telephone applications involving low-bit-rate, high-performance, and intensive voice transmission, recognition, and synthesis. 2.3 The network module's wireless receiver/transmitter module uses a CF wireless network card slot. The CF card (CompactFlash) is a flash memory card introduced by SanDisk in 1994. CF cards have PCMCIA-ATA functionality and are compatible with it. Using flash memory technology, CF cards offer a stable storage solution that does not require a battery to maintain the stored data. For all stored data, CF cards offer higher security and protection than traditional disk drives, and their power consumption is only 5% of that of a small disk drive. These superior features make CF cards the preferred interface for most PDA network devices. The wireless receiver/transmitter module in this system uses the WL-672F CF wireless network adapter. This wireless network adapter is a CompactFlash Type I adapter and can be used with terminals equipped with Type II slots. Using this adapter, the connection can be maintained while working on a mobile PDA, sending and receiving emails, and accessing server data. It uses a credit card-style design, provides an integrated antenna, and can interact with all wireless network devices conforming to the IEEE 802.11b (DSSS) 2.4GHz standard. It can also interact with wired Ethernet via an AP, supports Ad-Hoc and Infrastructure communication methods, and uses 128-bit WEP encryption to ensure network security. [align=center]Figure 1 Hardware framework diagram of VoWLAN voice terminal[/align] After establishing a connection, the user's analog voice is input through the AIC10's AURXFP, AURXM, and AURXCP pins. The analog signal is converted into a digital signal stream by A/D conversion and then transmitted to the encoding module. The DSP in the encoding module compresses the voice data according to system requirements and places the compressed data into the DOUT register. When receiving voice data, when the frame synchronization FS of the TLV320AIC10 is low and the rising edge of the conversion clock signal SCLK is low, the system processor sends the voice data to the AIC10 via DIN for decompression, forming a 64Kbps PCM bitstream, which is then sent to the D/A converter for digital-to-analog conversion. Finally, the AIC10 outputs analog voice data via OUTP and OUTM. 3. VoWLAN Software Design The system software is implemented based on the SIP protocol stack. Because the SIP protocol stack adopts a modular design, the system software can directly call the APIs provided by each module of the protocol stack. The message acquisition thread of the software application module acquires the results of the protocol stack processing in real time (stored in the protocol stack message queue in the form of messages or events) and converts them into the message structure of the system application, storing them in the application module's message queue. Figure 2 is the program flowchart of the software application module. [align=center]Figure 2 Software Application Flowchart[/align] The "Application Initialization" in Figure 2 includes establishing a message reading thread, etc.; the "SIP Protocol Stack Initialization" includes establishing the protocol stack main thread, registering callback functions, initializing other modules of the protocol stack, and establishing a message queue, etc.; the "Shutdown Preparation Operation" first performs a deregistration operation, then terminates the message reading thread and the protocol stack main thread, releasing the resources occupied by the software application module and each module of the protocol stack. The protocol stack module includes two modules: transaction management and dialogue management. Similarly, the software application module also includes similar management functions, namely "call management". The function of call management is similar to the dialogue management function in the protocol stack module, except that call management focuses on interaction with the user, displaying information through a human-machine interface, prompting the user on the current call progress, and guiding the user to perform further operations. There are four states for a call: "S_IDLE", "S_PROGRESS", "S_INCOMING", and "S_CONNECTED". The relationship between them is described by a finite state machine, as shown in Figure 3. [align=center]Figure 3 Finite State Machine for Call Management[/align] The "S_IDLE" state is what we usually call the standby state. When a user dials the other party's SIP URI, the protocol stack sends an INVITE request message and receives a temporary response message, putting the call in the "S_PROGRESS" state. Arrow <1> in the diagram indicates the state transition caused by this operation. In the "S_PROGRESS" state, if the other party refuses the call, the state returns to "S_IDLE," as shown by arrow <2>. If the other party accepts the call, the call is in the "S_CONNECTED" state, as shown by arrow <5>. Even in the "S_IDLE" state, a call request may be received from the other party. When the UA application detects a new call request, it should switch to the "S_INCOMING" state, as shown by arrow <3>. Similarly, the user can refuse the call, and the state switches back to "S_IDLE," as shown by arrow <4>. When the user accepts the call request, the call state is in the "S_CONNECTED" state. In the "S_CONNECTED" state, a call termination request from either party will cause the state to return to "S_IDLE," ending the call. 4. Conclusion This terminal has low cost and can currently be registered on relevant manufacturers' SIP test platforms, completing basic session functions. Simultaneously, it can successfully register with a static IP address in a LAN and perform session operations. Innovations include : embedded development and use of SIP/SDP signaling protocols in VoWLAN terminals; embedded implementation of the USER Agent in VoWLAN terminals; and enabling calls between VoWLAN terminals and PCs, VoWLAN terminals and other VoWLAN terminals, and VoWLAN terminals and PSTN. References: 1. Lü Jingjian et al., Overview of Embedded System Design, Microcontroller Public Laboratory, 2001. 2. Wang Ruigang, Li Yan. IP Telephone Terminal Equipment - Principles, Circuits and Applications. Xi'an: University of Electronic Science and Technology of China Press, 2003. 3. Zhang Y. SIP-based VoIP network and its interworking with PSTN. Electronics & Communication Engineering Journal, 2002. 273~282. 4. Goode B. Voice over Internet protocol (VoIP). Proc. of the IEEE, 2002. 5. IP2022 Internet Processor User Manual http://www.ubicom.com 6. TLV320AIC10 Data Sheet. http://218.19.77.199:8001/download.php 7. Xian Tingwei, Sun Renxiang, Mao Qi. IP QoS Application Based on MPLS (Multiprotocol Label Switching). Microcomputer Information, 2003, (08)