diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 158e79c25b49b3e1c87f2b710d4a01248abf621d..99e93ef72b97011d51407d6643cc7879d42ec948 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4486,14 +4486,14 @@ static int parse_ok_contact(struct sip_pvt *pvt, struct sip_request *req)
 	snprintf(pvt->our_contact, sizeof(pvt->our_contact) - 1, "<%s>", c);
 
 
+	strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1);
+	
 	/* Make sure it's a SIP URL */
 	if (strncasecmp(c, "sip:", 4)) {
 		ast_log(LOG_NOTICE, "'%s' is not a valid SIP contact (missing sip:) trying to use anyway\n", c);
 	} else
 		c += 4;
 
-	strncpy(pvt->okcontacturi, c, sizeof(pvt->okcontacturi) - 1);
-	
 	/* Ditch arguments */
 	n = strchr(c, ';');
 	if (n)