VoIP.info Guide

Asterisk PJSIPRegister and PJSIPUnregister: runtime registration control

Start or stop one loaded outbound-registration object through AMI without confusing an accepted action, unregister transaction, future retry schedule, provider binding or call readiness.

Reviewed 2026-10-13Current Asterisk branch-23 PJSIPRegister, PJSIPUnregister, PJSIPShowRegistrationsOutbound, OutboundRegistrationDetail, Registry and res_pjsip_outbound_registration documentation plus the outbound-registration configuration guide reviewed October 13, 2026; PJSIPUnregister is documented since Asterisk 12.0.0 and PJSIPRegister since 13.2.0, while installed release, loaded module, registration object, AMI identity and permissions, persistent configuration, timer state, network path, registrar response and service behavior remain deployment specific; no PBX, AMI session, credential, registration object, REGISTER, response, timer, provider, trunk, packet or call was inspected or testedAdvancedDocumentation based · not lab tested

Inventory the loaded registration before changing runtime state

Use PJSIPShowRegistrationsOutbound to enumerate the current outbound-registration objects and retain each OutboundRegistrationDetail event plus the list-complete boundary. Match ObjectName, client and server URIs, transport, outbound auth, proxy, status and NextReg to the intended service without exposing credentials.

An outbound registration is its own object. It is not intrinsically an endpoint, AoR, trunk, inbound route or provider account, even when those records use similar names.

Use the exact object name and avoid *all by default

Both actions accept one Registration object name or *all. Treat *all as a fleet-wide control with a larger outage and provider-rate-limit surface, not as a convenient wildcard for an uncertain name.

Freeze the target, reason, operator, ActionID, maintenance window and rollback before sending. Requery the inventory if the name is missing rather than guessing from a GUI label or SIP username.

Understand what PJSIPUnregister stops

PJSIPUnregister unregisters the specified object or all objects and stops future registration attempts. Preserve the outgoing unregister transaction and registrar response when one is sent, but do not equate an accepted AMI action with remote binding removal.

The action does not disable an IP-authenticated carrier path, static contact, inbound listener, dialplan route or automation. If the intent is isolation, inventory those independent paths as well.

Understand what PJSIPRegister restarts

PJSIPRegister first unregisters the selected object or objects, then starts registration and schedules future re-registrations according to the loaded configuration. It is therefore a state transition, not a harmless status read.

Repeated calls can create extra REGISTER traffic and should not be used as a polling loop. Preserve configured expiration, retry intervals, maximum retries and response classification before forcing another transition.

Separate AMI acceptance, Registry event and loaded status

Use an authorized, least-privilege AMI identity and a unique ActionID. Record the immediate AMI response separately from subsequent Registry events and a fresh registration detail listing. The Registry event can report Registered, Unregistered, Rejected or Failed plus a cause when available.

An AMI success means the control request was accepted. It does not prove a REGISTER reached the registrar, received 200, installed a usable binding or will stay registered through the next refresh.

Prove restoration without treating registration as a call test

After the intended transition, confirm the selected object’s status and NextReg, observe at least one scheduled refresh, and check that unrelated objects were unchanged. If authorized, test inbound routing and one outbound call separately, including release and media.

Correct persistent configuration in its owning system instead of automating repeated AMI recovery around a bad object. Protect URIs, usernames and provider responses in shared evidence. This guide is documentation-derived; no registration or call was tested.

Sources & applicability

Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.

Examples require adaptation to your topology. No live PBX or hardware testing is claimed.