Native FreeSWITCH module to interact with Ultravox SLM over secure WebSockets using libwebsockets.
- FreeSWITCH source tree (build from source).
- libwebsockets development headers (e.g., Ubuntu:
sudo apt-get install libwebsockets-dev). - pkg-config available in PATH.
- Place this directory at
src/mod/applications/mod_ultravox. - Ensure top-level
configure.achas:PKG_CHECK_MODULES([LIBWEBSOCKETS], [libwebsockets])AC_SUBST([LIBWEBSOCKETS_CFLAGS])andAC_SUBST([LIBWEBSOCKETS_LIBS])
- From FS root:
./bootstrap.sh -j && ./configuremake mod_ultravoxmake mod_ultravox-install
- Edit
conf/autoload_configs/mod_ultravox.conf.xml:wss_url: Ultravox realtime endpoint (usewss://).api_key: Use${env:ULTRAVOX_API_KEY}and set the env var for safety.ws_origin: Optional origin header if required by the endpoint.- Timeouts/retry and TLS flags as needed.
- Start:
freeswitch -ncandfs_cli -x "load mod_ultravox". - Commands:
fs_cli -x "ultravox connect"fs_cli -x "ultravox send {\"type\":\"ping\"}"fs_cli -x "ultravox show"fs_cli -x "ultravox disconnect"
- See
docs/PROTOCOL_MAP.mdfor the message shapes used. - Incoming Ultravox frames are translated to CUSTOM events with subclass
ultravox::event.- Inspect via
fs_cliwithevent plain CUSTOM.
- Inspect via
- The current client is a skeleton: it runs an LWS service thread, maintains a send queue, and logs received messages. Extend parsing and event emission per Ultravox protocol.
- Per AGENTS.md: commit and comment all changes, and keep README updated when behavior changes.