diff --git a/build_tools/menuselect-deps.in b/build_tools/menuselect-deps.in
index 877eff070b..52c26e14a6 100644
--- a/build_tools/menuselect-deps.in
+++ b/build_tools/menuselect-deps.in
@@ -80,3 +80,6 @@ CXX14=@PBX_CXX14@
CXX17=@PBX_CXX17@
CXX20=@PBX_CXX20@
CXX23=@PBX_CXX23@
+HAVE_SRTP_192=@PBX_SRTP_192@
+HAVE_SRTP_256=@PBX_SRTP_256@
+HAVE_SRTP_GCM=@PBX_SRTP_GCM@
diff --git a/res/Makefile b/res/Makefile
index 1915ff35d3..79a1d80a56 100644
--- a/res/Makefile
+++ b/res/Makefile
@@ -76,6 +76,21 @@ res_parking.o: _ASTCFLAGS+=$(AST_NO_FORMAT_TRUNCATION)
snmp/agent.o: _ASTCFLAGS+=-fPIC
res_snmp.o: _ASTCFLAGS+=-fPIC
+MODULE_EXCLUDE=ENABLE_SRTP_AES_192 ENABLE_SRTP_AES_256 ENABLE_SRTP_AES_GCM
+
+ifeq ($(findstring ENABLE_SRTP_AES_192,$(MENUSELECT_RES)),)
+res_srtp.o: _ASTCFLAGS+=-DENABLE_SRTP_AES_192
+endif
+
+ifeq ($(findstring ENABLE_SRTP_AES_256,$(MENUSELECT_RES)),)
+res_srtp.o: _ASTCFLAGS+=-DENABLE_SRTP_AES_256
+endif
+
+ifeq ($(findstring ENABLE_SRTP_AES_GCM,$(MENUSELECT_RES)),)
+res_srtp.o: _ASTCFLAGS+=-DENABLE_SRTP_AES_GCM
+endif
+
+
# Dependencies for res_ari_*.so are generated, so they're in this file
include ari.make
diff --git a/res/res_srtp.c b/res/res_srtp.c
index 09f33ac496..39454c6122 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -35,6 +35,32 @@
core
***/
+/*** MAKEOPTS
+
+
+ no
+ option
+ srtp
+ res_srtp
+ HAVE_SRTP_192
+
+
+ no
+ option
+ srtp
+ res_srtp
+ HAVE_SRTP_256
+
+
+ no
+ option
+ srtp
+ res_srtp
+ HAVE_SRTP_GCM
+
+
+***/
+
/* See https://docs.asterisk.org/Deployment/Secure-Calling/ */
#include "asterisk.h" /* for NULL, size_t, memcpy, etc */