ソースを参照

kamailio.cfg: listen on TLS available via define

- use #!define WITH_TLS to start listening on tls
Daniel-Constantin Mierla 15 年 前
コミット
b7f00e7b02
1 ファイル変更23 行追加2 行削除
  1. 23 2
      etc/kamailio.cfg

+ 23 - 2
etc/kamailio.cfg

@@ -55,6 +55,10 @@
 #     - enable mysql
 #     - define WITH_MULTIDOMAIN
 #
+# *** To enable TLS support execute:
+#     - adjust CFGDIR/tls.cfg as needed
+#     - define WITH_TLS
+#
 # *** To enhance accounting execute:
 #     - enable mysql
 #     - define WITH_ACCDB
@@ -113,12 +117,17 @@ children=4
 /* add local domain aliases */
 #alias="sip.mydomain.com"
 
-port=5060
-
 /* uncomment and configure the following line if you want Kamailio to 
    bind on a specific interface/port/proto (default bind on all available) */
 #listen=udp:10.0.0.10:5060
 
+/* port to listen to
+ * - can be specified more than once if needed to listen on many ports */
+port=5060
+
+#!ifdef WITH_TLS
+enable_tls=yes
+#!endif
 
 ####### Custom Parameters #########
 
@@ -194,6 +203,10 @@ loadmodule "nathelper.so"
 loadmodule "rtpproxy.so"
 #!endif
 
+#!ifdef WITH_TLS
+loadmodule "tls.so"
+#!endif
+
 # ----------------- setting module-specific parameters ---------------
 
 
@@ -209,6 +222,7 @@ modparam("tm", "fr_timer", 30000)
 # default invite retransmission timeout after 1xx: 120sec
 modparam("tm", "fr_inv_timer", 120000)
 
+
 # ----- rr params -----
 # add value to ;lr param to cope with most of the UAs
 modparam("rr", "enable_full_lr", 1)
@@ -323,6 +337,13 @@ modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
 modparam("usrloc", "nat_bflag", 6)
 #!endif
 
+
+#!ifdef WITH_TLS
+# ----- tls params -----
+modparam("tls", "config", "/usr/local/etc/kamailio/tls.cfg")
+#!endif
+
+
 ####### Routing Logic ########