Call Us Today! 877.742.2583




Page tree
Skip to end of metadata
Go to start of metadata

About

A list of command line switches to start FreeSWITCH™ in different modes and configurations.The options available may differ, depending on the operating system. Use the following command to see what is available.

/usr/local/freeswitch/bin/freeswitch -help 

In addition to using the command line, options may also be set with the FREESWITCH_OPTS environment variable.

 

 Click here to expand Table of Contents

Run FreeSWITCH

Run in foreground

$ freeswitch

Run in background

$ freeswich -nc

Argument List

These are the optional arguments you can pass to freeswitch:

FreeSWITCH startup switches
-waste                 -- allow memory waste
-no-auto-stack         -- don't adjust thread stack size
-core                  -- dump cores
-help                  -- print this message
-version               -- print the version and exit
-rp                    -- enable high(realtime) priority settings
-lp                    -- enable low priority settings
-np                    -- enable normal priority settings (system default)
-vg                    -- run under valgrind
-nosql                 -- disable internal SQL scoreboard
-heavy-timer           -- Heavy Timer, possibly more accurate but at a cost
-nonat                 -- disable auto NAT detection
-nonatmap              -- disable auto NAT port mapping
-nocal                 -- disable clock calibration
-nort                  -- disable clock clock_realtime
-stop                  -- stop freeswitch
-nc                    -- no console and run in background
-ncwait                -- no console and run in background, but wait until the system is ready before exiting (implies -nc)
-c                     -- output to a console and stay in the foreground (default behavior)
UNIX-like only
-nf                    -- no forking
-u [user]              -- specify user to switch to
-g [group]             -- specify group to switch to
-ncwait                -- do not output to a console and background but wait until the system is ready before exiting (implies -nc)
Windows-only
-service [name]        -- start freeswitch as a service, cannot be used if loaded as a console app
-install [name]        -- install freeswitch as a service, with optional service name
-uninstall             -- remove freeswitch as a service
-monotonic-clock       -- use monotonic clock as timer source
File locations
-base [basedir]         -- alternate prefix directory
-conf [confdir]         -- alternate directory for FreeSWITCH configuration files
-log [logdir]           -- alternate directory for logfiles
-run [rundir]           -- alternate directory for runtime files
-db [dbdir]             -- alternate directory for the internal database
-mod [moddir]           -- alternate directory for modules
-htdocs [htdocsdir]     -- alternate directory for htdocs
-scripts [scriptsdir]   -- alternate directory for scripts
-temp [directory]       -- alternate directory for temporary files
-grammar [directory]    -- alternate directory for grammar files
-recordings [directory] -- alternate directory for recordings
-storage [directory]    -- alternate directory for voicemail storage
-sounds [directory]     -- alternate directory for sound files

If you set the file locations of any one of -conf, -log, or -db you must set all three.

File Paths

A handy method to determine where FreeSWITCH™ is currently looking for files (in linux):

Method for showing FS paths
bash> fs_cli -x 'global_getvar'| grep _dir

base_dir=/usr
recordings_dir=/var/lib/freeswitch/recordings
sounds_dir=/usr/share/freeswitch/sounds
conf_dir=/etc/freeswitch
log_dir=/var/log/freeswitch
run_dir=/var/run/freeswitch
db_dir=/var/lib/freeswitch/db
mod_dir=/usr/lib/freeswitch/mod
htdocs_dir=/usr/share/freeswitch/htdocs
script_dir=/usr/share/freeswitch/scripts
temp_dir=/tmp
grammar_dir=/usr/share/freeswitch/grammar
fonts_dir=/usr/share/freeswitch/fonts
images_dir=/var/lib/freeswitch/images
certs_dir=/etc/freeswitch/tls
storage_dir=/var/lib/freeswitch/storage
cache_dir=/var/cache/freeswitch
data_dir=/usr/share/freeswitch
localstate_dir=/var/lib/freeswitch

 

Argument Cautions

Setting some arguments may affect behavior in unexpected ways. The following list contains known side-effects of setting various command line arguments.

  • nosql - Setting nosql completely disables the use of coreDB which means you will not have show channels, show calls, tab completion, or anything else that is stored in the coreDB.

See Also

 

base_dir=/usr

recordings_dir=/var/lib/freeswitch/recordings

sounds_dir=/usr/share/freeswitch/sounds

conf_dir=/etc/freeswitch

log_dir=/var/log/freeswitch

run_dir=/var/run/freeswitch

db_dir=/var/lib/freeswitch/db

mod_dir=/usr/lib/freeswitch/mod

htdocs_dir=/usr/share/freeswitch/htdocs

script_dir=/usr/share/freeswitch/scripts

temp_dir=/tmp

grammar_dir=/usr/share/freeswitch/grammar

fonts_dir=/usr/share/freeswitch/fonts

images_dir=/var/lib/freeswitch/images

certs_dir=/etc/freeswitch/tls

storage_dir=/var/lib/freeswitch/storage

cache_dir=/var/cache/freeswitch

data_dir=/usr/share/freeswitch

localstate_dir=/var/lib/freeswitch