diff --git a/res/res_pjsip_config_wizard.c b/res/res_pjsip_config_wizard.c
index e61b7c5cc8a1d427aef3ff520bdb6bdfc5d1444b..8611be7a9d467400113502c894f90de62f1e7ea2 100644
--- a/res/res_pjsip_config_wizard.c
+++ b/res/res_pjsip_config_wizard.c
@@ -764,18 +764,8 @@ static int handle_identify(const struct ast_sorcery *sorcery, struct object_type
 
 	if (!ast_variable_find_last_in_list(vars, "match")) {
 		for (host_counter = 0; host_counter < host_count; host_counter++) {
-			char *rhost = AST_VECTOR_GET(remote_hosts_vector, host_counter);
-			char host[strlen(rhost) + 1];
-			char *colon;
-
-			/* If there's a :port specified, we have to remove it. */
-			strcpy(host, rhost); /* Safe */
-			colon = strchr(host, ':');
-			if (colon) {
-				*colon = '\0';
-			}
-
-			variable_list_append_return(&vars, "match", host);
+			variable_list_append_return(&vars, "match",
+				AST_VECTOR_GET(remote_hosts_vector, host_counter));
 		}
 	}