Skip to content

Commit

Permalink
topoh: remove the Via cookie when skipping topoh via event route
Browse files Browse the repository at this point in the history
- event route is now executed with parsed sip message to be sent out
- GH #2437

(cherry picked from commit 06a1d20)
(cherry picked from commit b517674)
  • Loading branch information
miconda committed Sep 8, 2020
1 parent e956b3c commit 659edfc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/modules/topoh/topoh_mod.c
Expand Up @@ -421,10 +421,6 @@ int th_msg_sent(sr_event_param_t *evp)

obuf = (str*)evp->data;

if(th_execute_event_route(NULL, evp)==1) {
return 0;
}

memset(&msg, 0, sizeof(sip_msg_t));
msg.buf = obuf->s;
msg.len = obuf->len;
Expand All @@ -442,6 +438,11 @@ int th_msg_sent(sr_event_param_t *evp)
if(th_cookie_value.s[0]!='x') {
th_del_cookie(&msg);
}

if(th_execute_event_route(&msg, evp)==1) {
goto done;
}

if(msg.first_line.type==SIP_REQUEST) {
direction = (th_cookie_value.s[0]=='u')?1:0; /* upstream/downstram */
dialog = (get_to(&msg)->tag_value.len>0)?1:0;
Expand Down

0 comments on commit 659edfc

Please sign in to comment.