Configure your SIP UA or PBX to send a SIP REGISTER request to the registrar's address (the SIP server or provider URI) with a From and To header matching the SIP address of record and an Expires header value specifying registration duration in seconds.
On first REGISTER, the registrar responds with 401 Unauthorized including a WWW-Authenticate header containing realm and nonce; your UA computes an MD5 (or SHA-256 where supported) digest response using username, realm, nonce, URI, and the account password, then re-sends REGISTER with an Authorization header containing the computed response.
Set the Expires value to a duration your provider supports (common values are 60-3600 seconds); re-register before expiry — typically at 50-80% of the Expires interval — to maintain the registration without interruption.
Implement SIP OPTIONS ping or SIP keep-alive packets (a CRLF or double CRLF sequence over TCP/TLS) at an interval shorter than any NAT binding timeout (often 30-60 seconds) to keep the NAT pinhole open and detect path failures.
For TCP or TLS transports, the UA should set Connection: keep-alive and handle TCP connection drops by reconnecting and re-registering; for UDP, track response timeouts and retry with exponential backoff.
Log 401, 403, and 423 (Interval Too Brief) responses: 403 indicates credential failure, 423 means the registrar requires a longer Expires value — adjust to the Min-Expires value in the 423 response and retry.
Known gotchas
SIP digest uses MD5 by default, which is cryptographically weak; prefer providers that support SHA-256 digest (RFC 7616) or TLS transport to protect credentials in transit.
NAT rebinding can change your public IP mid-registration; SIP ALGs on home routers often mangle Contact headers — use an SBC or configure your UA to use the provider's STUN/TURN to discover and advertise the correct public contact address.
Some providers enforce a minimum Expires value; sending a value below their minimum results in a 423 response — always parse the Min-Expires header in 423 responses and use it for subsequent registration attempts.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp