Author: anthm Date: Sun Oct 8 11:51:10 2006 New Revision: 3004 Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c freeswitch/trunk/src/switch_channel.c Log: fix goofy 183 madness Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Sun Oct 8 11:51:10 2006 @@ -1916,7 +1916,7 @@ if (channel) { if (r_sdp) { if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) { - switch_channel_pre_answer(channel); + switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA); return; } else { sdp_parser_t *parser = sdp_parse(tech_pvt->home, r_sdp, (int)strlen(r_sdp), 0); @@ -1938,7 +1938,7 @@ tech_choose_port(tech_pvt); activate_rtp(tech_pvt); switch_channel_set_variable(channel, "endpoint_disposition", "EARLY MEDIA"); - switch_channel_pre_answer(channel); + switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA); return; } switch_channel_set_variable(channel, "endpoint_disposition", "NO CODECS"); @@ -2067,7 +2067,7 @@ if (r_sdp) { if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) { switch_set_flag_locked(tech_pvt, TFLAG_ANS); - switch_channel_answer(channel); + switch_channel_set_flag(channel, CF_ANSWERED); return; } else { sdp_parser_t *parser = sdp_parse(tech_pvt->home, r_sdp, (int)strlen(r_sdp), 0); @@ -2090,7 +2090,7 @@ switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER"); tech_choose_port(tech_pvt); activate_rtp(tech_pvt); - switch_channel_answer(channel); + switch_channel_set_flag(channel, CF_ANSWERED); return; } @@ -2100,7 +2100,7 @@ } else if (switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) { switch_set_flag_locked(tech_pvt, TFLAG_ANS); switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER"); - switch_channel_answer(channel); + switch_channel_set_flag(channel, CF_ANSWERED); return; } //else probably an ack } Modified: freeswitch/trunk/src/switch_channel.c ============================================================================== --- freeswitch/trunk/src/switch_channel.c (original) +++ freeswitch/trunk/src/switch_channel.c Sun Oct 8 11:51:10 2006 @@ -950,6 +950,10 @@ return SWITCH_STATUS_SUCCESS; } + if (switch_channel_test_flag(channel, CF_EARLY_MEDIA)) { + return SWITCH_STATUS_SUCCESS; + } + msg.message_id = SWITCH_MESSAGE_INDICATE_PROGRESS; msg.from = channel->name; status = switch_core_session_message_send(uuid, &msg);