diff --git a/configs/samples/prometheus.conf.sample b/configs/samples/prometheus.conf.sample index 3ee9290db9..ee4a1965ee 100644 --- a/configs/samples/prometheus.conf.sample +++ b/configs/samples/prometheus.conf.sample @@ -10,6 +10,10 @@ ; Because Prometheus scrapes statistics from HTTP servers, this module requires ; Asterisk's built-in HTTP server to be enabled and configured properly. ; +; Module Dependencies: +; only if Asterisk is build with pjproject bundled (default) +; * res_pjsip.so +; * res_pjsip_outbound_registration.so ; Settings that affect all statistic generation [general] diff --git a/res/res_prometheus.c b/res/res_prometheus.c index 11b8f0279e..4aacf6e85c 100644 --- a/res/res_prometheus.c +++ b/res/res_prometheus.c @@ -27,6 +27,7 @@ /*** MODULEINFO pjproject res_pjsip + res_pjsip_outbound_registration extended ***/ @@ -1002,6 +1003,7 @@ AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ .reload = reload_module, .load_pri = AST_MODPRI_DEFAULT, #ifdef HAVE_PJPROJECT - .requires = "res_pjsip", + /* This module explicitly calls into res_pjsip if Asterisk is built with PJSIP support, so they are required. */ + .requires = "res_pjsip,res_pjsip_outbound_registration", #endif );