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
# Active Call Configuration
#
# CLI Options (override config file):
# --conf <path> : Load configuration from file
# --http <addr:port> : HTTP server bind address
# --sip <addr:port> : SIP server bind address
# --handler <value> : Quick handler setup
# - URL (http://...) for webhook handler
# - .md file for playbook default handler
#
# Examples:
# ./active-call --handler https://api.example.com/webhook
# ./active-call --handler default.md --sip 0.0.0.0:13050
= "0.0.0.0"
= "0.0.0.0:8080"
= 13050
# http_gzip = true
= "debug"
#log_file = "/tmp/rustpbx.log"
# Paths can include a trailing * to skip whole subtrees
# http_access_skip_paths = ["/health", "/metrics*"]
= "./config/mediacache"
# 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"
# Invitation handler - handles incoming SIP invitations
# Option 1: Webhook handler - forward invitations to HTTP endpoint
# [handler]
# type = "webhook"
# url = "http://localhost:8090/webhook"
# method = "POST"
# Option 2: Playbook handler - route calls to playbooks based on caller/callee patterns
# [handler]
# type = "playbook"
# default = "default.md" # optional: default playbook when no rules match
#
# [[handler.rules]]
# caller = "^\\+1\\d{10}$" # regex pattern for caller number
# callee = "^sip:support@.*" # regex pattern for callee number
# playbook = "support.md" # playbook file to use
#
# [[handler.rules]]
# caller = "^\\+86\\d+" # pattern for Chinese numbers
# playbook = "chinese.md" # optional: only match caller
#
# [[handler.rules]]
# callee = "^sip:sales@.*" # optional: only match callee
# playbook = "sales.md"
# [handler]
# type = "webhook"
# url = "http://localhost:8090/webhook"
# method = "POST"
[]
= true
= true
[]
= "local"
= "./config/cdr"
# [[register_users]]
# server = "127.0.0.1:5060" # Your Asterisk server
# username = "1002" # SIP extension
# disabled = false # Set to true to disable this account
# [register_users.credential]
# username = "1002"
# password = "" # Leave empty for IP-based auth