Переглянути джерело

misc/examples/kemi: add the option for using rtpengine in common cfg file

- updated lua script removing the check of rtpproxy define, not being in
  the commng cfg file
Daniel-Constantin Mierla 1 рік тому
батько
коміт
022f0f4cfd

+ 1 - 1
misc/examples/kemi/kamailio-basic-kemi-lua.lua

@@ -360,7 +360,7 @@ function ksr_route_natmanage()
 		else
 			KSR.rtpengine.rtpengine_manage("replace-origin replace-session-connection");
 		end
-	elseif KSR.kx.ifdef('WITH_RTPPROXY') then
+	else
 		if KSR.nathelper.nat_uac_test(8)>0 then
 			KSR.rtpproxy.rtpproxy_manage("co");
 		else

+ 15 - 0
misc/examples/kemi/kamailio-basic-kemi.cfg

@@ -39,6 +39,12 @@
 #        rtpproxy -l _your_public_ip_ -s udp:localhost:7722
 #     - option for NAT SIP OPTIONS keepalives: WITH_NATSIPPING
 #
+# *** To use RTPEngine (instead of RTPProxy) for nat traversal execute:
+#     - define WITH_RTPENGINE
+#     - install RTPEngine: https://github.com/sipwise/rtpengine
+#     - start RTPEngine:
+#        rtpengine --listen-ng=127.0.0.1:2223 ...
+#
 # *** To enable TLS support execute:
 #     - adjust CFGDIR/tls.cfg as needed
 #     - define WITH_TLS
@@ -237,8 +243,12 @@ loadmodule "permissions.so"
 
 #!ifdef WITH_NAT
 loadmodule "nathelper.so"
+#!ifdef WITH_RTPENGINE
+loadmodule "rtpengine.so"
+#!else
 loadmodule "rtpproxy.so"
 #!endif
+#!endif
 
 #!ifdef WITH_TLS
 loadmodule "tls.so"
@@ -352,8 +362,13 @@ modparam("permissions", "db_mode", 1)
 
 
 #!ifdef WITH_NAT
+#!ifdef WITH_RTPENGINE
+# ----- rtpengine params -----
+modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223")
+#!else
 # ----- rtpproxy params -----
 modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:7722")
+#!endif
 
 # ----- nathelper params -----
 modparam("nathelper", "natping_interval", 30)