Module: kamailio
Branch: master
Commit: 4305c501128a0d37453a39795bd00314d7f60e4f
URL: 
https://github.com/kamailio/kamailio/commit/4305c501128a0d37453a39795bd00314d7f60e4f

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2020-02-23T12:22:08+01:00

rtpproxy: do nothing in rtpproxy_manage() when used in 
event_route[tm:branch-failure:...]

- avoid duplicating sdp operations

---

Modified: src/modules/rtpproxy/rtpproxy.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/4305c501128a0d37453a39795bd00314d7f60e4f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/4305c501128a0d37453a39795bd00314d7f60e4f.patch

---

diff --git a/src/modules/rtpproxy/rtpproxy.c b/src/modules/rtpproxy/rtpproxy.c
index 972c6b1148..8aef20019f 100644
--- a/src/modules/rtpproxy/rtpproxy.c
+++ b/src/modules/rtpproxy/rtpproxy.c
@@ -1814,9 +1814,14 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char 
*ip)
        int method;
        int nosdp;
 
+       if(route_type==BRANCH_FAILURE_ROUTE) {
+               /* do nothing in branch failure event route
+                * - delete done on transaction failure route */
+               return 1;
+       }
+
        if(msg->cseq==NULL && ((parse_headers(msg, HDR_CSEQ_F, 0)==-1)
-                               || (msg->cseq==NULL)))
-       {
+                               || (msg->cseq==NULL))) {
                LM_ERR("no CSEQ header\n");
                return -1;
        }
@@ -1831,8 +1836,7 @@ rtpproxy_manage(struct sip_msg *msg, char *flags, char 
*ip)
        if(method==METHOD_CANCEL || method==METHOD_BYE)
                return unforce_rtp_proxy(msg, flags);
 
-       if(ip==NULL)
-       {
+       if(ip==NULL) {
                cp = ip_addr2a(&msg->rcv.dst_ip);
                strcpy(newip, cp);
        }


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

Reply via email to