Module: kamailio
Branch: master
Commit: c309122864eaa2bfa58253290bed49084ccc9302
URL:
https://github.com/kamailio/kamailio/commit/c309122864eaa2bfa58253290bed490…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-04-21T14:28:26+02:00
topos: restore attributes based on direction for early dialog requests
- GH #3090
---
Modified: src/modules/topos/tps_msg.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c309122864eaa2bfa58253290bed490…
Patch:
https://github.com/kamailio/kamailio/commit/c309122864eaa2bfa58253290bed490…
---
diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index c16a0adacb..cd781328e5 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -863,10 +863,9 @@ int tps_request_received(sip_msg_t *msg, int dialog)
mtsd.direction = direction;
}
-
tps_storage_lock_release(&lkey);
- if(use_branch) {
+ if(use_branch && direction == TPS_DIR_DOWNSTREAM) {
nuri = stsd.b_contact;
} else {
if(direction == TPS_DIR_UPSTREAM) {
@@ -884,7 +883,7 @@ int tps_request_received(sip_msg_t *msg, int dialog)
}
}
- if(use_branch) {
+ if(use_branch && direction == TPS_DIR_DOWNSTREAM) {
if(tps_reappend_route(msg, &stsd, &stsd.s_rr, 1) < 0) {
LM_ERR("failed to reappend s-route\n");
return -1;