From 5975471a26275366a3852f17c3b2c2d2979efb51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20F=2E=20H=C3=B8gh?= Date: Fri, 24 Nov 2023 11:14:36 +0100 Subject: [PATCH] nathelper: Add Max-Forwards to keep-alive --- src/modules/nathelper/sip_pinger.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/nathelper/sip_pinger.h b/src/modules/nathelper/sip_pinger.h index 733e38f21c3..69cb2c85f75 100644 --- a/src/modules/nathelper/sip_pinger.h +++ b/src/modules/nathelper/sip_pinger.h @@ -152,6 +152,7 @@ static inline char *build_sipping(str *curi, struct socket_info *s, str *path, + s_len(CRLF "Call-ID: ") + sipping_callid.len + 1 + 8 + 1 + 8 + 1 + s->address_str.len + s_len(CRLF "CSeq: 1 ") + sipping_method.len + + s_len(CRLF "Max-Forwards: 70") + s_len(CRLF "Content-Length: 0" CRLF CRLF) > MAX_SIPPING_SIZE) { LM_ERR("len exceeds %d\n", MAX_SIPPING_SIZE); @@ -205,6 +206,7 @@ static inline char *build_sipping(str *curi, struct socket_info *s, str *path, append_str(p, s->address_str.s, s->address_str.len); append_fix(p, CRLF "CSeq: 1 "); append_str(p, sipping_method.s, sipping_method.len); + append_fix(p, CRLF "Max-Forwards: 70"); append_fix(p, CRLF "Content-Length: 0" CRLF CRLF); *len_p = p - buf;