Browse code

Merge 441b95e86057b6d651a5acf27f9cd43a093e947a into 322562a354887dec18e7df2d90a328fe32fc122e

Victor Seva authored on 21/06/2022 12:25:38 • GitHub committed on 21/06/2022 12:25:38
Showing 1 changed files
... ...
@@ -1167,6 +1167,11 @@ int tps_response_sent(sip_msg_t *msg)
1167 1167
 				&& msg->contact==NULL) {
1168 1168
 		contact_keep = 1;
1169 1169
 	}
1170
+	if(contact_keep==0 && msg->first_line.u.reply.statuscode>=400
1171
+				&& msg->first_line.u.reply.statuscode<500
1172
+				&& msg->contact==NULL) {
1173
+		contact_keep = 1;
1174
+	}
1170 1175
 	if(contact_keep==0) {
1171 1176
 		tps_remove_headers(msg, HDR_CONTACT_T);
1172 1177
 		if(direction==TPS_DIR_DOWNSTREAM) {