active-call 0.3.25

A SIP/WebRTC voice agent
Documentation
# 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

addr = "0.0.0.0"
http_addr = "0.0.0.0:8080"
udp_port = 13050
# 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"

# 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"

[recording]
enabled = true
auto_start = true

[callrecord]
type = "local"
root = "./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