re powerful peers to be the gateway-like nodes that route messages among heterogeneous overlays. The elected gateway-like node is defined as the P2P proxy. In Figure 9.10, node n joins both the local Pastry overlay and global overlay to perform the gateway-like function. P2P proxies are good candidates for such kinds of stateful nodes. The benefits of introducing such a hierarchical architecture are that peers in heterogeneous overlays can be interconnected and the balance between low Chord overlay Pastry overlay (P2P domain) (P2P domain) Global overlay Other overlay CAN overlay (P2P domain) (P2P domain) FIGURE 9.10 Hierarchical P2P-SIP structure. C 2009 by Taylor & Francis Group, LLC SIP Handbook: Services, Technologies, and Security signaling overhead and easy management can be achieved. More details about the architecture can be found in Section 9.3.2 and Reference [16]. 9.5 Protocol Development and Implementation Reference [17] outlines the motivation, requirements, and architectural design for a distributed Session Initiation Protocol (dSIP). dSIP is a P2P-based approach for SIP registration and resource discovery using distributed hash tables maintained with SIP messages. Reference [18] outlines the motivation, requirements, and architectural design for a extensible and lightweight dis- tributed REsource LOcation And Discovery (RELOAD) protocol. 9.5.1 Recursive and Iterative Routing The routing scheme used by a P2P system is very important to both its performance and resistance against attacks. Several mechanisms have been discussed. In each case, the initial message is sent from the requester to the peer in the routing table most likely to route correctly, as defined by the DHT algorithm in use. Subsequently, that peer may provide further routing using one of three mechanisms [19]. In iterative routing, the querying node contacts each intermediate node directly. If the contacted peer is not responsible for the target ID, then the contacted peer issues a 302 redirect response pointing the search peer toward