]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9206: [mod_sofia] proxy media with enable-3pcc=proxy does not properly pass audio...
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 4 Jan 2017 00:32:26 +0000 (18:32 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 4 Jan 2017 00:32:32 +0000 (18:32 -0600)
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c

index 996e41c5430cc30b4ac21e079c41dde00b23f498..6245918fa662b0f892bbbb4104ac1d243ef3a079 100644 (file)
@@ -668,14 +668,15 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
                b_sdp = switch_channel_get_variable(channel, SWITCH_B_SDP_VARIABLE);
                switch_core_media_set_local_sdp(session, b_sdp, SWITCH_TRUE);
 
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, 
-                                                 "3PCC-PROXY nomedia - sending ack, SDP:\n%s\n", tech_pvt->mparams.local_sdp_str);
-
                if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA)) {
-                       switch_core_media_patch_sdp(tech_pvt->session);
+                       switch_core_media_patch_sdp(tech_pvt->session);                 
                        switch_core_media_proxy_remote_addr(tech_pvt->session, NULL);
                }
 
+               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, 
+                                                 "3PCC-PROXY nomedia - sending ack, SDP:\n%s\n", tech_pvt->mparams.local_sdp_str);
+
+               
                if (sofia_use_soa(tech_pvt)) {
                        nua_ack(tech_pvt->nh,
                                        TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
index b184410a892f605a3a8e321b2bb5ab60dcd9b1de..693ebcc849a598b5a9bd668308f993601a5e02e6 100644 (file)
@@ -1693,9 +1693,13 @@ static void our_sofia_event_callback(nua_event_t event,
 
                                if (switch_channel_test_flag(tech_pvt->channel, CF_PROXY_MEDIA) && r_sdp) {
                                        if (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY)) {
+                                               switch_channel_set_variable_partner(tech_pvt->channel, SWITCH_B_SDP_VARIABLE, r_sdp);
+                                               
                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "3PCC-PROXY, Got my ACK\n");
+                                               switch_core_media_proxy_remote_addr(tech_pvt->session, r_sdp);
                                                sofia_set_flag(tech_pvt, TFLAG_3PCC_HAS_ACK);
                                                sofia_clear_flag(tech_pvt, TFLAG_PASS_ACK);
+
                                        }
                                        
                                }