Skip to content

Operations

Germán Luis Aracil Boned edited this page Jun 30, 2026 · 6 revisions

Operations

This page collects operational commands and checks used when running GABPBX.

Service Control

Systemd deployments commonly use:

systemctl stop gabpbx
systemctl start gabpbx
systemctl status gabpbx
journalctl -u gabpbx

For crash debugging, run GABPBX under gdb instead of the service manager.

CLI

Start foreground console:

gabpbx -vvvc

Connect to a running instance:

gabpbx -r

Run one command:

gabpbx -rx "core show version"

Useful commands:

core show version
core show channels
core show channel <name>
module show
module show like <name>
logger reload
dialplan reload
manager show connected
rtp set debug on
rtp set debug off
rtp set debug ice on
rtp set debug ice off

rtp set debug ice {on|off} toggles ICE diagnostics independently of the general RTP debug. When enabled it logs candidate-pair nomination and the media source selected after ICE completion, which is useful when troubleshooting WebRTC media (one-way audio, audio that arrives late, or media reaching the wrong port).

For chan_sofia:

sip show settings
sip show peers
sip show peer <peer>
sip show peer <peer> detail
sip show channels
sip show inuse
sip set debug on
sip set debug peer <peer>
sip set debug ip <addr>
sip set debug sdp on
sip set debug sdp off
sip show blacklist

SDP / ICE tracer

sip set debug sdp {on|off} is a focused SDP and ICE negotiation tracer, off by default and independent of the general sip set debug. When enabled it dumps:

  • the generated offer SDP,
  • the WebRTC offer-gate decision (whether DTLS-SRTP is offered for the target, and why),
  • the incoming answer SDP, and
  • the offerer answer-apply path.

Because it traces inside chan_sofia, it shows the signaling of a WSS or TLS session already decrypted — something a tcpdump/sngrep capture on the wire cannot give you. It is the first tool to reach for when an inbound WebRTC call (GABPBX as the SDP offerer) negotiates audio/video incorrectly.

Transaction tag on debug lines

Every Sofia: … debug line now carries a [from-user|to-user|callid] tag, so a log line can be attributed to a specific SIP transaction even when several calls are in flight at once. Filter the log on a Call-ID prefix or a user to follow one call through a busy trace.

Inspecting a peer

sip show peer <peer> prints a concise, readable summary of a single peer:

  • SIP peer name
  • Registration state
  • Endpoint (user@host:port and the transport in use)
  • Context / source (static config or realtime)
  • Accountcode
  • Contact slots used / allowed
  • Media (codecs, DTMF mode, NAT, directmedia)
  • Calls (active / limit, ringing, on-hold)
  • Qualify status

The summary is followed by the full list of bound contacts, each showing its State, TTL, Source address, and User-Agent.

sip show peer <peer> detail prints the complete per-field dump for the peer, grouped into sections: session timers, identity headers, network & media, limits & features, fax / T.38, timers & RTP, routing & dialplan, security & ACL, registration, and contacts. The detail keyword tab-completes.

Logging

Main config:

configs/logger.conf.sample

Reload:

*CLI> logger reload

When debugging SIP, collect:

  • GABPBX console logs.
  • sip set debug output.
  • Packet capture with tcpdump or sngrep.
  • AMI events if monitoring behavior is involved.

Packet Capture

Examples:

tcpdump -i any -n -s 0 -w /tmp/gabpbx-sip.pcap udp port 5060
tcpdump -i any -n -s 0 -w /tmp/gabpbx-rtp.pcap portrange 10000-20000

Use sngrep for SIP ladder inspection when available.

Build Hygiene

Normal build:

./configure
make
make install

Avoid make clean or make dist-clean unless intentionally resetting build state, because it forces much more recompilation.

Git Hygiene

For the public GitHub repository:

  • Keep main protected.
  • Work through branches and pull requests for public changes.
  • Do not commit local memory/private documentation.
  • Keep generated build artifacts out of the repository.
  • Keep source files needed to build from a fresh clone tracked.

default.exports is a required source/build support file and must be tracked.

SIP Production Checklist

  • Disable guest calls unless required.
  • Use strong peer secrets.
  • Configure NAT: externaddr, localnet, nat=force_rport,comedia.
  • Keep directmedia=no until RTP is proven.
  • Configure call limits on trunks.
  • Disable REFER transfers on untrusted trunks.
  • Monitor authentication failures and blacklist entries.
  • Verify RTP both directions before and after transfers.
  • Verify codecs on both call legs.
  • Restart GABPBX when switching SIP channel drivers.

Clone this wiki locally