Figure 27 shows the main components of the IMSG architecture.
Figure 27: IMSG Architecture

In the IMSG architecture, the BGF controls VoIP signaling and media based on instructions that it receives from the Service Policy Decision Function (SPDF). The BGF process runs on a data PIC.
The BSG (Border Signaling Gateway) is the component that controls VoIP media resources on the router and is responsible for all SIP processing.
The BSG acts as a Session Initiation Protocol (SIP) back-to-back user agent (B2BUA) that fully terminates incoming signaling sessions and then starts a new signaling session on its other side.
Each BSG instance has an embedded SPDF that is a standard TISPAN component with Gq’ and Ia interfaces as defined by TISPAN (see Figure 26).
The SPDF is responsible for:
The SPDF configuration uses service classes that classify media sessions and then specify the actions to take on the media session—marking, dropping, or applying QoS parameters.
The SPDF coordinates resource reservation requests that it receives from the application function (in this case the B2BUA in the BSG) as follows:
The IPSec process is located on the same PIC as the BGF.