Index: Makefile =================================================================== --- Makefile (revision 63983) +++ Makefile (working copy) @@ -545,7 +545,7 @@ echo ";[options]" ; \ echo ";internal_timing = yes" ; \ echo ";systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues" ; \ - echo ";autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure" ; \ + echo ";autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set" ; \ echo "; Changing the following lines may compromise your security." ; \ echo ";[files]" ; \ echo ";astctlpermissions = 0660" ; \ Index: main/asterisk.c =================================================================== --- main/asterisk.c (revision 63983) +++ main/asterisk.c (working copy) @@ -2529,8 +2529,10 @@ if (!gethostname(hostname, sizeof(hostname) - 1)) ast_copy_string(ast_config_AST_SYSTEM_NAME, hostname, sizeof(ast_config_AST_SYSTEM_NAME)); else { - ast_log(LOG_ERROR, "Cannot obtain hostname for this system. Using 'localhost' instead.\n"); - ast_copy_string(ast_config_AST_SYSTEM_NAME, "localhost", sizeof(ast_config_AST_SYSTEM_NAME)); + if (ast_config_AST_SYSTEM_NAME==""){ + ast_copy_string(ast_config_AST_SYSTEM_NAME, "localhost", sizeof(ast_config_AST_SYSTEM_NAME)); + } + ast_log(LOG_ERROR, "Cannot obtain hostname for this system. Using '%s' instead.\n",ast_config_AST_SYSTEM_NAME); } } } else if (!strcasecmp(v->name, "languageprefix")) {