Expand description
The agent worker: one process, one registered UA (with catchall), driven
over stdio with the proto framed protocol. Because each worker is its own
process it binds its own SIP socket, so the provider routes incoming calls to
this registration by contact address — which in-process multi-UA cannot do
(one shared socket, and the request-URI user need not identify the UA, so
there’s no way to demux).
Channels: stdin carries the crate::AgentConfig handshake (first frame) then
command/query control frames + inbound audio frames; stdout carries
event/reply/header control frames + received-audio frames (a single writer
thread serialises them, so frames never interleave); stderr carries logs /
SIP traces.
Functions§
- run
- Run the worker: read the config handshake, spawn the backend, then pump
stdin (commands/queries) and stdout (events/replies/headers) until stdin
closes (EOF) or a
Shutdowncommand arrives.