We also talked about the SIP Protocol and related SIP protocol stack. In this paper, we propose a software structure and design implementation scheme of the software telephone based on the SIP protocol. this solution is based on the embedded Windows CE platform. The middleware uses the Open-Source SIP protocol stack oSIP/eXosip, through protocol stack transplantation and application development on the protocol stack, the SIP software phone is implemented. the test results show that the software phone has a good quality of voice calls on the PDA with Windows CE.
1 Introduction
With the rapid popularization of VOIP, more and more VOIP fixed telephone terminals are emerging. with the development of VOIP, wireless VOIP will be the future development trend to meet the needs of mobile users' VOIP communication. now, more and more handheld PDA users are using wireless Internet access. If you can develop a VOIP Software phone that runs on the PDA, you can meet the wireless VOIP communication needs of these PDA users, very important practice
Meaning. because embedded Windows CEWinCE) is the most popular PDA operating system, most VOIP terminals currently use the SIP protocol. Therefore, this paper proposes a VOIP solution based on the SIP protocol on Windows CE. this solution uses the eMbedded Windows CE as the platform and eMbedded C ++ 4.0 as the development tool. The middleware adopts the Open-Source SIP protocol stack oSIP/eXosip, through the transplantation of the protocol stack and the development of applications on the protocol stack, the SIP software phone is realized.
2. Design Scheme
The structure of the SIP software phone consists of two modules: Call Control and voice communication. call control is implemented by SIP signaling, which mainly establishes, modifies, and removes calls. The voice communication module consists of three sub-modules: audio data interface, audio codec, and RTP transmission, this allows you to collect, encode, transmit, and play voice.
The audio data interface module is used for audio collection and playback, and the Windows CE low-level audio service is used because the callback mechanism in the low-level audio service provides great convenience; the audio codec adopts G.729A speech compression technology, which is a low bit rate speech encoding technology and is suitable for voice transmission over IP networks. The speech is transmitted using RTP packets. for the call control module, the open-source oSIP/eXosip protocol stack is directly transplanted to WinCE. Call the API functions of the protocol stack to implement call control. open source JRTPLIB is used for RTP transmission, and JRTPLIB also needs to be transplanted in WinCE.
3. Specific implementation
Based on the above scheme, the specific implementation includes three parts: protocol stack porting, call control, and voice communication.
3.1 protocol stack porting
OSIP/eXosip mainly supports embedded systems such as Win32, Linux, and VxWorks. oSIP/eXosip can be migrated to WinCE Based on Win32. winCE can be compatible with most Win32 APIs. There are three main scenarios for porting oSIP/eXosip on WinCE: APIs compatible with Win32, incompatible with Win32 APIs and different header files are supported and predefined. for Win32-compatible APIs, you only need to modify the Conditional compilation option. For Win32-incompatible APIs, you can replace and modify them with other WinCE APIs. In addition, some header files and pre-defined files of WinCE and Win32 are also different and need to be modified. table 1 provides some migration examples.
Porting JRTPLIB on WinCE is similar to porting the SIP protocol stack. Note that the maximum RTP loading data packets under WinCE is 2 K, which is different from 64 K on PC.
3.2 Call Control Module
The call control module registers with the proxy server and establishes, modifies, and terminates sessions to control calls. therefore, the call control module is divided into two parts: Registration and call, which are completed through the underlying SIP protocol stack. upper-layer applications call the API functions provided by the SIP protocol stack to notify the protocol stack to perform corresponding operations. The protocol stack reports events detected at the underlying layer to the application layer in the form of messages, the application layer handles the SIP event after it receives it.
3.2.1 Registration
First, the client sends a REGISTER registration request to the proxy server and waits for the server to return a response message. the client must send a new registration request after receiving the final response from the previous REGISTER request or when the previous REGISTER request times out, the registration process and the corresponding SIP protocol stack API function call or protocol stack Event Notifications are 2B) and ).
3.2.2 call
Two call modes are available for the SIP software phone in this design: Registration call and Peer To Peer call. if you call a public-network SIP user or a private-network SIP user, you can directly find the other user without using the proxy server. the following uses registration call as an example. After the terminal is successfully registered, the call can be made. A successful call process through the proxy server is shown in 3.
OSIP/eXosip has two working modes for message reporting: Event Mode and callback mode. this design uses the event mode, and obtains the SIP event through the function eXosip_event_wait regular polling. the implementation of SIP signaling is shown in table 2.
3.3 voice communication module
The speech communication module processes audio samples, encoding, and compression, and encapsulates RTP packets that can be transmitted over an IP network. The receiving end decodes and plays the packets. process 4 of the speech communication module:
The RTP transmission module is implemented by using the open source RTP protocol stack JRTPLIB. We only need to call a few functions of JRTPLIB. after a session is established through the SIP signaling, it is accurate to say that after the caller learns the called response, the caller obtains the EXOSIP_CALL_ANSWERED event, and receives the ACK message of the caller, the caller obtains the EXOSIP_CALL_ACK event, and then starts the voice communication module. when the session ends (controlled by the call module), the voice input and output device is disabled.
4 Conclusion
This paper proposes a solution for VOIP Software telephone terminal based on the SIP protocol on Windows CE platform, and introduces the modules and Implementation of the solution in detail. the software telephone implements wireless VOIP for PDA users based on Windows CE operating system. The call voice is clear and the delay is small, which has good practical value. in the future, video functions will be added to the SIP software terminal.
The author's innovation lies in: This paper proposes a VOIP solution based on the SIP protocol on Windows CE platform, and implements wireless VOIP communication for PDA users based on Windows CE, it provides users with inexpensive, convenient, and mobile voice services.