]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 26 Oct 2006 15:00:46 +0000 (15:00 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 26 Oct 2006 15:00:46 +0000 (15:00 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3210 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/switch_ivr.c

index 68d340c67c8b56d9f82a6a9b3a6e9a08dec804e4..4b4449acf98865e22246606e654760aa6af68cf6 100644 (file)
@@ -823,7 +823,11 @@ static switch_status_t engage_device(struct private_object *tech_pvt)
        } else {
                switch_core_codec_destroy(&tech_pvt->read_codec);
                switch_core_codec_destroy(&tech_pvt->write_codec);
-               switch_core_session_destroy(&tech_pvt->session);
+               if (switch_core_session_running(tech_pvt->session)) {
+                       switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+               } else {
+                       switch_core_session_destroy(&tech_pvt->session);
+               }
        }
 
        return SWITCH_STATUS_FALSE;
index 4a6d76ff7923e27832070b670101506acb1b9bd0..2eec41403d24f3cb00329786f59c98a59956ad6e 100644 (file)
@@ -2101,6 +2101,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                        if (idx == IDX_CANCEL) {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Originate Cancelled by originator termination Cause: %d [%s]\n",
                                                                  *cause, switch_channel_cause2str(*cause));
+                               if (peer_channel) {
+                                       switch_channel_hangup(peer_channel, SWITCH_CAUSE_ORIGINATOR_CANCEL);
+                               }
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Originate Resulted in Error Cause: %d [%s]\n",
                                                                  *cause, switch_channel_cause2str(*cause));