Browse Source

rtpproxy: small updates to the examples

Daniel-Constantin Mierla 8 years ago
parent
commit
311f995fdf
2 changed files with 33 additions and 40 deletions
  1. 18 19
      src/modules/rtpproxy/examples/4to6.cfg
  2. 15 21
      src/modules/rtpproxy/examples/alg.cfg

+ 18 - 19
src/modules/rtpproxy/examples/4to6.cfg

@@ -1,8 +1,7 @@
-# $Id$
 #
 # Simple application level gateway config script.
 #
-# Assumes that SER/rtpproxy run on a machine, which connected to
+# Assumes that Kamailiortpproxy run on a machine, which connected to
 # both IPv4 and IPv6 networks.
 #
 # Correspondingly, this machine has two IP addresses: one IPv4
@@ -14,19 +13,19 @@
 # 2002:1234:5678::1 - "external" IPv6 address
 #
 # rtpproxy started with `-l 192.168.0.1 -6 /2002:1234:5678::1' option.
-# ser started with `-l 192.168.0.1 -l [2002:1234:5678::1] option.
+# kamailio started with `-l 192.168.0.1 -l [2002:1234:5678::1] option.
 #
 
 # ------------------ module loading ----------------------------------
 
-loadmodule "/usr/local/lib/ser/modules/sl.so"
-loadmodule "/usr/local/lib/ser/modules/tm.so"
-loadmodule "/usr/local/lib/ser/modules/rr.so"
-loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
-loadmodule "/usr/local/lib/ser/modules/usrloc.so"
-loadmodule "/usr/local/lib/ser/modules/registrar.so"
-loadmodule "/usr/local/lib/ser/modules/nathelper.so"
-loadmodule "/usr/local/lib/ser/modules/rtpproxy.so"
+loadmodule "/usr/local/lib/kamailio/modules/sl.so"
+loadmodule "/usr/local/lib/kamailio/modules/tm.so"
+loadmodule "/usr/local/lib/kamailio/modules/rr.so"
+loadmodule "/usr/local/lib/kamailio/modules/maxfwd.so"
+loadmodule "/usr/local/lib/kamailio/modules/usrloc.so"
+loadmodule "/usr/local/lib/kamailio/modules/registrar.so"
+loadmodule "/usr/local/lib/kamailio/modules/nathelper.so"
+loadmodule "/usr/local/lib/kamailio/modules/rtpproxy.so"
 
 # ----------------- setting module-specific parameters ---------------
 
@@ -36,7 +35,7 @@ modparam("nathelper", "natping_interval", 15)
 
 # ------------------ main fun below ----------------------------------
 
-route {
+request_route {
 	# initial sanity checks -- messages with
 	# max_forwars == 0, or excessively long requests,
 	# or those that don't addressed to us
@@ -71,20 +70,20 @@ route {
 			# between UAs
 			if (af == inet)
 				if (rtpproxy_offer("FAII"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 			if (af == inet6)
 				if (rtpproxy_offer("FAEI"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 		} else if (lookup("location-inet6")) {
 			if (af == inet)
 				if (rtpproxy_offer("FAIE"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 			# Comment out three lines below if you want
 			# RTP for IPv6->IPv6 calls to go directly
 			# between UAs
 			if (af == inet6)
 				if (rtpproxy_offer("FAEE"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 		} else {
 			sl_send_reply("403", "Call cannot be served here");
 			break;
@@ -103,11 +102,11 @@ route {
 	if (method == "INVITE")
 		record_route();
 
-        if (!t_relay())
-        	sl_reply_error();
+    if (!t_relay())
+        sl_reply_error();
 }
 
-onreply_route[1] {
+onreply_route[MNGRPL] {
 	if (!(status=~"183" || status=~"200"))
 		break;
 	rtpproxy_answer("FA");

+ 15 - 21
src/modules/rtpproxy/examples/alg.cfg

@@ -1,8 +1,7 @@
-# $Id$
 #
 # Simple application level gateway config script.
 #
-# Assumes that SER/rtpproxy run on a machine, which connected to
+# Assumes that Kamailio and rtpproxy run on a machine, which connected to
 # two non-routable letworks: 192.168.0.0/24 and 192.168.1.1/24.
 #
 # Correspondingly, this machine has two IP addresses: 192.168.0.1
@@ -16,24 +15,23 @@
 
 # ------------------ module loading ----------------------------------
 
-loadmodule "/usr/local/lib/ser/modules/sl.so"
-loadmodule "/usr/local/lib/ser/modules/tm.so"
-loadmodule "/usr/local/lib/ser/modules/rr.so"
-loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
-loadmodule "/usr/local/lib/ser/modules/usrloc.so"
-loadmodule "/usr/local/lib/ser/modules/registrar.so"
-loadmodule "/usr/local/lib/ser/modules/nathelper.so"
-loadmodule "/usr/local/lib/ser/modules/rtpproxy.so"
+loadmodule "/usr/local/lib/kamailio/modules/sl.so"
+loadmodule "/usr/local/lib/kamailio/modules/tm.so"
+loadmodule "/usr/local/lib/kamailio/modules/rr.so"
+loadmodule "/usr/local/lib/kamailio/modules/maxfwd.so"
+loadmodule "/usr/local/lib/kamailio/modules/usrloc.so"
+loadmodule "/usr/local/lib/kamailio/modules/registrar.so"
+loadmodule "/usr/local/lib/kamailio/modules/nathelper.so"
+loadmodule "/usr/local/lib/kamailio/modules/rtpproxy.so"
 
 # ----------------- setting module-specific parameters ---------------
 
 # -- nathelper params --
-
 modparam("nathelper", "natping_interval", 15)
 
 # ------------------ main fun below ----------------------------------
 
-route {
+request_route {
 	# initial sanity checks -- messages with
 	# max_forwars == 0, or excessively long requests,
 	# or those that don't addressed to us
@@ -41,10 +39,6 @@ route {
 		sl_send_reply("483", "Too Many Hops");
 		break;
 	};
-	if (msg:len > max_len) {
-		sl_send_reply("513", "Message too big");
-		break;
-	};
 	if (!(uri == myself) && method == "INVITE") {
 		sl_send_reply("403", "Call cannot be served here");
 		break;
@@ -65,17 +59,17 @@ route {
 		if (lookup("location-internal")) {
 			if (dst_ip == 192.168.0.1)
 				if (rtpproxy_offer("FAII"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 			if (dst_ip == 192.168.1.1)
 				if (rtpproxy_offer("FAEI"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 		} else if (lookup("location-external")) {
 			if (dst_ip == 192.168.0.1)
 				if (rtpproxy_offer("FAIE"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 			if (dst_ip == 192.168.1.1)
 				if (rtpproxy_offer("FAEE"))
-					t_on_reply("1");
+					t_on_reply("MNGRPL");
 		} else {
 			sl_send_reply("403", "Call cannot be served here");
 			break;
@@ -98,7 +92,7 @@ route {
         	sl_reply_error();
 }
 
-onreply_route[1] {
+onreply_route[MNGRPL] {
 	if (!(status=~"183" || status=~"200"))
 		break;
 	rtpproxy_answer("FA");