Browse code

topos: set downstream rr set for replies

Daniel-Constantin Mierla authored on 20/04/2021 10:16:31
Showing 1 changed files
... ...
@@ -548,6 +548,14 @@ int tps_pack_message(sip_msg_t *msg, tps_data_t *ptsd)
548 548
 			ptsd->as_contact.len, ZSW(ptsd->as_contact.s), ptsd->as_contact.len,
549 549
 			ptsd->bs_contact.len, ZSW(ptsd->bs_contact.s), ptsd->bs_contact.len);
550 550
 	ptsd->x_rr = ptsd->a_rr;
551
+	if(isreq==0) {
552
+		if(msg->first_line.u.reply.statuscode >= 180
553
+				&& msg->first_line.u.reply.statuscode < 199) {
554
+			/* provisional replies that create early dialogs
555
+			 * - skip 199 Early Dialog Terminated */
556
+			ptsd->y_rr = ptsd->b_rr;
557
+		}
558
+	}
551 559
 	ptsd->s_method_id = get_cseq(msg)->method_id;
552 560
 	if(_tps_context_value.len>0) {
553 561
 		ptsd->x_context = _tps_context_value;