In the following sample SIP request message, NAT replaces the IP addresses in the header fields—shown in bold font—to hide them from the outside network.
- INVITE bob@10.150.20.5 SIP/2.0
- Via: SIP/2.0/UDP 10.150.20.3:5434
- From: alice@10.150.20.3
- To: bob@10.150.20.5
- Call-ID: a12abcde@10.150.20.3
- Contact: alice@10.150.20.3:5434
- Route: <sip:netscreen@10.150.20.3:5060>
- Record-Route: <sip:netscreen@10.150.20.3:5060>
How IP address translation is performed depends on the type and direction of the message. A message can be any of the following:
Table 75 shows how NAT is performed in each of these cases. Note that for several of the header fields the ALG must know more than just whether the messages comes from inside or outside the network. It must also know what client initiated the call, and whether the message is a request or response.
Table 75: Requesting Messages with NAT Table continued on next page