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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: GitHub <[email protected]>
Date: 2021-02-04T16:51:27+01:00

Merge pull request #2621 from dvillaume/master

rtpengine : add node fallback if node ran out of ports

---

Modified: src/modules/rtpengine/rtpengine.c

---

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

---

diff --git a/src/modules/rtpengine/rtpengine.c 
b/src/modules/rtpengine/rtpengine.c
index 7eb0843793..00b27be148 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -294,6 +294,9 @@ static pv_spec_t *media_duration_pvar = NULL;
 #define RTPENGINE_SESS_LIMIT_MSG "Parallel session limit reached"
 #define RTPENGINE_SESS_LIMIT_MSG_LEN (sizeof(RTPENGINE_SESS_LIMIT_MSG)-1)
 
+#define RTPENGINE_SESS_OUT_OF_PORTS_MSG "Ran out of ports"
+#define RTPENGINE_SESS_OUT_OF_PORTS_MSG_LEN 
(sizeof(RTPENGINE_SESS_OUT_OF_PORTS_MSG)-1)
+
 char* force_send_ip_str="";
 int force_send_ip_af = AF_UNSPEC;
 
@@ -2632,6 +2635,13 @@ static bencode_item_t 
*rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
                                LM_WARN("proxy %.*s: %.*s", node->rn_url.len, 
node->rn_url.s , error.len, error.s);
                                goto select_node;
                        }
+                       if ((RTPENGINE_SESS_OUT_OF_PORTS_MSG_LEN == error.len) 
&&
+                               (strncmp(error.s, 
RTPENGINE_SESS_OUT_OF_PORTS_MSG, RTPENGINE_SESS_OUT_OF_PORTS_MSG_LEN) == 0))
+                       {
+                               LM_WARN("proxy %.*s: %.*s", node->rn_url.len, 
node->rn_url.s , error.len, error.s);
+                               goto select_node;
+                       }
+
                        LM_ERR("proxy replied with error: %.*s\n", error.len, 
error.s);
                }
                goto error;


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

Reply via email to