Why Asterisk’s Pjsip Registration Fails When Networks

by Jule 54 views
Why Asterisk’s Pjsip Registration Fails When Networks

A recent test revealed a puzzling flaw in Asterisk’s pjsip registration during network outages. When routers drop - like in a simulated firewall failure - pjsip returns a ‘Rejected’ status, even though DNS and connectivity are intact. This misleading state misleads operators into thinking a peer is down, when in fact the network’s just unstable. The pjsip show registrations output shows a clean ‘Rejected’ instead of ‘Available,’ confusing even experienced users. This isn’t protocol failure - it’s a timing mismatch between retries and actual network recovery.

Here’s the core: pjsip waits 60 seconds before retrying a failed registration, but during outages, no response means no visibility - leading to false ‘Unavailable’ alerts.

Bucket Brigades: Most users expect immediate ‘Available’ when DNS resolves; they don’t realize pjsip waits for the network to breathe.

  • pjsip shows ‘Rejected’ when the destination is unreachable, not because of peer rejection.
  • Asterisk logs warn of no response, yet the system remains stuck in retry mode.
  • The retry interval is fixed at 60 seconds, ignoring network recovery speed.

This creates a hidden blind spot: a critical SIP endpoint appears down when it’s just slow.

When troubleshooting, disable immediate ‘Available’ checks - look for real connectivity, not just pjsip status.

Is your Asterisk seeing a failure or just timing? Don’t panic on a ‘Rejected’ - it may just be the network catching up.

This pattern reveals a deeper tension: legacy tools struggle with modern network volatility, where latency masks actual service unavailability.