فهرست منبع

qop turned off again

Jiri Kuthan 23 سال پیش
والد
کامیت
6ea5167d68
1فایلهای تغییر یافته به همراه11 افزوده شده و 2 حذف شده
  1. 11 2
      etc/iptel.cfg

+ 11 - 2
etc/iptel.cfg

@@ -32,6 +32,7 @@ loadmodule "../new_ser/modules/mysql/mysql.so"
 loadmodule "../new_ser/modules/usrloc/usrloc.so"
 loadmodule "../new_ser/modules/registrar/registrar.so"
 loadmodule "../new_ser/modules/auth/auth.so"
+loadmodule "../new_ser/modules/textops/textops.so"
 
 # ----------------- setting module-specific parameters ---------------
 
@@ -113,6 +114,7 @@ route{
 			| uri=~"sip:.*@msn\.iptel\.org"
 			| uri=~"sip:.*@aim\.iptel\.org"
 			| uri=~"sip:.*@yahoo\.iptel\.org" ) {
+		append_hf("P-hint: IMGW\r\n");
 		if (!t_relay_to("195.37.77.100", "5070")) {
 			sl_reply_error();
 		};
@@ -122,6 +124,7 @@ route{
 	/* divert voicemail requests */
     if (uri=~"mail\.iptel\.org" | uri=~":5066"| uri=~":6060") {
 		sethost("iptel.org");
+		append_hf("P-hint: VOICEMAIL\r\n");
 		if ( !t_relay_to("fox.iptel.org", "6060")) {
 			sl_reply_error();
 		};
@@ -131,6 +134,7 @@ route{
 	# this host is excempted from default processing for our domain
 	# for testing purposes
 	if (uri=~"@bat\.iptel\.org") {
+		append_hf("P-hint: BATTEST\r\n");
 		forward("bat.iptel.org", 5060);
 		break;
 	};
@@ -186,7 +190,7 @@ route{
 			 				"subscriber" /* table name */ )) {
 			# challenge if none or invalid credentials
  			www_challenge(	"iptel.org" /* realm */, 
-							"0" /* no qop -- M$ can't deal with it */);
+							"0" /* no qop -- some phones can't deal with it */);
 			break;
 		};
 		if (!is_user("replicator") & !check_to()) {
@@ -233,7 +237,7 @@ route{
 	}; 
 
 	/* set up voicemail redirection for users who registered to do so */
-	if (is_user_in("Request-URI", "voicemail")) {
+	if (method=="INVITE" && is_user_in("Request-URI", "voicemail")) {
 		t_on_negative("1");
 	} ;
 
@@ -263,6 +267,7 @@ route{
 	setflag(3);
 
 	# we now know we may, we know where, let it go out now!
+	append_hf("P-hint: USRLOC\r\n");
 	if (!t_relay()) {
 		sl_reply_error();
 		break;
@@ -312,6 +317,7 @@ route[2] {
 			addRecordRoute();
 			;
 		};
+		append_hf("P-hint: OUTBOUND\r\n");
 		if (!t_relay()) {
 			sl_reply_error();
 			break;
@@ -329,6 +335,7 @@ route[3] {
 		# set accounting
 		setflag(1);
 		rewritehostport("195.37.77.100:5070");
+		append_hf("P-hint: SMS\r\n");
 		if (!t_relay()) {
 			sl_reply_error(); 
 		};
@@ -420,6 +427,7 @@ route[3] {
 
 	rewritehostport("195.37.77.110:5060");
 
+	append_hf("P-hint: GATEWAY\r\n");
 	if (!t_relay()) {
 		sl_reply_error(); 
 		break; 
@@ -441,6 +449,7 @@ route[4] {
 		/* requests to voicemail users will be fwded to voicemail */
 		if (is_user_in("Request-URI", "voicemail")) {
 			rewritehostport("mail.iptel.org:5060");
+			append_hf("P-hint: OFFLINE-VOICEMAIL\r\n");
 			if (!t_relay()) {
 				sl_reply_error();
 			};