]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3340
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 10 Jun 2011 14:41:30 +0000 (09:41 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 10 Jun 2011 14:41:30 +0000 (09:41 -0500)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c

index 86fa14004653e2a8f2284b19e48c30391fa9a5e5..10bf3a8b33bc813c94238f36845e9105c0bfca9f 100644 (file)
@@ -644,7 +644,6 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
                                char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_RESPONSE_HEADER_PREFIX);
                                if (sofia_use_soa(tech_pvt)) {
                                        nua_respond(tech_pvt->nh, SIP_200_OK,
-                                                               TAG_IF(is_proxy, NUTAG_AUTOANSWER(0)),
                                                                SIPTAG_CONTACT_STR(tech_pvt->profile->url),
                                                                SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
                                                                TAG_IF(call_info, SIPTAG_CALL_INFO_STR(call_info)),
index 5b130850b2d98cc8de17cf7ba5d4aebe61185d62..6b8cf8be58f8866d0ef7ebbf8535840e7df0ac9a 100644 (file)
@@ -5099,7 +5099,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                } else if (tech_pvt && sofia_test_flag(tech_pvt, TFLAG_SDP) && !r_sdp) {
                        sofia_set_flag_locked(tech_pvt, TFLAG_NOSDP_REINVITE);
-                       if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
+                       if ((switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) && sofia_test_pflag(profile, PFLAG_3PCC_PROXY)) {
                                sofia_set_flag_locked(tech_pvt, TFLAG_3PCC);
                                if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
                                        && (other_session = switch_core_session_locate(uuid))) {
index dba65d2aacce8fb4afd4dd60db3acf2572baae93..15abe43dc3605bb76cf7c717970b794e774b9372 100644 (file)
@@ -2396,7 +2396,8 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
        if (sofia_use_soa(tech_pvt)) {
                nua_invite(tech_pvt->nh,
                                   NUTAG_AUTOANSWER(0),
-                                  NUTAG_AUTOACK(0),
+                                  TAG_IF(zstr(tech_pvt->local_sdp_str), NUTAG_AUTOACK(0)),
+                                  TAG_IF(!zstr(tech_pvt->local_sdp_str), NUTAG_AUTOACK(1)),
                                   NUTAG_SESSION_TIMER(session_timeout),
                                   NUTAG_SESSION_REFRESHER(session_timeout ? nua_local_refresher : nua_no_refresher),
                                   TAG_IF(sofia_test_flag(tech_pvt, TFLAG_RECOVERED), NUTAG_INVITE_TIMER(UINT_MAX)),