]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: fix unhold
authorMathieu Parent <math.parent@gmail.com>
Fri, 21 May 2010 00:22:32 +0000 (02:22 +0200)
committerMathieu Parent <math.parent@gmail.com>
Fri, 21 May 2010 00:22:32 +0000 (02:22 +0200)
src/mod/endpoints/mod_skinny/mod_skinny.c
src/mod/endpoints/mod_skinny/skinny_server.c

index 79eb8eee06bdc7bdfbc8103ebee4590012198dd4..ed7f481ccc4dad72a7594517545fb6c8a236972d 100644 (file)
@@ -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;
index fb71ddddd5b49fc69285bb0725e1ae7ba1cf78eb..e8106445fe3b27cc0b57bc8ef72292afbfdaca61 100644 (file)
@@ -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",