运行fs

前台运行

freeswitch

后台运行

freeswich -nc

参数列表

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 filesIf 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=/usrrecordings_dir=/var/lib/freeswitch/recordingssounds_dir=/usr/share/freeswitch/soundsconf_dir=/etc/freeswitchlog_dir=/var/log/freeswitchrun_dir=/var/run/freeswitchdb_dir=/var/lib/freeswitch/dbmod_dir=/usr/lib/freeswitch/modhtdocs_dir=/usr/share/freeswitch/htdocsscript_dir=/usr/share/freeswitch/scriptstemp_dir=/tmpgrammar_dir=/usr/share/freeswitch/grammarfonts_dir=/usr/share/freeswitch/fontsimages_dir=/var/lib/freeswitch/imagescerts_dir=/etc/freeswitch/tlsstorage_dir=/var/lib/freeswitch/storagecache_dir=/var/cache/freeswitchdata_dir=/usr/share/freeswitchlocalstate_dir=/var/lib/freeswitchArgument CautionsSetting 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.