Ctrl K
ring2all.com

System Vars Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Categories
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Is System Vars?

System Vars is a FreeSWITCH global configuration module that manages the vars.xml file. These are system-wide variables that control core FreeSWITCH behavior including codecs, security, paths, debugging, and WebRTC settings.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                  System Vars Architecture                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Admin Panel                                                    │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        System Vars                                       │   │
│  │                                                          │   │
│  │  Categories:                                             │   │
│  │  ├─ General Configuration                               │   │
│  │  ├─ Codecs & Media                                      │   │
│  │  ├─ Caller ID & Regional                                │   │
│  │  ├─ Security & TLS                                      │   │
│  │  ├─ WebRTC & Video                                      │   │
│  │  ├─ Debug & Logs                                        │   │
│  │  └─ FreeSWITCH Paths                                    │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Generates XML                                          │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        vars.xml                                          │   │
│  │                                                          │   │
│  │  <X-PRE-PROCESS cmd="set" data="var=value"/>            │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Loaded by FreeSWITCH                                   │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        FreeSWITCH Core                                   │   │
│  │                                                          │   │
│  │  Global variables available:                             │   │
│  │  ${global_codec_prefs}                                  │   │
│  │  ${hold_music}                                          │   │
│  │  ${recordings_dir}                                       │   │
│  │  ...                                                     │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Files

FileDescription
modules/systemVars/Frontend module
vars.xmlGenerated FreeSWITCH configuration
---

2. Module Overview (Commercial/Business)

Business Value

System Vars provides centralized FreeSWITCH configuration:

Without System VarsWith System Vars
Edit XML filesWeb interface
SSH to serverBrowser-based
Error-proneValidated
Expert onlyAdmin-friendly

Use Cases

  1. Codec Configuration
- Set global codec preferences

- Configure SRTP settings

  1. Path Management
- Configure recording locations

- Set voicemail directories

  1. Security Settings
- TLS version/ciphers

- SRTP encryption

  1. WebRTC/Video
- ICE servers

- Video bandwidth

Feature Highlights

FeatureBenefit
Web InterfaceNo SSH needed
CategoriesOrganized settings
XML PreviewSee before applying
Reset OptionRestore defaults
ValidationPrevent errors
DocumentationTooltips explain each
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Configure global codec preferences
  • Set default caller ID
  • Configure TLS/security settings
  • Set WebRTC ICE servers
  • Define system paths
  • Enable debugging
  • Preview generated XML

System Vars Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              System Vars                                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Configure FreeSWITCH system variables                          │
│                                                                 │
│  [Preview XML] [Download XML] [Reset All] [Save]               │
│                                                                 │
│  ▼ General Configuration                                        │
│  ├─ Language Sound Path: [/usr/share/freeswitch/sounds/en]    │
│  ├─ Hold Music: [local_stream://moh                  ]        │
│  ├─ Use SIP Profile: [internal ▼]                              │
│  └─ Enable Cache: ✓                                            │
│                                                                 │
│  ▼ Codecs & Media                                               │
│  ├─ Global Codec Prefs: [OPUS,PCMU,PCMA,G722         ]        │
│  ├─ Outbound Codec Prefs: [PCMU,PCMA,G722            ]        │
│  ├─ Secure RTP Mode: [optional ▼]                              │
│  ├─ RTP Timeout: [300                                ]        │
│  └─ RTP Hold Timeout: [1800                          ]        │
│                                                                 │
│  ▶ Caller ID & Regional Settings                                │
│  ▶ Security & TLS                                               │
│  ▶ WebRTC & Video                                               │
│  ▶ Debug & Logs                                                 │
│  ▶ FreeSWITCH Paths                                             │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

XML Preview

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              XML Preview                                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Generated vars.xml configuration for FreeSWITCH               │
│                                                                 │
│  <include>                                                      │
│    <X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>│
│    <X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,PCMU"/>│
│    <X-PRE-PROCESS cmd="set" data="recordings_dir=/var/recordings"/>│
│    ...                                                          │
│  </include>                                                     │
│                                                                 │
│  [Download XML] [Close]                                         │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Preview First: Use XML Preview before saving.
TIP
Modified Indicator: Yellow dot shows changed values.
CAUTION
Restart Required: Changes require FreeSWITCH restart.

---

4. Configuration Categories

General Configuration

SettingDescription
Language Sound PathAudio prompts location
Hold MusicDefault MOH stream
Use SIP ProfileDefault SIP profile
Enable CacheCache global vars

Codecs & Media

SettingDescription
Global Codec PrefsInbound codec order
Outbound Codec PrefsOutbound codec order
Secure RTP ModeSRTP enforcement
RTP TimeoutInactivity timeout
RTP Hold TimeoutHold timeout
RTP Liberal DTMFAllow both DTMF methods

Caller ID & Regional

SettingDescription
Caller ID NameDefault outbound name
Caller ID NumberDefault outbound number
Country CodeDialing country code
Default CountryDialplan country
Default Area CodeLocal area code

Security & TLS

SettingDescription
SIP TLS VersionAllowed TLS versions
SIP TLS CiphersCipher list
RTP Secure Media SuitesSRTP ciphers
RTP SDES SuitesSDES ciphers

WebRTC & Video

SettingDescription
WebRTC ICE ServersSTUN/TURN servers
WebRTC ICE TimeoutICE gathering timeout
Suppress Comfort NoiseCNG for WebRTC
Max Video Bandwidth InInbound video limit
Max Video Bandwidth OutOutbound video limit
Video Mute ImageMuted video PNG
No Avatar ImageMissing avatar PNG

Debug & Logs

SettingDescription
Console Log LevelLog verbosity
Call DebugVerbose call debug

FreeSWITCH Paths

SettingDescription
Base DirectoryFS installation root
Configuration DirectoryXML configs
Logs DirectoryLog files
Recordings DirectoryCall recordings
Storage DirectoryGeneral storage
Voicemail DirectoryVoicemail files
Scripts DirectoryLua scripts
Sounds BaseAudio prompts
Certificates DirectoryTLS certs
---

5. Settings Reference

Common Global Variables

VariableExamplePurpose
global_codec_prefsOPUS,PCMU,PCMAInbound codecs
outbound_codec_prefsPCMU,PCMAOutbound codecs
hold_musiclocal_stream://mohDefault MOH
recordings_dir/var/recordingsRecording path
rtp_secure_mediaoptionalSRTP mode
media_timeout300RTP timeout

SRTP Modes

ModeBehavior
trueAlways require SRTP
optionalUse if available
falseNever use SRTP

Log Levels

LevelDescription
0Console only
1Alert
2Critical
3Error
4Warning
5Notice
6Info
7Debug
---

6. Common Scenarios & Examples

Scenario 1: Configure Codecs

  1. Expand "Codecs & Media"
  2. Set Global Codec Prefs = OPUS,PCMU,PCMA,G722
  3. Set Outbound Codec Prefs = PCMU,PCMA
  4. Save and restart FS

Scenario 2: Enable SRTP

  1. Expand "Codecs & Media"
  2. Set Secure RTP Mode = true
  3. Expand "Security & TLS"
  4. Set RTP Secure Media Suites
  5. Save and restart

Scenario 3: WebRTC Setup

  1. Expand "WebRTC & Video"
  2. Set WebRTC ICE Servers = stun:stun.l.google.com:19302
  3. Set ICE Timeout = 5000
  4. Enable Suppress Comfort Noise
  5. Save and restart

NOTE

WebRTC TLS termination is handled by Nginx on port 443 (wss://domain/ws). These ICE/STUN settings affect media negotiation only.

Scenario 4: Enable Debug

  1. Expand "Debug & Logs"
  2. Set Console Log Level = 7 (Debug)
  3. Enable Call Debug
  4. Save and restart
  5. Check logs

---

7. Limitations & Important Notes

Technical Notes

NOTE
vars.xml: This generates the FreeSWITCH vars.xml file.
NOTE
Global Scope: These are system-wide variables.
WARNING
Restart Required: Most changes require FreeSWITCH restart.

Best Practices

  1. Preview First: Always preview XML before saving
  2. Backup: Download XML before major changes
  3. Test Changes: Verify after restart
  4. Document Changes: Note what you changed
  5. Minimal Changes: Only change what you need

Path Variables

IMPORTANT

Path variables must point to valid directories. Invalid paths can prevent FreeSWITCH from starting.

---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
FS won't startInvalid pathCheck path variables
Codec issuesWrong prefsVerify codec list
No SRTPMode = falseSet rtp_secure_media
WebRTC failsNo ICE serversConfigure ICE servers
No audioWrong codecsCheck codec compatibility

Validate Configuration

Bash
# Check vars.xml syntax
fs_cli -x "global_getvar all"

# Verify specific variable
fs_cli -x "global_getvar global_codec_prefs"

# Reload XML
fs_cli -x "reloadxml"

Check Paths

Bash
# Verify directories exist
ls -la ${recordings_dir}
ls -la ${voicemail_dir}
ls -la ${sounds_base}

---

9. Glossary

TermDefinition
vars.xmlFreeSWITCH global variables file
Global VariableSystem-wide configuration value
Codec PrefsOrdered codec preference list
SRTPSecure Real-time Transport Protocol
ICEInteractive Connectivity Establishment
SDESSession Description Protocol Security
X-PRE-PROCESSFreeSWITCH preprocessor directive
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
System Varsℹ️ Configuration module - generates vars.xml for FreeSWITCH
System Vars is a configuration module. Settings are stored and used to generate the FreeSWITCH vars.xml file. No Lua handlers are used - variables are loaded by FreeSWITCH core.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?