[sr-dev] git:master:d859f8bf: topos_redis: do rr update for requests within dialog based of flags

Daniel-Constantin Mierla miconda at gmail.com
Thu Jan 7 10:31:05 CET 2021


Module: kamailio
Branch: master
Commit: d859f8bfdd9adc89c29095c4e5de9d29c4333de0
URL: https://github.com/kamailio/kamailio/commit/d859f8bfdd9adc89c29095c4e5de9d29c4333de0

Author: balajee <balajee.sv at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-01-07T10:24:13+01:00

topos_redis: do rr update for requests within dialog based of flags

---

Modified: src/modules/topos_redis/topos_redis_storage.c

---

Diff:  https://github.com/kamailio/kamailio/commit/d859f8bfdd9adc89c29095c4e5de9d29c4333de0.diff
Patch: https://github.com/kamailio/kamailio/commit/d859f8bfdd9adc89c29095c4e5de9d29c4333de0.patch

---

diff --git a/src/modules/topos_redis/topos_redis_storage.c b/src/modules/topos_redis/topos_redis_storage.c
index fe366403c8..3ed090a26c 100644
--- a/src/modules/topos_redis/topos_redis_storage.c
+++ b/src/modules/topos_redis/topos_redis_storage.c
@@ -1283,6 +1283,21 @@ int tps_redis_update_dialog(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd,
 		}
 	}
 
+        if(sd->b_tag.len>0 && ((mode & TPS_DBU_BRR) || (mode & TPS_DBU_ARR))) {
+                if(((md->direction == TPS_DIR_DOWNSTREAM) && (msg->first_line.type==SIP_REPLY)) ||
+                                ((md->direction == TPS_DIR_UPSTREAM) && (msg->first_line.type==SIP_REQUEST))) {
+                        if(((sd->iflags&TPS_IFLAG_DLGON) == 0) && (mode & TPS_DBU_BRR)) {
+                                TPS_REDIS_SET_ARGS(&md->b_rr, argc, &td_key_b_rr, argv, argvlen);
+                        }
+                }
+                else {
+                        if(((sd->iflags&TPS_IFLAG_DLGON) == 0) && (mode & TPS_DBU_ARR)) {
+                                TPS_REDIS_SET_ARGS(&md->a_rr, argc, &td_key_a_rr, argv, argvlen);
+                                TPS_REDIS_SET_ARGS(&md->s_rr, argc, &td_key_s_rr, argv, argvlen);
+                        }
+                }
+        }
+
 	if(argc<=2) {
 		return 0;
 	}




More information about the sr-dev mailing list