Chapter 22 VoIP Solutions: SIP : FortiGate VoIP solutions: SIP : How the SIP ALG performs NAT : How the SIP ALG translates IP addresses in SIP headers
  
How the SIP ALG translates IP addresses in SIP headers
The SIP ALG applies NAT to SIP sessions by translating the IP addresses contained in SIP headers. For example, the following SIP message contains most of the SIP fields that contain addresses that need to be translated:
INVITE PhoneB@172.20.120.30 SIP/2.0
Via: SIP/2.0/UDP 172.20.120.50:5434
From: PhoneA@10.31.101.20
To: PhoneB@172.20.120.30
Call-ID: a12abcde@172.20.120.50
Contact: PhoneA@10.31.101.20:5434
Route: <sip:example@172.20.120.50:5060>
Record-Route: <sip:example@172.20.120.50:5060>
How IP address translation is performed depends on whether source NAT or destination NAT is applied to the session containing the message: