pub struct SipConfig {
pub server: String,
pub login: String,
pub password: String,
pub caller_id: String,
pub public_ip: Option<Ipv4Addr>,
pub sip_port: Option<u16>,
pub rtp_port_base: u16,
pub rtp_port_tries: u16,
}Expand description
Configuration for a SipAgent (one trunk).
Fields§
§server: StringRegistrar / proxy SIP URI, e.g. sip:sip.example.com.
login: StringSIP auth username (the trunk login).
password: StringSIP auth password.
caller_id: StringCaller-ID (E.164 or trunk number) used as the From user on outbound calls.
public_ip: Option<Ipv4Addr>Public IP to advertise in Via/Contact/SDP for NAT (None → use the bound
local interface address). Telephony trunks behind NAT need this set.
sip_port: Option<u16>Local SIP signaling port to bind (None → [DEFAULT_SIP_PORT]).
rtp_port_base: u16First RTP port to probe when binding call media (even, RFC 3550; the scan
steps up by 2). Use DEFAULT_RTP_PORT_BASE unless the deployment pins it.
rtp_port_tries: u16Number of even ports to probe from rtp_port_base before failing to bind.
Use DEFAULT_RTP_PORT_TRIES unless a constrained public UDP port budget
needs a small range (this caps concurrent call media to rtp_port_tries).