Add minimal configuration for configuring FreeSWITCH from scratch

The default "vanilla" configuration that comes with FreeSWITCH has
been designed as a showcase of the configurability of the myriad of
features that FreeSWITCH comes with out of the box. While it is very
helpful in tinkering with FreeSWITCH, it has a lot of extraneous stuff
enabled/configured for use in a production system. This configuration
aims to take the reverse stance -- it attempts to be a starting point
for configuring a new system by "adding" required features (instead of
removing them as one would do if one starts with the default
configuration).

Jira: FS-7362
Source: 270941d6f2
This commit is contained in:
Manav Rathi 2015-03-11 18:44:08 +05:30
parent a92d938364
commit 7a6303d6b3
22 changed files with 2142 additions and 0 deletions

32
conf/minimal/README.md Normal file
View File

@ -0,0 +1,32 @@
## Minimal FreeSWITCH Configuration
The default "vanilla" configuration that comes with FreeSWITCH has
been designed as a showcase of the configurability of the myriad of
features that FreeSWITCH comes with out of the box. While it is very
helpful in tinkering with FreeSWITCH, it has a lot of extraneous stuff
enabled/configured for use in a production system. This configuration
aims to take the reverse stance -- it attempts to be a starting point
for configuring a new system by "adding" required features (instead of
removing them as one would do if one starts with the default
configuration).
This folder also includes the corresponding `modules.conf` that lists
the modules that are required to get this configuration working.
### Test
This configuration was tested by sending an INVITE (without
registration) using the `siprtp` example program that comes with
PJSIP, and verifying that the info dump is produced on the FreeSWITCH
console.
$ ./siprtp -q -p 1234 "sip:stub@$(my_ip):5080"
### Upstream
The configuration in this folder comes from
[mx4492/freeswitch-minimal-conf](https://github.com/mx4492/freeswitch-minimal-conf/commit/270941d6f2dca279f1bb8762d072940273d5ae11).
### Other Minimal Configurations
* [voxserv/freeswitch_conf_minimal](https://github.com/voxserv/freeswitch_conf_minimal)

View File

@ -0,0 +1,15 @@
<configuration name="acl.conf" description="Network Lists">
<network-lists>
<!--
These ACL's are automatically created on startup.
rfc1918.auto - RFC1918 Space
nat.auto - RFC1918 Excluding your local lan.
localnet.auto - ACL for your local lan.
loopback.auto - ACL for your local lan.
-->
<list name="domains" default="deny">
</list>
</network-lists>
</configuration>

View File

@ -0,0 +1,11 @@
<configuration name="cdr_csv.conf" description="CDR CSV Format">
<settings>
<param name="default-template" value="example"/>
<param name="rotate-on-hup" value="true"/>
<param name="legs" value="ab"/>
</settings>
<templates>
<template name="example">"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${write_codec}"</template>
</templates>
</configuration>

View File

@ -0,0 +1,5 @@
<configuration name="conference.conf" description="Audio Conference">
<profiles>
<profile name="default"/>
</profiles>
</configuration>

View File

@ -0,0 +1,10 @@
<configuration name="console.conf" description="Console Logger">
<mappings>
<map name="all" value="console,debug,info,notice,warning,err,crit,alert"/>
</mappings>
<settings>
<param name="colorize" value="true"/>
<param name="loglevel" value="debug"/>
</settings>
</configuration>

View File

@ -0,0 +1,3 @@
<configuration name="db.conf" description="LIMIT DB Configuration">
<settings/>
</configuration>

View File

@ -0,0 +1,8 @@
<configuration name="event_socket.conf" description="Socket Client">
<settings>
<param name="nat-map" value="false"/>
<param name="listen-ip" value="127.0.0.1"/>
<param name="listen-port" value="8021"/>
<param name="password" value="ClueCon"/>
</settings>
</configuration>

View File

@ -0,0 +1,22 @@
<configuration name="logfile.conf" description="File Logging">
<settings>
<param name="rotate-on-hup" value="true"/>
</settings>
<profiles>
<profile name="default">
<settings>
<!-- At this length in bytes rotate the log file (0 for never) -->
<param name="rollover" value="10485760"/>
</settings>
<mappings>
<!--
name can be a file name, function name or 'all'
value is one or more of debug,info,notice,warning,err,crit,alert,all
-->
<map name="all" value="debug,info,notice,warning,err,crit,alert"/>
</mappings>
</profile>
</profiles>
</configuration>

View File

@ -0,0 +1,40 @@
<configuration name="modules.conf" description="Modules">
<modules>
<!-- Loggers (I'd load these first) -->
<load module="mod_console"/>
<load module="mod_logfile"/>
<!-- XML Interfaces -->
<load module="mod_xml_rpc"/>
<!-- Event Handlers -->
<load module="mod_cdr_csv"/>
<load module="mod_event_socket"/>
<!-- Endpoints -->
<load module="mod_sofia"/>
<load module="mod_loopback"/>
<!-- Applications -->
<load module="mod_commands"/>
<load module="mod_conference"/>
<load module="mod_db"/>
<load module="mod_dptools"/>
<load module="mod_expr"/>
<load module="mod_hash"/>
<load module="mod_esf"/>
<!-- Dialplan Interfaces -->
<load module="mod_dialplan_xml"/>
<!-- Codec Interfaces -->
<!-- File Format Interfaces -->
<load module="mod_sndfile"/>
<load module="mod_native_file"/>
<!-- Third party modules -->
</modules>
</configuration>

View File

@ -0,0 +1,10 @@
<configuration name="sofia.conf" description="sofia Endpoint">
<global_settings>
<param name="log-level" value="0"/>
<param name="tracelevel" value="DEBUG"/>
</global_settings>
<profiles>
<X-PRE-PROCESS cmd="include" data="../sip_profiles/*.xml"/>
</profiles>
</configuration>

View File

@ -0,0 +1,17 @@
<configuration name="switch.conf" description="Core Configuration">
<settings>
<param name="colorize-console" value="true"/>
<!-- Max number of sessions to allow at any given time -->
<param name="max-sessions" value="1000"/>
<!--Most channels to create per second -->
<param name="sessions-per-second" value="30"/>
<!-- Default Global Log Level - value is one of debug,info,notice,warning,err,crit,alert -->
<param name="loglevel" value="debug"/>
<!-- RTP port range -->
<param name="rtp-start-port" value="16384"/>
<param name="rtp-end-port" value="32768"/>
</settings>
</configuration>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
<configuration name="xml_rpc.conf" description="XML RPC">
<settings>
<!-- The port where you want to run the http service (default 8080) -->
<param name="http-port" value="8080"/>
<!-- if all 3 of the following params exist all http traffic will require auth -->
<param name="auth-realm" value="freeswitch"/>
<param name="auth-user" value="freeswitch"/>
<param name="auth-pass" value="$${xml_rpc_password}"/>
<param name="commands-to-log" value=".*"/>
</settings>
</configuration>

View File

@ -0,0 +1,11 @@
<include>
<context name="default">
<extension name="sample">
<condition>
<action application="info"/>
</condition>
</extension>
</context>
</include>

View File

@ -0,0 +1,5 @@
<include>
<context name="public">
<X-PRE-PROCESS cmd="include" data="public/*.xml"/>
</context>
</include>

View File

@ -0,0 +1,7 @@
<include>
<extension name="sample">
<condition>
<action application="info"/>
</condition>
</extension>
</include>

View File

@ -0,0 +1,12 @@
<?xml version="1.0"?>
<document type="freeswitch/xml">
<X-PRE-PROCESS cmd="include" data="vars.xml"/>
<section name="configuration" description="Various Configuration">
<X-PRE-PROCESS cmd="include" data="autoload_configs/*.xml"/>
</section>
<section name="dialplan" description="Regex/XML Dialplan">
<X-PRE-PROCESS cmd="include" data="dialplan/*.xml"/>
</section>
</document>

17
conf/minimal/modules.conf Normal file
View File

@ -0,0 +1,17 @@
applications/mod_commands
applications/mod_conference
applications/mod_db
applications/mod_dptools
applications/mod_esf
applications/mod_expr
applications/mod_hash
dialplans/mod_dialplan_xml
endpoints/mod_loopback
endpoints/mod_sofia
event_handlers/mod_cdr_csv
event_handlers/mod_event_socket
formats/mod_native_file
formats/mod_sndfile
loggers/mod_console
loggers/mod_logfile
xml_int/mod_xml_rpc

View File

@ -0,0 +1,21 @@
<profile name="external">
<gateways>
<X-PRE-PROCESS cmd="include" data="external/*.xml"/>
</gateways>
<settings>
<param name="auth-calls" value="false"/>
<param name="debug" value="0"/>
<param name="dialplan" value="XML"/>
<param name="context" value="public"/>
<param name="codec-prefs" value="$${global_codec_prefs}"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>
<param name="sip-port" value="$${external_sip_port}"/>
</settings>
</profile>

View File

@ -0,0 +1,6 @@
<include>
<!-- <gateway name="itsp-name"> -->
<!-- <param name="proxy" value="1.2.3.4"/> -->
<!-- <param name="register" value="false"/> -->
<!-- </gateway> -->
</include>

View File

@ -0,0 +1,19 @@
<profile name="internal">
<settings>
<param name="auth-calls" value="true"/>
<param name="apply-nat-acl" value="nat.auto"/>
<param name="debug" value="0"/>
<param name="sip-trace" value="yes"/>
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="codec-prefs" value="$${global_codec_prefs}"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<param name="sip-ip" value="$${local_ip_v4}"/>
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>
<param name="sip-port" value="$${internal_sip_port}"/>
</settings>
</profile>

9
conf/minimal/vars.xml Normal file
View File

@ -0,0 +1,9 @@
<include>
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA"/>
<!-- NOTE: CHANGE THIS BEFORE USE -->
<X-PRE-PROCESS cmd="set" data="xml_rpc_password=worksnot"/>
<X-PRE-PROCESS cmd="set" data="internal_sip_port=5060"/>
<X-PRE-PROCESS cmd="set" data="external_sip_port=5080"/>
</include>