Skip to content

TopCS/mod_ultravox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

mod_ultravox

Native FreeSWITCH module to interact with Ultravox SLM over secure WebSockets using libwebsockets.

Prerequisites

  • FreeSWITCH source tree (build from source).
  • libwebsockets development headers (e.g., Ubuntu: sudo apt-get install libwebsockets-dev).
  • pkg-config available in PATH.

Build & Install (inside FreeSWITCH tree)

  • Place this directory at src/mod/applications/mod_ultravox.
  • Ensure top-level configure.ac has:
    • PKG_CHECK_MODULES([LIBWEBSOCKETS], [libwebsockets])
    • AC_SUBST([LIBWEBSOCKETS_CFLAGS]) and AC_SUBST([LIBWEBSOCKETS_LIBS])
  • From FS root:
    • ./bootstrap.sh -j && ./configure
    • make mod_ultravox
    • make mod_ultravox-install

Configure

  • Edit conf/autoload_configs/mod_ultravox.conf.xml:
    • wss_url: Ultravox realtime endpoint (use wss://).
    • 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.

Use

  • Start: freeswitch -nc and fs_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"

Protocol Mapping

  • See docs/PROTOCOL_MAP.md for the message shapes used.
  • Incoming Ultravox frames are translated to CUSTOM events with subclass ultravox::event.
    • Inspect via fs_cli with event plain CUSTOM.

Notes

  • 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.

mod_ultravox

About

Freeswitch Ultravox.ai module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published