forked from restsend/rustpbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml.example
More file actions
164 lines (137 loc) · 4.68 KB
/
config.toml.example
File metadata and controls
164 lines (137 loc) · 4.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# A example config file
# mv config.toml.example config.toml
# cargo run . --bin rustpbx --conf config.toml
http_addr = "0.0.0.0:8080"
# http_gzip = true
log_level = "debug"
#log_file = "/tmp/rustpbx.log"
# Paths can include a trailing * to skip whole subtrees
# http_access_skip_paths = ["/health", "/metrics*"]
media_cache_path = "./config/mediacache"
# SQLite database (default)
database_url = "sqlite://rustpbx.sqlite3"
# MySQL database example:
# database_url = "mysql://root@localhost:3306/rustpbx"
# external IP address for SIP signaling and media
# if server is behind NAT, set your public IP here (without port)
# external_ip = "1.2.3.4"
# rtp_start_port = 20000
# rtp_end_port = 30000
# setup your STUN/TURN servers here, for webrtc web clients
# [[ice_servers]]
# urls = ["stun:stun.l.google.com:19302"]
# [[ice_servers]]
# urls = ["turn:restsend.com:3478"]
# username = "user"
# credential = "pass"
# Root directory for all runtime-generated data files.
# All sub-paths below are derived from this unless individually overridden.
# storage_dir = "storage"
[addons.wholesale]
# Override billing archive CSV directory (default: {storage_dir}/wholesale/bills)
# bills_dir = "storage/wholesale/bills"
[console]
#session_secret = "please_change_me_to_a_random_secret"
base_path = "/console"
# API prefix for REST endpoints (default: "/api")
# All REST API endpoints will be prefixed with this path
api_prefix = "/api"
# allow self-service administrator signup after the first account
allow_registration = false
# set to true to force Secure cookie attribute, otherwise it is auto-detected based on request
secure_cookie = false
[proxy]
modules = ["acl", "auth", "presence", "registrar", "call"]
addr = "0.0.0.0"
udp_port = 15060
registrar_expires = 60
ws_handler= "/ws"
media_proxy = "auto"
# Base directory for generated routing/trunk/ACL files
generated_dir = "./config"
routes_files = ["config/routes/*.toml"]
trunks_files = ["config/trunks/*.toml"]
addons = ["acme", "wholesale"]
# Don't responed the request when user not existed (slience for spam scanner)
ensure_user = true
# ACL rules
acl_rules = [
# "allow 10.0.0.0/8",
# "deny 0.123.4.0/16",
"allow all",
"deny all"
]
acl_files = ["config/acl/*.toml"]
[[proxy.user_backends]]
type = "memory"
users = [
{ username = "bob", password = "123456" },
{ username = "alice", password = "123456" },
]
[[proxy.user_backends]]
type = "extension"
[recording]
enabled = true
auto_start = true
[callrecord]
type = "local"
root = "./config/cdr"
# SipFlow: Unified SIP+RTP recording system
# [sipflow]
# type = "local"
# root = "./config/sipflow"
# subdirs = "daily" # "none" | "daily" | "hourly"
# Local: SQLite + structured file (default settings)
# type = "local"
# root = "./config/sipflow"
# flush_count = 1000
# flush_interval_secs = 5
# id_cache_size = 8192
# Remote
# type = "remote"
# udp_addr = "192.168.1.100:3000"
# http_addr = "http://192.168.1.100:3001"
# timeout_secs = 10
# Ringback tone configuration
# [dialplan.ringback]
# Ringback mode: "local" | "passthrough" | "auto" | "none"
# - local: Always play local ringback file (ignore callee early media)
# - passthrough: Always forward callee's early media (silent if no early media)
# - auto: Smart selection - passthrough if early media exists, otherwise play local (default)
# - none: Disable ringback (standard 180 Ringing, no audio)
# mode = "auto"
# Local ringback audio file (used in local and auto modes)
# Supports WAV, MP3, raw audio formats, and HTTP/HTTPS URLs
# audio_file = "/sounds/company_ringback.mp3"
# audio_file = "https://cdn.example.com/ringback.wav"
# Whether to loop the ringback audio (default: true)
# loop_playback = true
# Whether to wait for ringtone playback completion (default: false)
# wait_for_completion = false
# [proxy.trunks.wuhoo]
# dest = "sip:123.456.789.00:1234"
# [[proxy.routes]]
# name = "default"
# priority = 1
# dest = "wuhoo"
# [proxy.routes.match]
# "to.user" = "^\\+.*"
# [proxy.routes.rewrite]
# "to.user" = "+{1}"
# "to.host" = "123.456.789.00:1234"
# "from.user" = "12345"
# "from.host" = "123.456.789.00:1234"
# ── Commercial Addon Licenses ─────────────────────────────────────────────────
# Map each commercial addon to a named license key, then supply the actual key
# values under [licenses.keys]. The UI's "Verify" button on the Addon detail
# page will write these sections automatically.
#
# [licenses]
# [licenses.addons]
# wholesale = "enterprise" # addon id -> key name
# endpoint-manager = "enterprise"
# voicemail = "basic"
#
# [licenses.keys]
# enterprise = "LICENSE-KEY-XXXX-XXXX-XXXX"
# basic = "LICENSE-KEY-YYYY-YYYY-YYYY"