Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ringoflow

ringo-flow is a declarative telephony scenario test runner for baresip. You write a scenario as a small Rhai script — bring up SIP agents, place and answer calls, assert on call state, DTMF, audio and HTTP — and run it headlessly, e.g. in CI.

#![allow(unused)]
fn main() {
let dom = env("SIP_DOMAIN");

let a = agent("A", #{
    username: env("A_USER"),
    domain: dom,
    password: env("A_PASS"),
});
let b = agent("B", #{
    username: env("B_USER"),
    domain: dom,
    password: env("B_PASS"),
});

a.register();
b.register();
await_until(|| assert(b.registered).is_true(), "10s");

a.dial(b);
await_until(|| assert(b.state).equals(State::Ringing), "15s");
b.accept();
await_until(|| assert(a.state).equals(State::Established));
a.hangup();
}

Highlights

  • Headless — virtual audio, no devices needed; runs on a build server.
  • Suitessetup / scenario / teardown, each scenario isolated with fresh agents. Select with --scenario, tag with --tag / --exclude-tag, disable with skip, focus with only.
  • Audio — send tones / files and assert what the other side receives (Goertzel tone detection).
  • HTTP — call backend APIs mid-scenario, and stand up a built-in mock server to test webhook-driven call control.

Next steps

The Rust library API is on docs.rs.