-
Notifications
You must be signed in to change notification settings - Fork 2
Operations
This page collects operational commands and checks used when running GABPBX.
Systemd deployments commonly use:
systemctl stop gabpbx
systemctl start gabpbx
systemctl status gabpbx
journalctl -u gabpbxFor crash debugging, run GABPBX under gdb instead of the service manager.
Start foreground console:
gabpbx -vvvcConnect to a running instance:
gabpbx -rRun 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 version
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 set debug fork on
sip set debug fork off
sip set debug capture <host:port>
sip set debug file <path>
sip show blacklist
sip show version reports which Sofia-SIP library chan_sofia is using:
*CLI> sip show version
Sofia-SIP:
----------
Built against: 2.0.4 (sofia-sip-2.0.4)
Runtime version: sofia-sip-2.0.4
Loaded library: /usr/local/lib/libsofia-sip-ua.so.0
- Built against is the compile-time version from the Sofia-SIP headers the driver was built with.
-
Runtime version is a symbol exported by the shared object actually loaded,
so a value that differs from Built against means the running library is
newer or older than those headers — rebuild
chan_sofiato match. - Loaded library is the resolved path of that shared object (the ABI-stable soname link).
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.
sip set debug fork {on|off} is a focused tracer for parallel call forking, off
by default and independent of the general sip set debug. When a single address
of record has several bound contacts (for example a physical phone over UDP and a
browser over WSS on the same account), a call forks a leg to each contact. The
tracer logs each leg's creation, the selection of the answering ("winner") leg,
and the teardown of the losing legs. It is the clearest way to follow a
mixed-transport fork and to spot a leg being torn down against a stale or removed
contact.
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.
sip show peer <peer> prints a concise, readable summary of a single peer:
- SIP peer name
- Registration state
- Endpoint (
user@host:portand 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.
Main config:
configs/logger.conf.sample
Reload:
*CLI> logger reload
When debugging SIP, collect:
- GABPBX console logs.
-
sip set debugoutput. - Packet capture with
tcpdumporsngrep. - AMI events if monitoring behavior is involved.
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-20000Use sngrep for SIP ladder inspection when available.
chan_sofia can export a copy of every SIP message it sends or receives —
already decrypted, including the SDP body, and covering every transport (udp,
tcp, tls, ws, wss) — to a capture sink. This gives the wire view that a
tcpdump capture cannot provide for TLS or WebSocket transports, because the
messages are exported after decryption.
Two sinks are available and may be used together.
Stream to a Homer / sipcapture (HEP) collector, configured in the [general]
section of sofia.conf:
[general]
sip_capture_address = 127.0.0.1:9060
Write the same decrypted stream to a plain-text file:
[general]
sip_capture_file = /var/log/gabpbx/sip_capture.txt
Either sink can also be toggled at runtime from the CLI, without a reload:
sip set debug capture <host:port>
sip set debug file <path>
Read the HEP stream with an EEP/HEP-capable sngrep listening on the same
address:
sngrep -L udp:127.0.0.1:9060Normal build:
./configure
make
make installAvoid make clean or make dist-clean unless intentionally resetting build
state, because it forces much more recompilation.
For the public GitHub repository:
- Keep
mainprotected. - 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.
- Disable guest calls unless required.
- Use strong peer secrets.
- Configure NAT:
externaddr,localnet,nat=force_rport,comedia. - Keep
directmedia=nountil 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.
SIP — chan_sofia
Subsystems
Realtime & data
Operations