he message in order to record the path of SIP entities traversed: the related response will be sent through the same path in order to reach the sender of the SIP request message as each SIP entity will attempt to forward the response to the transport address stored in the topmost Via header field (copied from the related request message). Figure 12.10 shows two UAs, called UA A and UA B wishing to set up a media session: no NATs are present. Before forwarding the message, the SIP proxy appends its transport address in a new Via header field. When the message reaches UA B, the Via headers are copied in the 200 OK response and the response is forwarded to the transport address stored in the topmost Via header field: when the 200 OK response reaches the proxy, it removes the topmost Via header (storing the transport address of the proxy) and the message is forwarded to UA A. Now suppose that UA A is placed behind a NAT and that UA A knows only its internal transport address (see Figure 12.11): the transport address placed by UA A in the Via header field of the INVITE request will be a © 2009 by Taylor & Francis Group, LLC 1) UA A sends an INVITE to UA B (the message reaches the proxy) 2) UA A sends an INVITE to UA B (the proxy fowards the message) Via: SIP/2.0/UDP 130.192.225.14:5060 Via: SIP/2.0/UDP 130.192.225.15:5060 Via: SIP/2.0/UDP 130.192.225.15:5060 INVITE INVITE 130.192.225.15:5060 130.192.225.14:5060 130.192.225.15:5060 130.192.225.14:5060 130.192.225.14:5060 130.192.225.14:5060 3) UA B sends a 200 OK response (the message reaches the proxy) 4) UA B sends a 200 OK response (the message reaches UA A) Via: SIP/2.0/UDP 130.192.225.14:5060 Via: SIP/2.0/UDP 130.192.225.15:5060 Via: SIP/2.0/UDP 130.192.225.15:5060 200 OK 200 OK 130.192.225.15:5060 130.192.225.14:5060 130.192.225.15:5060 130.192.225.14:5060 130.192.225.14:5060 130.192.225.14:5060 FIGURE 12.10 An INVITE request and 200 OK response routing. © 2009 by Taylor & Francis Group, LLC UA A sends an INVITE to UA B (the message reaches the proxy) UA A sends 