Browse Source

added manual SRV entries

Jiri Kuthan 23 năm trước cách đây
mục cha
commit
016928000e
1 tập tin đã thay đổi với 35 bổ sung20 xóa
  1. 35 20
      etc/iptel.cfg

+ 35 - 20
etc/iptel.cfg

@@ -124,24 +124,6 @@ route{
 	};
 
 
-	/* IM gateways */
-	if (uri=~"sip:.*@icq\.iptel\.org") {
-		forward( 195.37.77.100, 5080 );
-		break;
-	};
-	if (uri=~"sip:.*@msn\.iptel\.org") {
-		forward( 195.37.77.100, 5080 );
-		break;
-	};
-	if (uri=~"sip:.*@aim\.iptel\.org") {
-		forward( 195.37.77.100, 5080 );
-		break;
-	};
-	if (uri=~"sip:.*@yahoo\.iptel\.org") {
-		forward( 195.37.77.100, 5080 );
-		break;
-	};
-
 	# -------------------- testing accounts ----------------
 #XX
 	if (uri=~"sip:333.*@iptel\.org") {
@@ -213,6 +195,24 @@ route{
 	# Do strict routing if route headers present
 	rewriteFromRoute();
 
+	# divert to IM gateways 
+	if (uri=~"sip:.*@icq\.iptel\.org") {
+		forward( 195.37.77.100, 5070 );
+		break;
+	};
+	if (uri=~"sip:.*@msn\.iptel\.org") {
+		forward( 195.37.77.100, 5070 );
+		break;
+	};
+	if (uri=~"sip:.*@aim\.iptel\.org") {
+		forward( 195.37.77.100, 5070 );
+		break;
+	};
+	if (uri=~"sip:.*@yahoo\.iptel\.org") {
+		forward( 195.37.77.100, 5070 );
+		break;
+	};
+
 	# divert voicemail requests
     if (uri=~"mail\.iptel\.org" | uri=~":5066"| uri=~":6060") {
 		log("Request is for voicemail\n");
@@ -263,7 +263,7 @@ route{
 #XX
 #	lookup_contact("aliases");
 	if (uri=~"sip:9040@") {
-		seturi("sip:jirih@iptel.org");
+		seturi("sip:[email protected]");
 #		seturi("sip:[email protected]");
 	};
 	if (uri=~"sip:9042@") {
@@ -375,7 +375,7 @@ route{
 		};
 		if (method=="MESSAGE")
 		{
-			seturi("sip:491713042053@iptel.org");
+			seturi("sip:+49175607818[email protected]");
 			t_relay_to("bat.iptel.org","5070");
 			break;
 		};
@@ -483,6 +483,21 @@ route[2] {
 		if (isflagset(2)) {
 			addRecordRoute();
 		};
+		# here, we do manual DNS/SRV resolution, until
+		# DNS SRV is implemented
+		if (uri=~"worldcom.globalipcom.com") {
+			if (!t_relay_to("hsjns01.vlab.ngnet.net", "5060")) {
+				sl_reply_error();
+			};
+			break;
+		};
+		if (uri=~"cs.columbia.edu") {
+			if (!t_relay_to("erlang.cs.columbia.edu", "5060")) {
+				sl_reply_error();
+			};
+			break;
+		};
+
 		if (!t_relay()) {
 			sl_reply_error();
 			break;