Chapter 22 VoIP Solutions: SIP : FortiGate VoIP solutions: SIP : Deep SIP message inspection : Configuring deep SIP message inspection : Discarding SIP messages that exceed a message size
  
Discarding SIP messages that exceed a message size
Enter the following command to set the maximum size of a SIP message to 200 bytes. Messages longer than 200 bytes are discarded.
config voip profile
edit VoIP_Pro_Name
config sip
set max-body-length 200
end
end
The max-body-length option checks the value in the SIP Content-Length header line to determine body length. The Content-Length can be larger than the actual size of a SIP message if the SIP message content is split over more than one packet. SIP message sizes vary widely. The size of a SIP message can also change with the addition of Via and Record-Route headers as the message is transmitted between users and SIP servers.