| With the rapid development of the Internet and telecommunications, Instant Messaging(IM) has become more and more widely-used and has been an indispensable part in people’s daily life. But at present the mainstream instant communication system most adopt their own proprietary protocol, leading to the fact that IM systems can’t communicate with each other and may affect people’s use and hinder IM’s further development. As early as 1998, IETF committed to the standardization of instant communication protocol and developed XMPP and SIMPLE protocol. XMPP is based on the XML document, and SIMPLE, which is based on SIP.SIP, an application-layer control(signaling) protocol proposed by IETF, is widely used in the field of Vo IP and established as the core control protocol of NGN. There are many kinds of SIP terminals, but they are limited to the function of audio, video and plain text messages, and can’t support presence service and more complex message service. SIMPLE is an instant messaging and presence protocol suite based on SIP. Presence is an IM service which provides functions to allow users to publish their status information, and subscribe others’, as well as receive notifications while status information changes. Presence and instant messaging are also IMS services and follow SIMPLE. As IMS gradually mature, SIMPLE is becoming more and more mature, especially in the aspect of user status, subscription, access control and session-model of instant message. Predictably, the application of the SIMPLE will be more widely, and the realization of the SIMPLE will even become network infrastructure of NGN.Firstly, in this paper, the author gives introduction of SIP and SIMPLE protocol respectively, including the elements of the SIP, SIP system composition, SIP Message, Event Notification Mechanism, Event Publishing Mechanism, the model of presence and instant message, models of instant message, documents related to presence service, XCAP, MSRP etc. Then, the author designs and implements a instant messaging terminal based on SIP/SIMPLE. The terminal is designed into three layers, namely the protocol layer, the data and core services layer, and the UI layer. The protocol layer is responsible for the realization of XCAP protocol and the encapsulation of PJSIP stack; the data and core services layer is responsible for login, logout, presence, instant message, authorization management, buddy management,session management and parsing of XML document; the UI layer is responsible for designing interfaces and logic control, and the focus is the buddy and session window.Finally, the author implements the terminal based on Qt cross-platform programming technology and test the terminal’s performance using the testing environment. The result shows that the terminal can realize the function of the design and comply with the design of the message sequence. |