the message flow of a session establishment between two users who are roaming. This is the most general scenario because it shows an outgoing and incoming session from a visited domain. Let's parse the roles of the different network nodes in this session estab- lished between Bob and Laura. Bob is on a business trip to another country. When he arrives at his destination, he REGISTERS his current position as in Figure 7-2. Laura is on vacation and also away from her home domain. Laura sends an INVITE to the P-CSCF. The P-CSCF notices that Laura belongs to another provider and forwards the INVITE to the proper net- work. The I-CSCF of Laura's home domain consults the HSS (not shown in the picture) and sends the INVITE to the S-CSCF that was assigned to Laura when she registered. The S-CSCF will send the INVITE to Bob's home domain. From Bob's home domain's point of view, this is an incoming session for a user who is roaming. The I-CSCF consults the HSS (not shown in the pic- ture) and forwards the INVITE to the S-CSCF that handles Bob. The S- CSCF knows that Bob is currently in a visited domain because he previously registered his current location. Therefore, the INVITE is for- warded to the P-CSCF near Bob, where Bob finally receives it. Laura's visited Laura's home Bob's home Bob's visited domain domain domain domain Laura's terminal P-CSCF Bob's I-CSCF S-CSCF I-CSCF S-CSCF P-CSCF terminal (1) INVITE (2) INVITE (3) INVITE (4) INVITE (5) INVITE (6) INVITE (7) INVITE (8) 200 OK (9) 200 OK (10) 200 OK (11) 200 OK (12) 200 OK (13) 200 OK (14) 200 OK Figure 7-3 Session between roaming users. Building Applications with the SIP Toolkit Instant Messages and Presence Instant messages and presence information are great examples of using the SIP toolkit to provide a combined service. We saw in previous sections how instant messages can be sent using the MESSAGE request. We also saw how a user can subscribe to certain events using the SUBSCRIBE and the NOTIFY methods. An application combining these two SIP extensions can pro