Quellcode durchsuchen

topoh: remove the Via cookie when skipping topoh via event route

- event route is now executed with parsed sip message to be sent out
- GH #2437

(cherry picked from commit 06a1d20fdcae42c8f2130c547c6c6cf5fb6dce26)
Daniel-Constantin Mierla vor 5 Jahren
Ursprung
Commit
f8b67668b3
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen
  1. 5 4
      src/modules/topoh/topoh_mod.c

+ 5 - 4
src/modules/topoh/topoh_mod.c

@@ -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;
@@ -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;