From d4c56db14ddfd7c0685bc5e13c15a6bd58d9fa42 Mon Sep 17 00:00:00 2001
From: Nathan Neulinger <nneul@neulinger.org>
Date: Mon, 30 Sep 2013 09:32:14 -0500
Subject: [PATCH] FS-5826 - seems to improve behavior, possibility of issue
 with FS-5180, but not enough details on that problem to tell. Current symptom
 is definitely measurable though. --resolve

---
 src/mod/endpoints/mod_skinny/skinny_server.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c
index c054734656..4062a3f53c 100644
--- a/src/mod/endpoints/mod_skinny/skinny_server.c
+++ b/src/mod/endpoints/mod_skinny/skinny_server.c
@@ -592,7 +592,6 @@ int skinny_ring_lines_callback(void *pArg, int argc, char **argv, char **columnN
 			device_name, device_instance, &listener);
 	if(listener && helper->tech_pvt->session && helper->remote_session) {
 		switch_channel_t *channel = switch_core_session_get_channel(helper->tech_pvt->session);
-		switch_channel_t *remchannel = switch_core_session_get_channel(helper->remote_session);
 		switch_channel_set_state(channel, CS_ROUTING);
 		helper->lines_count++;
 		switch_channel_set_variable(channel, "effective_callee_id_number", value);
@@ -632,7 +631,7 @@ int skinny_ring_lines_callback(void *pArg, int argc, char **argv, char **columnN
 		skinny_session_send_call_info(helper->tech_pvt->session, listener, line_instance);
 		send_set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_BLINK);
 		send_set_ringer(listener, SKINNY_RING_INSIDE, SKINNY_RING_FOREVER, 0, helper->tech_pvt->call_id);
-		switch_channel_ring_ready(remchannel);
+		switch_channel_ring_ready(channel);
 	}
 	return 0;
 }