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
73 lines (58 loc) · 1.39 KB
/
Copy pathconfig.toml.example
File metadata and controls
73 lines (58 loc) · 1.39 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
# A example config file
# mv config.toml.example config.toml
# cargo run . --bin rustpbx --conf config.toml
http_addr = "0.0.0.0:8080"
log_level = "info"
#log_file = "/tmp/rustpbx.log"
stun_server = "stun.l.google.com:19302"
recorder_path = "/tmp/recorders"
media_cache_path = "/tmp/mediacache"
[ua]
addr="0.0.0.0"
udp_port=13050 # don't use 5060
[proxy]
modules = ["acl", "auth", "registrar", "call"]
addr = "0.0.0.0"
udp_port = 15060
registrar_expires = 60
ws_handler= "/ws"
# ACL rules
acl_rules = [
"allow 10.0.0.0/8",
"deny 0.123.4.0/16",
"allow all",
"deny all"
]
[ua.handler]
type = "webhook"
url = "http://localhost:8090/webhook"
method = "POST"
# MediaProxy configuration
[proxy.media_proxy]
mode = "auto"
rtp_start_port = 20000
rtp_end_port = 30000
# external_ip = "192.168.1.1" # Set to your external IP
# force_proxy = ["192.168.1.100"] # Optional: IP addresses to always proxy
[proxy.user_backend]
type = "memory"
users = [
{ username = "bob", password = "123456", realm = "127.0.0.1" },
{ username = "alice", password = "123456" },
]
[callrecord]
type = "local"
root = "/tmp/cdr"
[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"