]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
stop the madness (maybe)
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Oct 2009 20:59:50 +0000 (20:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 13 Oct 2009 20:59:50 +0000 (20:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15153 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c
src/switch_ivr_bridge.c
src/switch_ivr_originate.c

index 609543409bcef1b9ff04a93ebc89d5dad17ca726..0c9c0386e5ef292ad2f05fe3ac1d504057a2c9bb 100644 (file)
@@ -399,10 +399,10 @@ void sofia_send_callee_id(switch_core_session_t *session, const char *name, cons
        if (switch_strlen_zero(number)) {
                number = caller_profile->destination_number;
        }
-       
+
        if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
                switch_core_session_message_t *msg;
-               
+
                msg = switch_core_session_alloc(session_b, sizeof(*msg));
                MESSAGE_STAMP_FFL(msg);
                msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
@@ -427,7 +427,7 @@ void sofia_update_callee_id(switch_core_session_t *session, sofia_profile_t *pro
        if (sip->sip_to) {
                number = sip->sip_to->a_url->url_user;
        }
-
+       
        if ((passerted = sip_p_asserted_identity(sip))) {
                if (passerted->paid_url && passerted->paid_url->url_user) {
                        number = passerted->paid_url->url_user;
index 0718489b3e29511e79623f28fb86bb30e5497121..d37af730840afc252ab81b83f5458ca79e6882e4 100644 (file)
@@ -146,7 +146,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
        switch_ivr_bridge_data_t *data = obj;
        int stream_id = 0, pre_b = 0, ans_a = 0, ans_b = 0, originator = 0;
        switch_input_callback_function_t input_callback;
-       switch_core_session_message_t *message, msg = { 0 };
+       switch_core_session_message_t msg = { 0 };
        void *user_data;
        switch_channel_t *chan_a, *chan_b;
        switch_frame_t *read_frame;
@@ -356,11 +356,6 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
 
                }
 
-               if (switch_core_session_dequeue_message(session_b, &message) == SWITCH_STATUS_SUCCESS) {
-                       switch_core_session_receive_message(session_a, message);
-                       message = NULL;
-               }
-
                if (!ans_a && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Answer timeout hit on %s.\n", switch_channel_get_name(chan_a));
                        switch_channel_hangup(chan_a, SWITCH_CAUSE_ALLOTTED_TIMEOUT);
index 95ca08f6910dd9e41bf9331cd9a047621843da13..cb023b139c18869383a353bbaa2907ccdfc3a115 100644 (file)
@@ -1014,7 +1014,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
        char *e = NULL;
        const char *ringback_data = NULL;
        switch_codec_t *read_codec = NULL;
-       switch_core_session_message_t *message = NULL;
        switch_event_t *var_event = NULL;
        uint8_t fail_on_single_reject = 0;
        char *fail_on_single_reject_var = NULL;
@@ -1026,7 +1025,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
        int local_clobber = 0;
        const char *cancel_key = NULL;
        const char *holding = NULL;
-       switch_channel_state_t wait_state = 0;
 
        if (session) {
                const char *to_var;
@@ -1968,10 +1966,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                        }
 #endif
 
-                       if (caller_channel) {
-                               wait_state = switch_channel_get_state(caller_channel);
-                       }
-                       
                        while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) && 
                                   check_channel_status(&oglobals, originate_status, and_argc)) {
                                time_t elapsed = switch_epoch_time_now(NULL) - start;
@@ -1987,11 +1981,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        switch_ivr_parse_all_events(oglobals.session);
                                }
 
-                               if (caller_channel && switch_channel_get_state(caller_channel) != wait_state && !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
-                                       //oglobals.idx = IDX_NADA;
-                    //goto notready;
-                               }
-
                                if (!oglobals.sent_ring && !oglobals.progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
                                        oglobals.idx = IDX_TIMEOUT;
                                        goto notready;
@@ -2025,12 +2014,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                                goto notready;
                                        }
                                }
-
-                               if (oglobals.session && switch_core_session_dequeue_message(oglobals.session, &message) == SWITCH_STATUS_SUCCESS) {
-                                       switch_core_session_receive_message(oglobals.session, message);
-                                       message = NULL;
-                               }
-
+                               
                                /* read from the channel while we wait if the audio is up on it */
                                if (oglobals.session &&
                                        !switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&