Establish the channel driver and release first
chan_sip was deprecated in Asterisk 17 and removed in Asterisk 21. Its AMI actions remain documented on the Asterisk 20 surface, while current Asterisk uses chan_pjsip and res_pjsip for SIP. Record the responding node, installed branch and maintenance release, build provenance, loaded modules and authenticated AMI identity before interpreting any action result.
A missing SIPpeers, SIPshowpeer, SIPpeerstatus or SIPshowregistry action on Asterisk 21 or later can be the expected result of module removal. It is not evidence that a phone, trunk or registration is absent.
Bound the legacy peer inventory without extending its contract
On a deployment that actually runs chan_sip, Action: SIPpeers accepts ActionID, emits separate Peerlist events and closes with PeerlistComplete. Publish the snapshot only after the documented completion boundary and retain the request identity, all rows, completion and timestamps.
SIPshowpeer instead takes one required Peer and returns text-format detail. SIPpeerstatus takes an optional Peer and can request one or all peer statuses. Keep these contracts separate; a peer detail response is not a completed global inventory.
Keep peer, registry and live call evidence distinct
SIPshowregistry describes the legacy chan_sip registry surface. A configured peer, a reported peer status, an outbound registration, an inbound request match, an authenticated dialog and two-way media are different observations. Preserve peer name, registration identity, remote address, timestamps and call identifiers without flattening them into one “online” state.
Text returned by a legacy action is version-bound output, not a guaranteed schema for a current collector. Retain raw AMI frames and the Asterisk release used to interpret them.
Map the question to PJSIP objects rather than renaming fields
PJSIP separates endpoint, AoR, contact, authentication, identify, transport and registration objects. PJSIPShowEndpoints raises an EndpointList event for each endpoint and ends with EndpointListComplete; it does not recreate the old chan_sip peer model.
Choose the current action for the actual question: endpoint inventory, exact endpoint detail, AoR policy, current contacts, inbound or outbound registrations, identify matching or transport configuration. Do not translate one legacy peer row into one PJSIP object by label alone.
Treat conversion as a reviewed migration, not proof
Asterisk ships sip_to_pjsip.py as a basic conversion aid and explicitly says it is not intended to cover every scenario. It can process included files when run with the right source context, but generated pjsip.conf remains a candidate configuration that needs object-by-object review.
Retain the before-image, included-file set, conversion output, warnings, effective configuration, loaded objects and rollback. PJSIP syntax is stricter, and transport, NAT, authentication, matching and registration semantics require deliberate validation.
Use least privilege and state the untested boundary
Use ListCommands with the intended manager identity to inventory only the actions available to that user; distinguish absent module registration from denied action classes. Restrict AMI source addresses and permissions and protect peer, endpoint, address and credential-bearing output.
No PBX, FreePBX system, module, configuration, manager account, credential, peer, endpoint, AoR, contact, registration, packet, call or audio was inspected or tested. Validate the migration against the installed release, generated configuration owner and an authorized acceptance plan.
Do not copy chan_sip list framing into IAX2 actions
The IAX2 AMI evidence guide notes that the current IAX peer pages do not document Peerlist or PeerlistComplete.
Sources & applicability
Primary references for the technical details above. Operational examples and planning checklists are VoIP.info editorial guidance.
- Asterisk 20 SIPpeers AMI action ↗
- Asterisk 20 SIPshowpeer AMI action ↗
- Asterisk 20 SIPpeerstatus AMI action ↗
- Asterisk 20 SIPshowregistry AMI action ↗
- Asterisk chan_sip configuration status ↗
- Asterisk 21 changes ↗
- Asterisk module deprecations ↗
- Asterisk chan_sip to res_pjsip migration ↗
- Asterisk PJSIPShowEndpoints AMI action ↗
- Asterisk ListCommands AMI action ↗
- Asterisk AMI v2 specification ↗
- Asterisk network security guidance ↗
- Asterisk current IAXpeers AMI action ↗
- Asterisk current IAXpeerlist AMI action ↗
- Asterisk current IAXregistry AMI action ↗
- Asterisk current IAXnetstats AMI action ↗
- Asterisk 22 IAXpeers AMI action ↗
- Asterisk 22 IAXpeerlist AMI action ↗
- Asterisk 22 IAXregistry AMI action ↗
- Asterisk 22 IAXnetstats AMI action ↗
- Asterisk IAX2 security guidance ↗
- Asterisk iax.conf sample ↗
- Asterisk chan_iax2 implementation source ↗
Examples require adaptation to your topology. No live PBX or hardware testing is claimed.