]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
replace don't bridge when parsing replaces header on invite (also hangup)
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Apr 2010 19:26:55 +0000 (14:26 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 27 Apr 2010 19:26:55 +0000 (14:26 -0500)
src/mod/endpoints/mod_sofia/sofia.c

index 83b800a90bb9e5443d3014fe9aeb769bd2726a78..cc203dc1edf83f4ba730d48ea0f312fbd222000c 100644 (file)
@@ -6475,6 +6475,12 @@ void sofia_handle_sip_i_invite(nua_t *nua, sofia_profile_t *profile, nua_handle_
                                                                }
                                                        } else {
                                                                destination_number = switch_core_session_sprintf(b_session, "answer,intercept:%s", uuid);
+                                                               if ((c_session = switch_core_session_locate(uuid))) {
+                                                                       switch_channel_t *c_channel = switch_core_session_get_channel(c_session);
+
+                                                                       switch_channel_hangup(c_channel, SWITCH_CAUSE_ATTENDED_TRANSFER);
+                                                                       switch_core_session_rwunlock(c_session);
+                                                               }
                                                        }
                                                }