]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
disable display update when the channel has not been answered
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jan 2012 17:32:57 +0000 (11:32 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jan 2012 17:32:57 +0000 (11:32 -0600)
src/mod/endpoints/mod_sofia/mod_sofia.c

index 9ab7e25acc3db647fe587979ff63c17d8d42f53f..927c53a25367ce9db9003832d1b7a8b656b76d94 100644 (file)
@@ -2097,10 +2097,12 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
                                if (zstr(number)) {
                                        number = tech_pvt->caller_profile->destination_number;
                                }
-
-                               if (sofia_test_flag(tech_pvt, TFLAG_UPDATING_DISPLAY)) {
+                               
+                               if (sofia_test_flag(tech_pvt, TFLAG_UPDATING_DISPLAY) || !switch_channel_test_flag(channel, CF_ANSWERED)) {
                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_ERROR, 
-                                                                         "Cannot send display update to %s Did not receive reply to last update\n", switch_channel_get_name(tech_pvt->channel));
+                                                                         "Cannot send display update to %s "
+                                                                         "Did not receive reply to last update or channel has not been answered yet.\n", 
+                                                                         switch_channel_get_name(tech_pvt->channel));
                                } else {
                                        if (zstr(tech_pvt->last_sent_callee_id_name) || strcmp(tech_pvt->last_sent_callee_id_name, name) ||
                                                zstr(tech_pvt->last_sent_callee_id_number) || strcmp(tech_pvt->last_sent_callee_id_number, number)) {