diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 3b04f120886131a8eceb9f06898c0d91732740e2..c51d2738d221d55604d854e6c816ed0874156995 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -600,8 +600,6 @@ static size_t WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *da
 	return realsize;
 }
 
-static const char * const global_useragent = "asterisk-libcurl-agent/1.0";
-
 static int curl_instance_init(void *data)
 {
 	CURL **curl = data;
@@ -612,7 +610,7 @@ static int curl_instance_init(void *data)
 	curl_easy_setopt(*curl, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(*curl, CURLOPT_TIMEOUT, 180);
 	curl_easy_setopt(*curl, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
-	curl_easy_setopt(*curl, CURLOPT_USERAGENT, global_useragent);
+	curl_easy_setopt(*curl, CURLOPT_USERAGENT, AST_CURL_USER_AGENT);
 
 	return 0;
 }
diff --git a/include/asterisk.h b/include/asterisk.h
index 6a02908569adcfe3f7cfb5f0a490961e2abfb5d8..1e5fd19844d9b5f50618d0ce33ed8a33222a8be2 100644
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -41,6 +41,8 @@
 #endif
 
 
+#define AST_CURL_USER_AGENT "asterisk-libcurl-agent/1.0"
+
 #define DEFAULT_LANGUAGE "en"
 
 #define DEFAULT_SAMPLE_RATE 8000
diff --git a/res/res_http_media_cache.c b/res/res_http_media_cache.c
index 12e7aeedf4b919cd4dde5eed9acaab9140cfb13c..a4efadf6e7648b8d4aa302627b9beed58ed9c79e 100644
--- a/res/res_http_media_cache.c
+++ b/res/res_http_media_cache.c
@@ -42,8 +42,6 @@
 #include "asterisk/threadstorage.h"
 #include "asterisk/uri.h"
 
-#define GLOBAL_USERAGENT "asterisk-libcurl-agent/1.0"
-
 #define MAX_HEADER_LENGTH 1023
 
 /*! \brief Data passed to cURL callbacks */
@@ -338,7 +336,7 @@ static CURL *get_curl_instance(struct curl_bucket_file_data *cb_data)
 	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);
 	curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, curl_header_callback);
-	curl_easy_setopt(curl, CURLOPT_USERAGENT, GLOBAL_USERAGENT);
+	curl_easy_setopt(curl, CURLOPT_USERAGENT, AST_CURL_USER_AGENT);
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
 	curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 8);
 	curl_easy_setopt(curl, CURLOPT_URL, ast_sorcery_object_get_id(cb_data->bucket_file));
diff --git a/res/res_stir_shaken/curl.c b/res/res_stir_shaken/curl.c
index 97c1098a51ebaa7c84466bc0de811b7f2bc02c94..b31160ffb03164b62526df9f8c5bc7d2d69af2eb 100644
--- a/res/res_stir_shaken/curl.c
+++ b/res/res_stir_shaken/curl.c
@@ -31,9 +31,6 @@
 /* Used to check CURL headers */
 #define MAX_HEADER_LENGTH 1023
 
-/* Used for CURL requests */
-#define GLOBAL_USERAGENT "asterisk-libcurl-agent/1.0"
-
 /* CURL callback data to avoid storing useless info in AstDB */
 struct curl_cb_data {
 	char *cache_control;
@@ -144,7 +141,7 @@ static CURL *get_curl_instance(struct curl_cb_data *data)
 
 	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, curl_timeout);
-	curl_easy_setopt(curl, CURLOPT_USERAGENT, GLOBAL_USERAGENT);
+	curl_easy_setopt(curl, CURLOPT_USERAGENT, AST_CURL_USER_AGENT);
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
 	curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, curl_header_callback);
 	curl_easy_setopt(curl, CURLOPT_HEADERDATA, data);
diff --git a/tests/test_res_prometheus.c b/tests/test_res_prometheus.c
index 2719267d087363ca6b385159969d9c3466b955e8..4df4cb956130128b8722d6d8a6036dd58d3adee6 100644
--- a/tests/test_res_prometheus.c
+++ b/tests/test_res_prometheus.c
@@ -54,8 +54,6 @@ static void prometheus_metric_free_wrapper(void *ptr)
 	}
 }
 
-#define GLOBAL_USERAGENT "asterisk-libcurl-agent/1.0"
-
 static struct prometheus_general_config *config_alloc(void)
 {
 	struct prometheus_general_config *config;
@@ -84,7 +82,7 @@ static CURL *get_curl_instance(void)
 
 	curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
 	curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180);
-	curl_easy_setopt(curl, CURLOPT_USERAGENT, GLOBAL_USERAGENT);
+	curl_easy_setopt(curl, CURLOPT_USERAGENT, AST_CURL_USER_AGENT);
 	curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
 	curl_easy_setopt(curl, CURLOPT_URL, server_uri);