Skip to content

Commit

Permalink
topos: fix early-dialog b-side UPDATE requests routing (GH #3437)
Browse files Browse the repository at this point in the history
(cherry picked from commit 091dc9a)
  • Loading branch information
henningw committed May 15, 2023
1 parent 8ed9cf8 commit 1b55a80
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/modules/topos/tps_msg.c
Expand Up @@ -946,14 +946,22 @@ int tps_request_received(sip_msg_t *msg, int dialog)
}
}

if(use_branch && direction == TPS_DIR_DOWNSTREAM) {
if(use_branch) {
LM_DBG("use branch for routing information, request from direction %d\n", direction);
if(tps_reappend_route(msg, &stsd, &stsd.s_rr, 1) < 0) {
LM_ERR("failed to reappend s-route\n");
return -1;
}
if(tps_reappend_route(msg, &stsd, &stsd.y_rr, 1) < 0) {
LM_ERR("failed to reappend b-route\n");
return -1;
if (direction == TPS_DIR_UPSTREAM) {
if(tps_reappend_route(msg, &stsd, &stsd.x_rr, 0) < 0) {
LM_ERR("failed to reappend a-route\n");
return -1;
}
} else {
if(tps_reappend_route(msg, &stsd, &stsd.y_rr, 1) < 0) {
LM_ERR("failed to reappend b-route\n");
return -1;
}
}
} else {
if(tps_reappend_route(msg, &stsd, &stsd.s_rr,
Expand Down

0 comments on commit 1b55a80

Please sign in to comment.