From 9682599b6bd22baf02b3f860ed77d52f02ff477b Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Fri, 21 May 2010 02:22:32 +0200 Subject: [PATCH] Skinny: fix unhold --- src/mod/endpoints/mod_skinny/mod_skinny.c | 3 ++- src/mod/endpoints/mod_skinny/skinny_server.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c index 79eb8eee06..ed7f481ccc 100644 --- a/src/mod/endpoints/mod_skinny/mod_skinny.c +++ b/src/mod/endpoints/mod_skinny/mod_skinny.c @@ -1290,7 +1290,8 @@ static void close_socket(switch_socket_t **sock, skinny_profile_t *profile) static switch_status_t kill_listener(listener_t *listener, void *pvt) { - switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Killing listener.\n"); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Killing listener %s:%d.\n", + listener->device_name, listener->device_instance); switch_clear_flag(listener, LFLAG_RUNNING); close_socket(&listener->sock, listener->profile); return SWITCH_STATUS_SUCCESS; diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c index fb71ddddd5..e8106445fe 100644 --- a/src/mod/endpoints/mod_skinny/skinny_server.c +++ b/src/mod/endpoints/mod_skinny/skinny_server.c @@ -767,8 +767,6 @@ switch_status_t skinny_session_unhold_line(switch_core_session_t *session, liste send_set_speaker_mode(listener, SKINNY_SPEAKER_ON); send_select_soft_keys(listener, line_instance, tech_pvt->call_id, SKINNY_KEY_SET_RING_OUT, 0xffff); skinny_session_start_media(session, listener, line_instance); - switch_ivr_unhold(session); - send_set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_ON); return SWITCH_STATUS_SUCCESS; } @@ -1640,6 +1638,10 @@ switch_status_t skinny_handle_open_receive_channel_ack_message(listener_t *liste switch_set_flag_locked(tech_pvt, TFLAG_IO); switch_channel_mark_answered(channel); + if (switch_channel_test_flag(channel, CF_HOLD)) { + switch_ivr_unhold(session); + send_set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_ON); + } } else { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unable to find session for device %s:%d (call id=%d).\n",