VoIP.info Guide

Asterisk CLI and PJSIP logging for one failed call

Collect endpoint state and a short signaling trace without leaving verbose logging enabled.

Reviewed 2026-09-07Asterisk 22 LTS / chan_pjsip; CLI commands, not shell commandsIntermediateDocumentation based · not lab tested

Inspect state before changing it

On an authorized Asterisk 22 system, inspect the affected endpoint, its AOR and contacts, then compare registration and qualification state with the reported symptom. A contact can exist while a call fails because of dialplan, codec or media policy. Read the local command help for your installed version. FreePBX manages generated configuration, so diagnose through the CLI without treating direct edits to generated files as a durable fix.

Enable only the needed evidence

PJSIP logging shows SIP messages handled by that channel driver. It can include sensitive identities and authentication exchanges. Enable it for a short controlled reproduction, capture the incident time and disable it immediately afterward. It does not provide a complete packet capture of RTP or prove the network delivered every transmitted message. The example below shows the on/off pair, not a script that should be pasted all at once. Preserve previous verbosity and debug levels if you change them; restore those values after the test rather than assuming zero is everyone's normal baseline.

Asterisk CLI — run on and off around the test; explanatory line is not a command
pjsip set logger on
pjsip set logger off

Correlate the application decision

Pair the signaling trace with the dialplan path and relevant channel identifiers. Find whether Asterisk rejected the call locally, attempted a downstream destination or received a remote rejection. For an answered call, correlate both channels and the bridge before blaming a trunk. Protect the resulting logs and remove unnecessary authorization data before sharing. A troubleshooting record should include the exact version, command scope, test time and cleanup performed. Do not leave detailed logging running indefinitely on a busy system.

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.