ringo_core/account.rs
1/// A SIP account to register, independent of any ringo profile/config. Callers
2/// (the softphone or the scenario runner) build this from their own source.
3#[derive(Debug, Clone, Default)]
4pub struct Account {
5 pub username: String,
6 pub domain: String,
7 pub password: String,
8 pub display_name: Option<String>,
9 pub transport: Option<String>,
10 pub auth_user: Option<String>,
11 pub outbound: Option<String>,
12 pub stun_server: Option<String>,
13 pub media_enc: Option<String>,
14 pub regint: Option<u32>,
15 pub mwi: bool,
16 /// DTMF transmission mode (`rtpevent` / `info` / `auto`). `info` sends DTMF as
17 /// SIP INFO, independent of the RTP audio stream — needed where the audio TX
18 /// may be idle (e.g. headless with no clocked source). `None` keeps the
19 /// backend's default.
20 pub dtmf_mode: Option<String>,
21}
22
23/// Overrides for auto-detected backend settings. Any `None`/empty field
24/// is auto-detected at spawn time.
25#[derive(Debug, Clone, Default)]
26pub struct BackendOptions {
27 pub audio_driver: Option<String>,
28 pub audio_player_device: Option<String>,
29 pub audio_source_device: Option<String>,
30 pub audio_alert_device: Option<String>,
31 pub sip_cafile: Option<String>,
32 /// `None` = auto-detect; `Some("")` = explicitly disable.
33 pub sip_capath: Option<String>,
34 /// Max simultaneous calls (`call_max_calls`). `None` = 4.
35 pub max_calls: Option<u32>,
36 /// Auto-hold the active call when another comes up / the user switches
37 /// (`call_hold_other_calls`). `None` = on. The scenario runner turns this
38 /// off so a test keeps explicit control over hold/resume.
39 pub hold_other_calls: Option<bool>,
40 /// Outgoing-call ring timeout in seconds (`call_local_timeout`). `None` = 120.
41 pub local_timeout_s: Option<u32>,
42 /// SIP `User-Agent` string passed to `ua_init` (e.g. `ringo-phone/0.11.0`).
43 /// `None` = bare `ringo`. Set by the binary so it carries its own version.
44 pub user_agent: Option<String>,
45 /// Arbitrary extra config lines appended at the end (key, value).
46 pub extra: Vec<(String, String)>,
47 /// Capture the full call's sent + received audio in-process (for the
48 /// scenario runner's `--save-audio`). When off, only a short rolling window
49 /// is retained for `verify-audio`. The softphone leaves this off.
50 pub record_audio: bool,
51}