From 7674260e75360421a56c952c67bd47a096cd710b Mon Sep 17 00:00:00 2001
From: Olle Johansson <oej@edvina.net>
Date: Sun, 31 Dec 2006 09:31:23 +0000
Subject: [PATCH] Add version number to useragent string - Issue #8700,
 blanchet - THANKS!

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 channels/chan_sip.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 797fb08e16..bc545e5030 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -141,6 +141,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/compiler.h"
 #include "asterisk/threadstorage.h"
 #include "asterisk/translate.h"
+#include "asterisk/version.h"
 
 #ifndef FALSE
 #define FALSE    0
@@ -16205,7 +16206,7 @@ static int reload_config(enum channelreloadreason reason)
 	global_notifyhold = FALSE;		/*!< Keep track of hold status for a peer */
 	global_alwaysauthreject = 0;
 	global_allowsubscribe = FALSE;
-	ast_copy_string(global_useragent, DEFAULT_USERAGENT, sizeof(global_useragent));
+	snprintf(global_useragent, sizeof(global_useragent), "%s %s", DEFAULT_USERAGENT, ASTERISK_VERSION);
 	ast_copy_string(default_notifymime, DEFAULT_NOTIFYMIME, sizeof(default_notifymime));
 	if (ast_strlen_zero(ast_config_AST_SYSTEM_NAME))
 		ast_copy_string(global_realm, DEFAULT_REALM, sizeof(global_realm));
-- 
GitLab