Skip to content

Calls, Telegram integration, stereo, and volume sync

VK/OK calls: okcall

S97 decompresses /usr/bin/okcall.lzma to /tmp/okcall when needed, then starts it with:

  • PULSE_SINK=call
  • PULSE_SOURCE=call_src
  • --logtosyslog

The local decompressed copy used for analysis is firmware/analysis/okcall.

okcall listens on /tmp/okcall.sock and implements domestic/outgoing/incoming and baby-monitor calls. It uses WebRTC audio processing, WebSocket signaling, and OK APIs including:

  • /method/messages.getCallToken
  • /method/messages.getAnonymCallToken
  • /method/messages.getCallPreview

IPC events cover session invite/accept/connect/close, microphone state, participants, audio activity, active speaker, invalid tokens, and call rating. Agent commands include makeCall, stopCall, acceptCall, declineCall, enableCalls, and disableCalls. https://vk.ru/call/join/ appears in the external-call flow. Actual access tokens are not included in the docs.

Telegram: tgclient

/tmp/tgclient -ipc-fd 44 is spawned by voice-agent rather than a standalone S97 script. Its compressed stock image is /usr/bin/tgclient.lzma; the local analysis copy is firmware/analysis/tgclient.

It embeds TDLib and stores its database under /data/voice-agent/tdlib. Voice-agent exposes a bounded subset through TgIpc: authentication phone/code/password and resend flows, contacts, and telegram_get_contacts/telegram_send_message. TDLib also contains group-call and voice-note support, but those APIs are not evidence that Mini enables them; they are not part of the recovered voice-agent IPC surface.

The inherited IPC file descriptor is not a network listener. TDLib's credentials/database are sensitive and were not dumped into narrative pages.

Stereo: stereoctl

S96 starts stereoctl -logtosyslog. Observed TCP listener: port 20101. Local control also uses /tmp/stereoctl.sock.

Architecture:

  • Avahi neighbor discovery and peer checks;
  • master/slave roles and pair ID;
  • snapserver on the master and snapclient on the slave;
  • front_left / front_right channel assignment;
  • synchronized master/slave volume;
  • persistent peer at /data/voice-agent/stereo_peer_device_id.txt.

Snapcast input is pipe:///tmp/snapfifo?name=default&mode=read. Defaults recovered from flag registration: 1000 ms buffer, 40 ms chunks, FLAC codec, *:info log filtering, and process priority −11. A slave rejects a connect request when it is already a master or has another peer; pair ID is persisted for subsequent discovery. Pairing feedback uses Pairing23LEFT.mp3, Pairing23RIGHT.mp3, CC_*_diodes.json, and stereopair_success.opus.

ntp-ibb-volume-syncer

S51 starts this PulseAudio/ALSA utility. It opens mixer device hw:0, control TV-Set, subscribes to Pulse sink changes, and applies their volume to that hardware control. Its role is PulseAudio-to-hardware volume synchronization; the name should not be confused with NTP time synchronization. No evidence shows it setting the system clock.