diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 9d73f372cf3428fed8e7c6ca5321ec4c807aea16..4d5438a86ec0dad69ac30399f3d46cc44b8c191c 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -7325,11 +7325,12 @@ static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
 	/* Find the request URI */
 	if (req->rlPart2)
 		ast_copy_string(tmp, req->rlPart2, sizeof(tmp));
-	uri = get_in_brackets(tmp);
 	
 	if (pedanticsipchecking)
 		ast_uri_decode(tmp);
 
+	uri = get_in_brackets(tmp);
+
 	if (strncmp(uri, "sip:", 4)) {
 		ast_log(LOG_WARNING, "Huh?  Not a SIP header (%s)?\n", uri);
 		return -1;