Module: kamailio
Branch: master
Commit: 6a837651c6e0fe281ac4a6a62434f82046610b0e
URL:
https://github.com/kamailio/kamailio/commit/6a837651c6e0fe281ac4a6a62434f82…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-01-07T10:24:13+01:00
topos: db storage of record route based on rr_update param
---
Modified: src/modules/topos/tps_storage.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6a837651c6e0fe281ac4a6a62434f82…
Patch:
https://github.com/kamailio/kamailio/commit/6a837651c6e0fe281ac4a6a62434f82…
---
diff --git a/src/modules/topos/tps_storage.c b/src/modules/topos/tps_storage.c
index b506a94b97..e23352962e 100644
--- a/src/modules/topos/tps_storage.c
+++ b/src/modules/topos/tps_storage.c
@@ -1492,6 +1492,29 @@ int tps_db_update_dialog(sip_msg_t *msg, tps_data_t *md, tps_data_t
*sd,
nr_ucols++;
}
}
+ 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)) {
+ db_ucols[nr_ucols] = &td_col_b_rr;
+ db_uvals[nr_ucols].type = DB1_STR;
+ db_uvals[nr_ucols].val.str_val = TPS_STRZ(md->b_rr);
+ nr_ucols++;
+ }
+ } else {
+ if(((sd->iflags&TPS_IFLAG_DLGON) == 0) && (mode & TPS_DBU_ARR)) {
+ db_ucols[nr_ucols] = &td_col_a_rr;
+ db_uvals[nr_ucols].type = DB1_STR;
+ db_uvals[nr_ucols].val.str_val = TPS_STRZ(md->a_rr);
+ nr_ucols++;
+ db_ucols[nr_ucols] = &td_col_s_rr;
+ db_uvals[nr_ucols].type = DB1_STR;
+ db_uvals[nr_ucols].val.str_val = TPS_STRZ(md->s_rr);
+ nr_ucols++;
+ }
+ }
+ }
+
if(nr_ucols==0) {
return 0;
}