#
# $Id$
#
-# This a very basic config file w aliases and anamed route but
+# This a very basic config file w/ aliases and a named route but
# w/o authentication, accounting, database, multi-domain support etc.
# Please refer to sip-router.cfg for a more complete example
#
+# Direct your questions about this file to: <sr-users@lists.sip-router.org>.
+#
+# For more information about the various parameters, functions and statements
+# try http://sip-router.org/wiki/ .
+#
+
+#------------ Features -----------------------------------------------
+# Several extra features can be enabled by adding #!define WITH_<FEATURE>
+# statements to the config file, or by starting sr/ser with -A WITH_<FEATURE>.
+# E.g.: ser -f /etc/ser/sip-router-basic.cfg -A WITH_TLS
+
+# run in debug mode:
+##!define WITH_DEBUG
+
+# enable tls support:
+##!define WITH_TLS
+
+# started from compile directory (not installed)
+##!define LOCAL_TEST_RUN
+
# ----------- global configuration parameters ------------------------
+#!ifdef WITH_DEBUG
+debug=5
+log_stderror=yes
+fork=no
+#!else
debug=2 # debug level (cmd line: -dddddddddd)
+#!endif
+
#memdbg=10 # memory debug message level
#memlog=10 # memory statistics log level
#log_facility=LOG_LOCAL0 # sets the facility used for logging (see syslog(3))
-/* Uncomment these lines to enter debugging mode
-fork=no
-log_stderror=yes
-*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
#disable_core=yes #disables core dumping
#open_fd_limit=1024 # sets the open file descriptors limit
#mhomed=yes # usefull for multihomed hosts, small performance penalty
-#disable_tcp=yes
+#disable_tcp=yes
#tcp_accept_aliases=yes # accepts the tcp alias via option (see NEWS)
+sip_warning=yes
+
+#!ifdef WITH_TLS
+enable_tls=yes
+#!endif
#
# ------------------ module loading ----------------------------------
-#loadpath "modules:modules_s"
+#!ifdef LOCAL_TEST_RUN
+loadpath "modules:modules_s"
+#!else
loadpath "/usr/lib/sip-router/modules:/usr/lib/sip-router/modules_s"
+#!endif
-loadmodule "sl"
loadmodule "tm"
+loadmodule "sl"
loadmodule "rr"
loadmodule "textops"
loadmodule "maxfwd"
loadmodule "registrar"
loadmodule "ctl"
loadmodule "cfg_rpc"
+#!ifdef WITH_TLS
+loadmodule "tls"
+#!endif
# ----------------- setting module-specific parameters ---------------
# ctl params
# by default ctl listens on unixs:/tmp/sip-router_ctl if no other address is
# specified in modparams; this is also the default for sercmd
-modparam("ctl", "binrpc", "unixs:/tmp/sip-router_ctl")
+modparam("ctl", "binrpc", "unixs:/tmp/ser_ctl")
# listen on the "standard" fifo for backward compatibility
-modparam("ctl", "fifo", "fifo:/tmp/sip-router_fifo")
+modparam("ctl", "fifo", "fifo:/tmp/ser_fifo")
# listen on tcp, localhost
-#modparam("ctl", "binrpc", "tcp:localhost:2046")
+modparam("ctl", "binrpc", "tcp:127.0.0.1:2046")
+
+#!ifdef WITH_TLS
+modparam("tls", "verify_certificate", 0)
+#!ifdef LOCAL_TEST_RUN
+modparam("tls", "certificate", "./modules/tls/sip-router-selfsigned.pem")
+modparam("tls", "private_key", "./modules/tls/sip-router-selfsigned.key")
+#separate TLS config file
+#modparam("tls", "config", "./modules/tls/tls.cfg")
+#!else
+modparam("tls", "certificate", "ser-selfsigned.pem")
+modparam("tls", "private_key", "ser-selfsigned.key")
+#separate TLS config file
+#modparam("tls", "config", "tls.cfg")
+#!endif
+#!endif
+
+
+
+#!endif
# ------------------------- request routing logic -------------------