diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f9b64a02cfc0fb760ca71d9b77b724ff53444a88..cb76b2212307f2da9c385a9bc17c3efc6e07af95 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17283,9 +17283,6 @@ static int sip_devicestate(void *data)
 {
 	char *host;
 	char *tmp;
-
-	struct hostent *hp;
-	struct ast_hostent ahp;
 	struct sip_peer *p;
 
 	int res = AST_DEVICE_INVALID;
@@ -17338,12 +17335,7 @@ static int sip_devicestate(void *data)
 		}
 		unref_peer(p);
 	} else {
-		char *port = strchr(host, ':');
-		if (port)
-			*port = '\0';
-		hp = ast_gethostbyname(host, &ahp);
-		if (hp)
-			res = AST_DEVICE_UNKNOWN;
+		res = AST_DEVICE_UNKNOWN;
 	}
 
 	return res;