Module: kamailio
Branch: master
Commit: 06a1d20fdcae42c8f2130c547c6c6cf5fb6dce26
URL: 
https://github.com/kamailio/kamailio/commit/06a1d20fdcae42c8f2130c547c6c6cf5fb6dce26

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2020-08-24T10:22:52+02:00

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

---

Modified: src/modules/topoh/topoh_mod.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/06a1d20fdcae42c8f2130c547c6c6cf5fb6dce26.diff
Patch: 
https://github.com/kamailio/kamailio/commit/06a1d20fdcae42c8f2130c547c6c6cf5fb6dce26.patch

---

diff --git a/src/modules/topoh/topoh_mod.c b/src/modules/topoh/topoh_mod.c
index 62606fdced..b2ee263957 100644
--- a/src/modules/topoh/topoh_mod.c
+++ b/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;


_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to