]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: blind transfer MODSKINNY-10
authorMathieu Parent <math.parent@gmail.com>
Tue, 27 Jul 2010 21:50:56 +0000 (23:50 +0200)
committerMathieu Parent <math.parent@gmail.com>
Tue, 27 Jul 2010 21:50:56 +0000 (23:50 +0200)
src/mod/endpoints/mod_skinny/skinny_server.c

index 194157a2159422330b9f856d36a1a6b4585c8cc4..da9513a5b5a5333f17ab408e4c96f9666da09144 100644 (file)
@@ -1265,11 +1265,17 @@ switch_status_t skinny_handle_on_hook_message(listener_t *listener, skinny_messa
 
        if(session) {
                switch_channel_t *channel = NULL;
+               private_t *tech_pvt = NULL;
 
                channel = switch_core_session_get_channel(session);
+               tech_pvt = switch_core_session_get_private(session);
 
-               if (skinny_line_get_state(listener, line_instance, call_id) != SKINNY_IN_USE_REMOTELY) {
-                       switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+               if (tech_pvt->transfer_from_call_id) { /* blind transfer */
+                       status = skinny_session_transfer(session, listener, line_instance);
+               } else {
+                       if (skinny_line_get_state(listener, line_instance, call_id) != SKINNY_IN_USE_REMOTELY) {
+                               switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+                       }
                }
        }