Skip to main content
Version: 0.9.17-patch2

Application and call-flow logging

Use this page to understand what is logged during a call’s application and media path, what each log level means, and how to correlate those logs with SIP signaling. It covers TelSys (voice PBX), TelPro (SIP edge), and RTPEngine (media).

For JSON field names, SigNoz queries, and per-service *_LOG_LEVEL variables, see Monitoring in SigNoz. For SIP ladder captures and response codes, see SIP signaling reference.

Purpose

Structured logs let operators reconstruct:

  • Call lifecycle on the voice PBX (answer, AI session, hangup, transfer)
  • Edge routing and call-control outcomes (trunk/number selection, outbound transfer, BYE handling, failover)
  • Media quality and media-layer failures (MOS, ICE/DTLS/SRTP, DTMF)

Together with the Debug SIP ladder, these logs support end-to-end investigation of a single conversation.

Log levels

All structured logs use lowercase Pino-style labels:

LevelMeaning
errorFailed call path or hard failure (auth reject, media/control failure).
warnDegraded but recoverable (failover, sticky miss, non-SUCCESS transfer, poor MOS).
infoNormal lifecycle milestones (call start/end, successful route, hangup).
debugTroubleshooting detail (session teardown chatter, temporary verbosity).
traceRare deep diagnostics.
fatalProcess- or edge-level unrecoverable failure.

Control verbosity with the global LOG_LEVEL or service overrides such as TELSYS_LOG_LEVEL, TELPRO_LOG_LEVEL, RTPENGINE_LOG_LEVEL, and TELPHI_LOG_LEVEL. See Per-service log levels and the environment variable index.

SIP ladder capture is independent of general log verbosity: lowering info/warn filtering does not remove sip_message captures used by the Debug SIP ladder.

Correlation

Use the same identifiers across TelPro, TelSys, media, and application logs:

IdentifierUse
trace_idDistributed trace across edge, voice, and app logs.
sipCallIdSIP Call-ID (also shown as call id in TelWeb / Debug).
transactionIdTOBi per-conversation correlation id. Stable across all BOT requests, SIP headers, and spans. See Transaction correlation.
ConversationTelWeb conversation id when investigating from a call detail page.

Start from TelWeb Conversations → call detail → Debug (Logs / Spans / SIP ladder), then search SigNoz with the same trace_id, Call-ID, or transactionId.

What is logged

TelSys (voice PBX)

Call and AI-session lifecycle events (typically info):

AreaExamplesTypical level
Call entryCall start, channel created, channel answerinfo
AI sessionSession enter / exit with the voice AI appinfo
HangupHangup with cause / optional hangup reasoninfo
TransferTransfer initiated; transfer resultinfo / warn if not SUCCESS
Dialplan errorsError-handling pathserror

Operational bootstrap and config notes use operational log records (see Structured logging schema).

TelPro (SIP edge)

Routing and call-control outcomes (not the raw SIP frames — those are in the SIP ladder):

AreaExamplesTypical level
Ingress / routingTrunk identified, number/customer route, server selectedinfo
RejectsUnknown trunk, TLS/auth failure, unverified internal sourcewarn / error
Outbound / transferOutbound or direct-URI transfer detected or rejectedinfo / warn
BYE / disconnectCarrier-bound BYE routing; loop prevention when edge misroutesinfo / warn / error
FailoverTelSys server failure, failover attempt or abortwarn / error
Media control (via TelPro)RTPEngine offer / answer success or failureinfo / error

RTPEngine (media)

Data-plane media outcomes. Control-plane offer/answer commands are logged from TelPro (see SigNoz monitoring).

AreaExamplesTypical level
Call qualityEnd-of-call stats (rtpengine_call_stats: MOS, jitter, loss)info; warn / error when MOS is poor
Media errorsICE / DTLS / SRTP failureserror
Resource errorsPort / socket exhaustionerror
Control errorsUnknown call, offer/answer rejected at the media engineerror
DTMFRFC4733 media DTMF eventsinfo
Session endMedia session teardown noticesdebug

Payload and detail policy

PolicyBehavior
Metadata alwaysTargets, status codes, event names, and handling labels (for example bot / STT / TTS) are logged when available.
Bodies on failureRequest/response payloads are included when a response indicates failure.
Optional fuller payloadsBroader payload logging can be enabled for short support windows; expect higher volume and cost.
PIIRedaction before SigNoz export is controlled separately — see PII redaction.

Security-relevant events

These appear as structured warn or error logs and are searchable in SigNoz (filter by service and event text):

  • Unknown or unauthorized trunk / source
  • Inbound authentication or TLS peer verification failures
  • Outbound or transfer attempts from an unverified internal source
  • BYE self-relay blocked (misrouted disconnect toward the platform instead of the carrier)

Where to look

SurfaceBest for
TelWeb → conversation → DebugPer-call logs, spans, and SIP ladder for one conversation.
SigNoz LogsCross-call search by trace_id, Call-ID, level, or event.
SIP signaling referenceWhich SIP messages were captured and what response codes mean.
Monitoring in SigNozSchema keys, log-level env vars, dashboards, and PII.

SCRUM-738 / VGWK-36 coverage

What Vodafone asked for on application and integration flow logging, and where it lands today. Use this table when reviewing C2 / SignOz — do not treat an unused Kamailio flowId field as a gap unless VF asks for it.

RequirementStatusWhere to verify
Reconstruct application-level bot / STT / TTS requests for a conversationShippedTelPhi component such as vodafone_tobi_llm, STT, TTS; TelWeb Debug Logs
Correlate application logs with SIP signalingShippedSame trace_id and SIP Call-ID (sipCallId / callId) on TelPro recordKind=sip_message and TelPhi logs
Documented log levels and payload policyShippedLog levels and Payload and detail policy above; *_LOG_LEVEL in the env-var index
Always log metadata (target, status, bot, STT/TTS handling)ShippedStructured fields on TelPhi / TelAPI system logs
Log request/response payload on errorShippedPayload and detail policy
Security eventsShippedSecurity-relevant events; Security event export
Single correlation id across componentsShippedtrace_id originates at TelPro; transactionId provides a second stable per-conversation id on the managed LLM path. See Transaction correlation.
Transaction-style BOT/SIP/TTS/STT eventsShippedtransactionId propagated as OTel span attribute on all pipeline spans and log-to-span spans. See Transaction correlation.
Applicable to all components (not only RTP / TelPro / TelSys)PartialNode services (TelPhi, TelAPI, TelWeb, Tasker, Scaler) export OTEL when OTEL_ENABLED=true. audioproc and portal do not have native OTEL

VF transaction-field mapping

VF propertyDelphi field / equivalent
category (STT / TTS / BOT / SIP)logType plus component / serviceType (stt, tts, llm, telephony / recordKind=sip_message)
serviceservice / service.name (telpro, telsys, telphi, telapi, telweb, tasker, scaler)
operationaction or operation on the structured record
server-nameservice.instance.id / instance hostname
transaction-IdtransactionId — per-conversation UUID generated by the TOBi LLM component, propagated through Redis, SIP headers, and OTel spans. See Transaction correlation.
botNameApp / flow name on the conversation and TelPhi context
conversation-idDelphi conversationId (TelWeb conversation)
provider-conversation-idtobiConversationId on TelPhi / CDR (not on raw Kamailio SBC lines)

Conversation and call identifiers (VGWK-62)

Four distinct identifiers appear in Delphi logs. They are never interchangeable:

IdentifierLog fieldWhat it isWhere it appears
Delphi conversation idconversationIdThe TelWeb conversation record. For voice calls this equals the voice-PBX channel id.TelAPI webhook lines (tobi.callback.*), TelPhi call context, CDR
TOBi conversation idtobiConversationIdThe conversation id issued by the TOBi platform (conversation.identifier.id) at create time.Every TelAPI TOBi webhook line once the session is loaded, TelPhi call context and DTMF/log metadata, CDR
Delphi call idcallIdThe resumable call/session id (X-Call-ID), keying voiceai:calls:{id} in Redis.TelAPI, TelPhi, TelPro structured lines (xCallId)
SIP Call-IDsipCallId (TelPro also callId)The SIP dialog Call-ID header of one SIP leg.TelPro / Kamailio recordKind=sip_message lines, SIP ladder
Why SBC logs showed the "wrong" conversation id

On raw SBC (Kamailio) lines, callId is the SIP dialog Call-ID, not a conversation id, and the TOBi conversation id is not available at the SIP edge. To follow one conversation across layers, pivot on transactionId or callId (X-Call-ID); the tobiConversationId joins in on the TelAPI/TelPhi lines of the same conversation. All TelAPI TOBi webhook log lines — including auth failures and error responses — carry channelId, conversationId, and (once the callback session is resolved) tobiConversationId.

| logpoint | Directional action values (e.g. stream start/complete) rather than request-in / response-out literals | | verb / url | Logged on outbound HTTP integrations when the client records them | | call-id | SIP Call-ID (callId / sipCallId) | | payload / headers | On error, or when fuller payload logging is enabled | | status / status-code | status plus HTTP/SIP code when applicable | | timestamp | timestamp (epoch ms in pino; ISO in some telephony JSON) | | duration | durationMs / latencyMs on responses | | trace-id | trace_id |

Cross-service logging schema (spike)

Canonical Node service names: telpro, telsys, telphi, telapi, telweb, tasker, scaler.

Telephony (Kamailio / TelSys) uses a parallel JSON shape with recordKind:

recordKindMeaning
logOperational / lifecycle event
traceCall-lifecycle span-like event (TelSys dialplan)
sip_messageCaptured SIP frame for the Debug ladder

App logs from @delphi/logger use logType values such as conversation, model_usage, system, telephony, audio, error, audit, and cdr, plus injected trace_id / span_id. See Service logs and Monitoring in SigNoz.

Please review this schema with VF. Agreed gaps become follow-up stories — this page is the spike deliverable, not a new logger.