]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
cleanup
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 17 Apr 2007 14:44:22 +0000 (14:44 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 17 Apr 2007 14:44:22 +0000 (14:44 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4964 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index 62642d8f31c84a344216ca0b7ee51565dbb3d26e..6820c6ded9d38b98723e1b4789d34ef4bd65711c 100644 (file)
@@ -91,6 +91,7 @@ static switch_status_t sofia_on_init(switch_core_session_t *session)
 
        if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
                if (sofia_glue_do_invite(session) != SWITCH_STATUS_SUCCESS) {
+                       switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                        return SWITCH_STATUS_FALSE;
                }
        }
@@ -296,6 +297,7 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
                        }
 
                        if ((status = sofia_glue_tech_choose_port(tech_pvt)) != SWITCH_STATUS_SUCCESS) {
+                               switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                                return status;
                        }
 
@@ -609,6 +611,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                        if (!switch_rtp_ready(tech_pvt->rtp_session)) {
                                sofia_glue_tech_prepare_codecs(tech_pvt);
                                if ((status = sofia_glue_tech_choose_port(tech_pvt)) != SWITCH_STATUS_SUCCESS) {
+                                       switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                                        return status;
                                }
                        }
@@ -708,6 +711,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                        }
 
                                        if ((status = sofia_glue_tech_choose_port(tech_pvt)) != SWITCH_STATUS_SUCCESS) {
+                                               switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
                                                return status;
                                        }
                                        sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 0);
index 970fbde85c6d0c6eddd59e2dcd1e673cb6f19e80..6ea6768a8b3f3fe5a841c82fb54ba14fae6cb24e 100644 (file)
@@ -306,7 +306,6 @@ switch_status_t sofia_glue_tech_choose_port(private_object_t *tech_pvt)
        if (tech_pvt->profile->extrtpip) {
                if (sofia_glue_ext_address_lookup(&ip, &sdp_port, tech_pvt->profile->extrtpip, switch_core_session_get_pool(tech_pvt->session)) !=
                        SWITCH_STATUS_SUCCESS) {
-                       sofia_glue_terminate_session(&tech_pvt->session, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER, __FILE__, __LINE__);
                        return SWITCH_STATUS_FALSE;
                }
        }