st, etc.) On Reset DHT (Chord) User location Media devices Codec RTP/RTCP Socket interface FIGURE 9.8 Block diagram of a P2P-SIP node. interface module keeps track of the "friends list" of the user and invokes the user location module to locate these friends. User location is obtained using the SIP module or the DHT module. The DHT module maintains the peer information and performs DHT operations. In this system, SIP is used as the underlying protocol for locating users or nodes, joining the DHT, registering users, call setup, and instant messag- ing. Once a user is located, the call setup or instant messages can be sent directly via the SIP module to the user's phone. SIP REGISTER refresh and OPTIONS messages are used to detect node failure. When a super-node shuts down or fails, the registrations are transferred to other super-nodes in the DHT. Other SIP functions, such as third-party-call control and call-transfer, C 2009 by Taylor & Francis Group, LLC SIP Handbook: Services, Technologies, and Security can be implemented similarly. The media path (media device, codec and trans- port) is independent of the P2P-SIP operation. Some DHTs (e.g., Controller Area Network (CAN)) may allow parallel search to multiple peers. In this case, the super-node may act as a back-to-back user agent (B2BUA) and propagate the SIP message to the neighboring peers. In a real deployment, it may be useful to allow multiple P2P-SIP networks to be interconnected. This hybrid architecture allows both the P2P-SIP networks and the server-based SIP infrastructure to coexist. There are two approaches to implementing this design: cross register all the users of one network with all the other networks, or locate the user in the other network during call setup. The first method is suitable for a small number of known P2P SIP networks, where each P2P SIP network is represented by a domain name. This is the same as a server-based SIP network where the domain name resolves to one or more bootstrap nodes in that network [14]. The second one can be 