YepSBC produces four kinds of record: CDRs for billing and reporting, lifecycle events for live views, per-call SIP traces for troubleshooting and an audit log of operator actions.
CDRs
Each call produces one CDR, written as a JSON line to a local file and, if configured, posted to your CDR receiver. The file is the system of record and has the same schema as the POST.
The record covers:
- Identity and timing: call UUID, decision ID and policy revision, start, first progress, answer and end times, duration and setup duration.
- Parties: calling and called numbers as received and as sent, ingress trunk and address.
- Outcome:
disposition, final SIP code and reason, Q.850 cause, which side ended the call and why. - Routing: selected destination, selected peer ID, number of attempts and an entry for each attempt.
- Media: codec, whether media was anchored, RTP packet and byte counts, loss counters, jitter, MOS, and the media profile on each leg.
- Transfers and recording: an entry per transfer and a recording block.
- Operations: the SBC node, whether the call was recovered after a takeover, and the delivery attempt number.
Billing rules worth knowing
Bill against selected_peer_id. It is the peer_id your plan supplied for the destination the call ended on. Matching the destination URI against a peer list breaks behind NAT, with shared addresses and on address changes.
disposition is the conclusion and final_sip_code is the evidence. The SBC derives disposition once, as answered, busy, no_answer, rejected, unallocated, failed or cancelled, so consumers do not each derive it differently. A normally completed call has final_sip_code 200.
termination_reason is a closed list. Match on it. Free text goes to termination_detail, which you read but never match on.
termination_reason values | |
|---|---|
normal_clearing, caller_cancelled, policy_reject | Normal outcomes and plan rejects |
decision_failed, malformed_request, internal_error | Decision and processing failures |
destination_failure, destination_timeout, destinations_exhausted, no_answer_timeout | Egress outcomes |
media_failure, media_negotiation_failed, media_timeout | Media problems |
signaling_timeout, dialog_lost, session_expired, session_negotiation_failed | Signalling and session timer problems |
max_duration, admin_hangup, shutdown, transferred, recording_failed | Operator, lifecycle and feature outcomes |
Per-attempt detail rides on the CDR. Each entry in attempts has the destination, peer ID, timings, outcome (answered, failed, timeout, unreachable, cancelled or abandoned), SIP code and Q.850 cause. Per-peer ASR and NER should be built from these, because events can be dropped under pressure and the CDR cannot.
Loss counters are counts. Packet loss counts are absent when the media engine reported none, and packet_loss is a percentage.
Delivery guarantees
| Setting | Behaviour |
|---|---|
| No spool | Records are queued in memory and retried with backoff, and dropped and counted if the receiver stays down |
| On-disk spool | Every record is appended to disk first, delivery is retried until accepted, and delivery resumes after a restart |
Delivery is at least once. A repeated POST carries a higher delivery_attempt, and receivers deduplicate on call_uuid. A receiver that has already stored a record should treat a redelivery as a success.
A record the receiver refuses outright (400, 413 or 422) is set aside in a rejected file on the node so it does not hold back the records behind it. If refusals become frequent, the SBC holds the head of the queue instead, on the view that the receiver is at fault, and releases the backlog once it recovers. Metrics report both conditions. Once the receiver is fixed, a replay command puts the set-aside records back on the queue.
Events
Events are posted as JSON arrays and cover the call lifecycle: creation, decision, attempts, ringing, early media, answer, establishment, re-INVITEs, transfers, recording, failure and termination, plus media, peer-state and cluster-role changes. Each carries a per-call sequence number and a unique ID. Events can be lost when the queue is full unless a spool is enabled, so use them for live views and alerting and use CDRs for billing.
SIP traces
Every call keeps its complete SIP exchange, both legs and both directions, in memory for a configured age and number of calls, and can be mirrored to a file. Retrieve one by call UUID from the management API or the CLI:
sbcctl trace 0199b4ce-7281-7f24-9c8e-a12b00000001 --full
Without --full it prints a timeline. With it the messages are included.
Audit log
Every state-changing action on a node is recorded: management requests, refused requests, reloads, role changes, provisioning updates, and node start and stop. Each entry names the actor, the action, the target, the parameters with tokens removed and the outcome. Entries are synced to disk, can be mirrored to your event receiver, and carry a per-node sequence number so a gap is visible.
For field-level schemas, see the specification provided on request. Get in touch.