Back to Insights
VoIP Engineering

SIP Headers Reference Guide: Via, From, To, Contact, and Call-ID

Telephony Engineering Team
4 min read
SIP Headers Reference Guide: Via, From, To, Contact, and Call-ID

SIP headers carry the routing, identity, and transaction information that proxies and endpoints need to process a message. Most real-world SIP faults can be traced to one mishandled header, so knowing the core set pays off quickly.

Mandatory Headers

Every SIP request must contain these:

HeaderPurpose
ViaRecords the path the request took. Responses retrace it in reverse
FromWho originated the request, with a tag that identifies the caller's side of the dialog
ToThe intended recipient. The callee adds its own tag in responses
Call-IDUnique identifier of the call or registration
CSeqA sequence number plus method name, ordering requests within a dialog
Max-ForwardsHop limit to prevent loops

Via

Each hop adds its own Via header on top. The branch parameter identifies the transaction. The received and rport parameters help a server route responses back through NAT when a client's advertised address differs from the real source.

From, To, and Tags

The combination of Call-ID, From tag, and To tag identifies a dialog. A missing or reused tag produces mysterious "call leg does not exist" behavior in B2BUAs.

Contact

Contact tells the far end where to send subsequent requests in the dialog. If a device behind NAT puts a private address here, in-dialog requests like BYE can never reach it. This is the single most common source of calls that cannot be hung up cleanly or that drop at the 32-second mark. See SIP INVITE call flow.

Record-Route and Route

A proxy that needs to stay in the signaling path adds Record-Route. Endpoints then store it and use Route headers on later requests so those requests traverse the proxy. Session border controllers and load balancers rely on this (see Kamailio dispatcher configuration).

Identity Headers

  • P-Asserted-Identity (PAI) is a trusted network assertion of the caller's identity, used between trusted domains.
  • Privacy requests that identity be withheld from the callee.
  • Identity carries a signed attestation as part of caller authentication (see STIR/SHAKEN compliance).
  • Diversion and History-Info record call forwarding, which carriers use for billing and for presenting the original called number.

Headers Often Seen in Production

  • User-Agent and Server identify software, helpful in tracing which hop generated an error
  • Allow and Supported list the methods and extensions an endpoint supports
  • Session-Expires enables session timers so dead calls get cleaned up
  • Content-Type and Content-Length describe the body, usually SDP (see SDP explained)

Debugging Tips

  1. Compare the top Via on a request with the actual source IP to spot NAT.
  2. Check that Contact is routable from the other side.
  3. Confirm Record-Route is added once, not duplicated.
  4. When identity looks wrong, find the earliest hop that altered PAI or From.

Normalization

Interop problems often come from vendors using headers differently. A session border controller can rewrite or strip headers so each side sees what it expects (see SBC architecture).


Facing carrier interop issues or header-mangling problems? Our custom VoIP development team builds the normalization and routing logic that makes mixed-vendor networks behave.

Discussion

0

Join the conversation

Sign in with your preferred account to comment, reply, and keep the discussion useful for other engineers.

Takes a few seconds. No separate password required.

C

Controva LLC

Engineering Team

We build digital empires that scale. Specializing in high-performance web architecture, AI automation, and headless commerce.

Work with us

Share this article