From 687a0e76b53366652363eb9f19e088aad5cd2a29 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Thu, 4 Sep 2003 04:40:37 +0000
Subject: [PATCH] Take URI from responses (bug #215)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 apps/Makefile       | 2 +-
 channels/chan_sip.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/Makefile b/apps/Makefile
index 1fec5c14b6..ead8f1034a 100755
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -11,7 +11,7 @@
 # the GNU General Public License
 #
 
-USE_MYSQL_VM_INTERFACE=1
+USE_MYSQL_VM_INTERFACE=0
 
 MLFLAGS=
 ifeq ($(USE_MYSQL_VM_INTERFACE),1)
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 5fb2118bb5..cacbba90d9 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5083,6 +5083,7 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
 		if (!p->lastinvite && !strlen(p->randdata))
 			p->needdestroy = 1;
 	} else if (!strcasecmp(cmd, "SIP/2.0")) {
+		extract_uri(p, req);
 		while(*e && (*e < 33)) e++;
 		if (sscanf(e, "%i %n", &respid, &len) != 1) {
 			ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
-- 
GitLab