Created on
02-25-2025
12:18 AM
Edited on
10-10-2025
02:07 AM
By
Jean-Philippe_P
Description |
This article describes that when using NAT with VoIP traffic, a second session is generated due to the return traffic from the VoIP connection. This behavior is expected and necessary for proper traffic management. |
Scope | FortiGate. |
Solution |
Example Scenario: Consider a VoIP network where internal devices reside in the 192.168.1.0/24 subnet. The FortiGate is configured to translate private IP addresses to a public IP using NAT. Below is how FortiGate processes the traffic:
First Session (Outbound): The outbound VoIP traffic originates from within the 192.168.1.0/24 subnet. FortiGate translates the source IP to the IP specified in the IP Pool (for example, 203.0.0.1) before reaching the Internet. Outbound session entry:
Second Session (Inbound/Return): When the destination (198.51.100.42) replies to the VoIP traffic, it targets the NATed IP (203.0.0.1). FortiGate creates a separate session to manage the incoming return traffic:
This separate inbound session is essential for FortiGate to associate the incoming traffic with the correct internal source IP within the 192.168.1.0/24 subnet.
Why this behavior occurs: FortiGate maintains separate session states for outbound and inbound (return) traffic when using NAT. This is necessary for the following reasons:
Synchronization of RTP and SIP Sessions: The RTP session must be fully active, with traffic flowing both ways on the same unit as the SIP session, before synchronization can occur. The SIP control session cannot exist on one unit while the RTP session runs on another. Both must start on the same unit for synchronization to function correctly.
Confirm the creation of both sessions (outbound and inbound) using the following session list command:
diagnose sys session list | grep <<<VoIP server IP or NATed IP>>>
This will show a real-time session view, which will confirm proper NAT behavior for VoIP traffic.
For more details on session synchronization, refer to Fortinet’s official documentation: Technical Tip: FGSP Configuration Guide for Session Sync and Config Sync.
The session-pickup-expectation and session-pickup-nat options apply specifically to FGSP, ensuring seamless session synchronization across FortiGates.
FortiGate flow and session tracking limitations under IPsec with NAT-T: FortiOS session tracking is optimized for clear-text traffic. Once traffic is encrypted and encapsulated, tracking mechanisms may not correctly link SIP control and RTP media sessions.
SIP Over IPsec with NAT Traversal as Best Practices. When SIP traffic traverses an IPsec VPN, especially with the NAT Traversal enabled, additional encapsulation of UDP port 4500 may interfere with SIP and RTP session tracking.
Note: Verify NAT IP and session entries are symmetric, compare inbound vs outbound NAT in the session table.
Related Behavior with SIP helper and NAT. FortiGate uses a built-in SIP session helper to rewrite SIP headers during NAT translation. Troubleshooting Tip: One way Audio issue in VOIP (with SIP ALG)
To verify the session helper in the configuration:
config system session-helper show full | grep edit 13 show full | grep port 5060 show full | grep sip
Related articles: Technical Tip: VoIP and SIP configuration and troubleshooting resource lists |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.