try hiccup

IMS architecture explained: P-CSCF, I-CSCF, S-CSCF and the HSS

Short version: IMS is a SIP network with the roles pulled apart. The P-CSCF is the edge you talk to, the I-CSCF is the doorman who looks you up, the S-CSCF is the brain that registers you and routes your calls, and the HSS is the database all of them consult. Once you can name which box made a given decision, an IMS trace stops being intimidating.

Why the roles are split at all

A plain SIP deployment can put registrar, proxy and application logic on one box. IMS — the 3GPP's IP Multimedia Subsystem, the architecture behind VoLTE and VoWiFi — splits them because a mobile operator has problems a PBX does not: subscribers who roam into other networks, a subscriber database that must survive any single node, services that must be applied consistently no matter where the user attaches, and a regulatory duty to control the edge. Each of those problems got its own function, and the functions talk standard SIP (with 3GPP extensions) on interfaces with two-letter names.

The cast

NodeStands forWhat it actually decides
P-CSCFProxy Call Session Control FunctionThe first SIP hop for the phone, always. Sets up the IPsec or TLS security association, polices what the device may send, compresses signalling on radio links, and asks the policy function (PCRF/PCF, over Rx) to build the voice bearer when SDP is agreed. Functionally the operator's access SBC.
I-CSCFInterrogating CSCFThe entry point into a home network. Asks the HSS (over Cx) "which S-CSCF serves this user?" and forwards accordingly. Stateless, replaceable, deliberately boring.
S-CSCFServing CSCFThe registrar and the routing brain. Authenticates the user against HSS-supplied vectors, holds the registration, evaluates the initial filter criteria, and detours requests to application servers. Every call to or from the user passes through it.
HSSHome Subscriber ServerThe subscriber database: identities, credentials, service profiles, and which S-CSCF currently serves each user. Speaks Diameter (Cx/Sh), not SIP. In 5G core the role continues as the UDM.
AS / TAS(Telephony) Application ServerWhere supplementary services live — forwarding, barring, conferencing, voicemail. Reached from the S-CSCF over the ISC interface, which is ordinary SIP.
MGCF + IMS-MGWMedia Gateway Control FunctionThe PSTN border: converts SIP to ISUP/BICC and RTP to TDM. The BGCF picks which breakout gateway a PSTN-bound call should use.

The interfaces worth memorising: Gm (phone to P-CSCF), Mw (CSCF to CSCF), Cx (I/S-CSCF to HSS, Diameter), ISC (S-CSCF to application server, SIP), Rx (P-CSCF to policy, Diameter). Most IMS trace questions are answered by knowing which interface you are looking at.

Registration, step by step

  1. The phone sends REGISTER to the P-CSCF it discovered during attach. The request carries the private identity (IMPI) and public identity (IMPU), and a Security-Client header offering IPsec parameters.
  2. The P-CSCF forwards it, adding a Path header — its own address — so the S-CSCF will later know to route everything for this user back through it.
  3. The I-CSCF asks the HSS (Cx: UAR/UAA) whether the user exists and which S-CSCF should serve them, then forwards the REGISTER there.
  4. The S-CSCF fetches authentication vectors from the HSS (Cx: MAR/MAA) and answers 401 Unauthorized with an AKA challenge — the WWW-Authenticate header carries RAND and AUTN. This first 401 is not a failure; it is the protocol working.
  5. The SIM computes the response; the phone re-REGISTERs with it, now inside the negotiated IPsec associations. The S-CSCF verifies, stores the registration (Cx: SAR/SAA), downloads the user's service profile, and answers 200 OK carrying a Service-Route header — the route the phone must use for everything it sends from now on.
  6. The S-CSCF then performs third-party registration: it sends its own REGISTER to each application server the filter criteria name, so the TAS knows the user is reachable.

How a call finds its services

The service profile downloaded at registration contains initial filter criteria (iFC): ordered rules that say "if a request matches this pattern, detour it to that application server first". When the user places a call, the S-CSCF walks the iFC list and chains the INVITE through each matching AS over ISC before routing it onward. This is why a single INVITE inside an operator core can appear four or five times in one capture with slightly different Route stacks — it is the same call being threaded through its service chain, not a loop. For the terminating side the same happens in reverse on the callee's S-CSCF.

What each box looks like in a trace

hiccup recognises the IMS headers — Path, Service-Route, P-Asserted-Identity, P-Charging-Vector — and uses the icid to stitch one call's appearances together across the core, alongside the Diameter it finds in the same capture. Self-hosted, free for individual users.

upload a trace