Pārlūkot izejas kodu

voicemail fixes

Jiri Kuthan 23 gadi atpakaļ
vecāks
revīzija
16146e957b
1 mainītis faili ar 13 papildinājumiem un 13 dzēšanām
  1. 13 13
      etc/iptel.cfg

+ 13 - 13
etc/iptel.cfg

@@ -245,11 +245,6 @@ route{
 		break;
 	}; 
 
-	/* set up voicemail redirection for users who registered to do so */
-	if (method=="INVITE" && is_user_in("Request-URI", "voicemail")) {
-		t_on_negative("1");
-	} ;
-
 	# native SIP destinations are handled using our USRLOC DB
 	if (!lookup("location")) {
 		# handle user which was not found ...
@@ -264,17 +259,22 @@ route{
 		break;
 	};
 
-	# add RR to messages which were previously labeled for that
-	if (isflagset(2)) {
-		addRecordRoute();
-		;
-	};
-
+	/* set up voicemail redirection for users who registered to do so */
+	if (method=="INVITE" && is_user_in("Request-URI", "voicemail")) {
+		t_on_negative("1");
+	} ;
 	/* ... and also report on missed calls ... note that reporting
        on missed calls is mutually exclusive with silent C timer
     */
 	setflag(3);
 
+
+
+	# add RR to messages which were previously labeled for that
+	if (isflagset(2)) {
+		addRecordRoute();
+	};
+
 	# we now know we may, we know where, let it go out now!
 	append_hf("P-hint: USRLOC\r\n");
 	if (!t_relay()) {
@@ -453,8 +453,6 @@ route[4] {
 	# on each INVITE retranmission
 	if (method=="INVITE" || method=="ACK" || method=="BYE") {
 
-		/* we account missed calls for all off-line users */
-		acc_request("404 Not Found");
 		/* requests to voicemail users will be fwded to voicemail */
 		if (is_user_in("Request-URI", "voicemail")) {
 			rewritehostport("mail.iptel.org:5060");
@@ -475,6 +473,8 @@ route[4] {
 				sl_reply_error();
 			};
 		};
+		/* we account missed calls for all off-line users */
+		if (method=="INVITE") acc_request("404 Not Found");
 		break;
 	};
 	# non-VoIP messages: just return 404 statelessly