diff --git a/misc/examples/kemi/kamailio-basic-kemi-lua.lua b/misc/examples/kemi/kamailio-basic-kemi-lua.lua index fe9b131f570..dc26c653d9a 100644 --- a/misc/examples/kemi/kamailio-basic-kemi-lua.lua +++ b/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 diff --git a/misc/examples/kemi/kamailio-basic-kemi.cfg b/misc/examples/kemi/kamailio-basic-kemi.cfg index c4169383ef0..d1fb05d350e 100644 --- a/misc/examples/kemi/kamailio-basic-kemi.cfg +++ b/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)