diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 10f2075cf42226c5fc20d24f01cf1eae0c62b985..e47a4ffc29b3302a621e625cf810e642e3165888 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4743,7 +4743,7 @@ static int sip_poke_peer(struct sip_peer *peer)
 	if (strlen(p->tohost))
 		strncpy(p->tohost, peer->tohost, sizeof(p->tohost) - 1);
 	else
-		snprintf(p->tohost, sizeof(p->tohost), "%s", inet_ntoa(p->addr.sin_addr));
+		snprintf(p->tohost, sizeof(p->tohost), "%s", inet_ntoa(peer->addr.sin_addr));
 
 	/* Recalculate our side, and recalculate Call ID */
 	memcpy(&p->ourip, myaddrfor(&p->sa.sin_addr), sizeof(p->ourip));