]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
calls both ways still gotta push more into the core
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 22 Dec 2012 14:36:15 +0000 (08:36 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Apr 2013 02:27:15 +0000 (21:27 -0500)
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_media.c

index ac1d55147f02ac9f7f91bf09a0dcd400670e467c..784eed3e5fdeff1797e8a6bb5ce51f1047a3b15f 100644 (file)
@@ -4847,9 +4847,9 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                        caller_profile->network_addr = switch_core_strdup(caller_profile->pool, network_ip);
                }
 
-               tech_pvt->mparams->last_sdp_str = NULL;
+               tech_pvt->mparams.last_sdp_str = NULL;
                if (!sofia_use_soa(tech_pvt) && sip->sip_payload && sip->sip_payload->pl_data) {
-                       tech_pvt->mparams->last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
+                       tech_pvt->mparams.last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
                }
 
 
@@ -5186,8 +5186,8 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
 
                                        if (sip->sip_payload && sip->sip_payload->pl_data &&
                                                sip->sip_content_type && sip->sip_content_type->c_subtype && switch_stristr("sdp", sip->sip_content_type->c_subtype)) {
-                                               tech_pvt->mparams->remote_sdp_str = switch_core_session_strdup(tech_pvt->session, sip->sip_payload->pl_data);
-                                               r_sdp = tech_pvt->mparams->remote_sdp_str;
+                                               tech_pvt->mparams.remote_sdp_str = switch_core_session_strdup(tech_pvt->session, sip->sip_payload->pl_data);
+                                               r_sdp = tech_pvt->mparams.remote_sdp_str;
                                                switch_core_media_proxy_remote_addr(session, NULL);
                                        }
                                        
@@ -5529,8 +5529,8 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                }
        }
 
-       if (status > 100 && status < 300 && tech_pvt && !sofia_use_soa(tech_pvt) && !r_sdp && tech_pvt->mparams->last_sdp_str) {
-               r_sdp = tech_pvt->mparams->last_sdp_str;
+       if (status > 100 && status < 300 && tech_pvt && !sofia_use_soa(tech_pvt) && !r_sdp && tech_pvt->mparams.last_sdp_str) {
+               r_sdp = tech_pvt->mparams.last_sdp_str;
        }
 
        if ((channel && (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA))) ||
@@ -5585,12 +5585,12 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                if (r_sdp) {
 
-                       if (!(profile->mndlb & SM_NDLB_ALLOW_NONDUP_SDP) || (!zstr(tech_pvt->mparams->remote_sdp_str) && !strcmp(tech_pvt->mparams->remote_sdp_str, r_sdp))) {
+                       if (!(profile->mndlb & SM_NDLB_ALLOW_NONDUP_SDP) || (!zstr(tech_pvt->mparams.remote_sdp_str) && !strcmp(tech_pvt->mparams.remote_sdp_str, r_sdp))) {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Duplicate SDP\n%s\n", r_sdp);
                                is_dup_sdp = 1;
                        } else {
                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Remote SDP:\n%s\n", r_sdp);
-                               tech_pvt->mparams->remote_sdp_str = switch_core_session_strdup(session, r_sdp);
+                               tech_pvt->mparams.remote_sdp_str = switch_core_session_strdup(session, r_sdp);
                                switch_channel_set_variable(channel, SWITCH_R_SDP_VARIABLE, r_sdp);
 
                                if ((sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) || switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND)) {
@@ -5805,7 +5805,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                } else {
                                        uint8_t match = 0;
 
-                                       if (tech_pvt->mparams->num_codecs) {
+                                       if (tech_pvt->mparams.num_codecs) {
                                                match = sofia_media_negotiate_sdp(session, r_sdp);
                                        }
 
@@ -5895,7 +5895,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                if (sofia_use_soa(tech_pvt)) {
                                                        nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                                SIPTAG_CONTACT_STR(tech_pvt->profile->url),
-                                                                               SOATAG_USER_SDP_STR(tech_pvt->mparams->local_sdp_str),
+                                                                               SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
                                                                                SOATAG_REUSE_REJECTED(1),
                                                                                SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"),
                                                                                TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());
@@ -5903,7 +5903,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                        nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                                NUTAG_MEDIA_ENABLE(0),
                                                                                SIPTAG_CONTACT_STR(tech_pvt->profile->url),
-                                                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams->local_sdp_str), TAG_END());
+                                                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
                                                }
                                        }
                                } else if (sofia_test_pflag(profile, PFLAG_3PCC_PROXY)) {
@@ -6011,7 +6011,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                                if (sofia_use_soa(tech_pvt)) {
                                                                        nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                                                SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
-                                                                                               SOATAG_USER_SDP_STR(tech_pvt->mparams->local_sdp_str),
+                                                                                               SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
                                                                                                SOATAG_REUSE_REJECTED(1),
                                                                                                SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"),
                                                                                                TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());
@@ -6019,7 +6019,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                                        nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                                                NUTAG_MEDIA_ENABLE(0),
                                                                                                SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
-                                                                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams->local_sdp_str), TAG_END());
+                                                                                               SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
                                                                }
 
                                                                switch_channel_set_flag(channel, CF_PROXY_MODE);
@@ -6098,7 +6098,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                                        switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);
 
-                                       if (tech_pvt->mparams->num_codecs) {
+                                       if (tech_pvt->mparams.num_codecs) {
                                                match = sofia_media_negotiate_sdp(session, r_sdp);
                                        }
                                        
@@ -6136,7 +6136,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                        if (sofia_use_soa(tech_pvt)) {
                                                nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                        SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
-                                                                       SOATAG_USER_SDP_STR(tech_pvt->mparams->local_sdp_str),
+                                                                       SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
                                                                        SOATAG_REUSE_REJECTED(1),
                                                                        SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"),
                                                                        TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());
@@ -6144,7 +6144,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                                nua_respond(tech_pvt->nh, SIP_200_OK,
                                                                        NUTAG_MEDIA_ENABLE(0),
                                                                        SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
-                                                                       SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams->local_sdp_str), TAG_END());
+                                                                       SIPTAG_CONTENT_TYPE_STR("application/sdp"), SIPTAG_PAYLOAD_STR(tech_pvt->mparams.local_sdp_str), TAG_END());
                                        }
                                        if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REINVITE) == SWITCH_STATUS_SUCCESS) {
                                                switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "Unique-ID", switch_core_session_get_uuid(session));
@@ -6162,7 +6162,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                        switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);
 
-                       if (tech_pvt->mparams->num_codecs) {
+                       if (tech_pvt->mparams.num_codecs) {
                                match = sofia_media_negotiate_sdp(session, r_sdp);
                        }
                        if (match) {
@@ -6222,7 +6222,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                uint8_t match = 0;
                                int is_ok = 1;
 
-                               if (tech_pvt->mparams->num_codecs) {
+                               if (tech_pvt->mparams.num_codecs) {
                                        match = sofia_media_negotiate_sdp(session, r_sdp);
                                }
 
@@ -6318,7 +6318,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                } else {
                                        uint8_t match = 0;
 
-                                       if (tech_pvt->mparams->num_codecs) {
+                                       if (tech_pvt->mparams.num_codecs) {
                                                match = sofia_media_negotiate_sdp(session, r_sdp);
                                        }
 
@@ -7791,8 +7791,8 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
 
 
        
-       tech_pvt->mparams->remote_ip = switch_core_session_strdup(session, network_ip);
-       tech_pvt->mparams->remote_port = network_port;
+       tech_pvt->mparams.remote_ip = switch_core_session_strdup(session, network_ip);
+       tech_pvt->mparams.remote_port = network_port;
 
        channel = tech_pvt->channel = switch_core_session_get_channel(session);
 
@@ -7813,7 +7813,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
 
        if (sip->sip_contact && sip->sip_contact->m_url) {
                char tmp[35] = "";
-               const char *ipv6 = strchr(tech_pvt->mparams->remote_ip, ':');
+               const char *ipv6 = strchr(tech_pvt->mparams.remote_ip, ':');
 
                transport = sofia_glue_url2transport(sip->sip_contact->m_url);
 
@@ -7821,10 +7821,10 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                        switch_core_session_sprintf(session,
                                                                                "sip:%s@%s%s%s:%d;transport=%s",
                                                                                sip->sip_contact->m_url->url_user,
-                                                                               ipv6 ? "[" : "", tech_pvt->mparams->remote_ip, ipv6 ? "]" : "", tech_pvt->mparams->remote_port, sofia_glue_transport2str(transport));
+                                                                               ipv6 ? "[" : "", tech_pvt->mparams.remote_ip, ipv6 ? "]" : "", tech_pvt->mparams.remote_port, sofia_glue_transport2str(transport));
 
-               switch_channel_set_variable(channel, "sip_received_ip", tech_pvt->mparams->remote_ip);
-               snprintf(tmp, sizeof(tmp), "%d", tech_pvt->mparams->remote_port);
+               switch_channel_set_variable(channel, "sip_received_ip", tech_pvt->mparams.remote_ip);
+               snprintf(tmp, sizeof(tmp), "%d", tech_pvt->mparams.remote_port);
                switch_channel_set_variable(channel, "sip_received_port", tmp);
        }
 
@@ -8025,7 +8025,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                                                                                        "sip:%s@%s%s%s:%d;transport=%s",
                                                                                        user, ipv6 ? "[" : "", host, ipv6 ? "]" : "", port, sofia_glue_transport2str(transport));
 
-                       if (sofia_glue_check_nat(profile, tech_pvt->mparams->remote_ip)) {
+                       if (sofia_glue_check_nat(profile, tech_pvt->mparams.remote_ip)) {
                                url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_public_url : profile->public_url;
                                check_nat = 1;
                        } else {
@@ -8065,7 +8065,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
 
                } else {
                        const char *url = NULL;
-                       if (sofia_glue_check_nat(profile, tech_pvt->mparams->remote_ip)) {
+                       if (sofia_glue_check_nat(profile, tech_pvt->mparams.remote_ip)) {
                                url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_public_url : profile->public_url;
                        } else {
                                url = (sofia_glue_transport_has_tls(transport)) ? profile->tls_url : profile->url;
@@ -8087,7 +8087,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
                }
        }
 
-       if (sofia_glue_check_nat(profile, tech_pvt->mparams->remote_ip)) {
+       if (sofia_glue_check_nat(profile, tech_pvt->mparams.remote_ip)) {
                tech_pvt->user_via = sofia_glue_create_external_via(session, profile, tech_pvt->transport);
                nua_set_hparams(tech_pvt->nh, SIPTAG_VIA_STR(tech_pvt->user_via), TAG_END());
        }
index 5e2546730c3807a33c3f04ce4ec95794bd5fad73..659c0c87556c50503dd613638f14bed1ef7f5d52 100644 (file)
@@ -92,7 +92,7 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
 
        tech_pvt->profile = profile;
 
-       tech_pvt->mparams->rtpip = switch_core_session_strdup(session, profile->rtpip[profile->rtpip_next++]);
+       tech_pvt->mparams.rtpip = switch_core_session_strdup(session, profile->rtpip[profile->rtpip_next++]);
        if (profile->rtpip_next >= profile->rtpip_index) {
                profile->rtpip_next = 0;
        }
@@ -104,7 +104,7 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
        if (tech_pvt->bte) {
                tech_pvt->recv_te = tech_pvt->te = tech_pvt->bte;
        } else if (!tech_pvt->te) {
-               tech_pvt->mparams->recv_te = tech_pvt->mparams->te = profile->te;
+               tech_pvt->mparams.recv_te = tech_pvt->mparams.te = profile->te;
        }
 
        tech_pvt->dtmf_type = tech_pvt->profile->dtmf_type;
@@ -140,25 +140,25 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
 
 
 
-       tech_pvt->mparams->ndlb = tech_pvt->profile->mndlb;
-       tech_pvt->mparams->inbound_codec_string = profile->inbound_codec_string;
-       tech_pvt->mparams->outbound_codec_string = profile->outbound_codec_string;
-       tech_pvt->mparams->auto_rtp_bugs = profile->auto_rtp_bugs;
-       tech_pvt->mparams->timer_name = profile->timer_name;
-       tech_pvt->mparams->vflags = profile->vflags;
-       tech_pvt->mparams->manual_rtp_bugs = profile->manual_rtp_bugs;
-       tech_pvt->mparams->manual_video_rtp_bugs = profile->manual_video_rtp_bugs;
-       tech_pvt->mparams->extsipip = profile->extsipip;
-       tech_pvt->mparams->local_network = profile->local_network;
-       tech_pvt->mparams->mutex = tech_pvt->sofia_mutex;
-       tech_pvt->mparams->sipip = profile->sipip;
-       tech_pvt->mparams->jb_msec = profile->jb_msec;
-       tech_pvt->mparams->rtcp_audio_interval_msec = profile->rtcp_audio_interval_msec;
-       tech_pvt->mparams->rtcp_video_interval_msec = profile->rtcp_video_interval_msec;
-       tech_pvt->mparams->sdp_username = profile->sdp_username;
+       tech_pvt->mparams.ndlb = tech_pvt->profile->mndlb;
+       tech_pvt->mparams.inbound_codec_string = profile->inbound_codec_string;
+       tech_pvt->mparams.outbound_codec_string = profile->outbound_codec_string;
+       tech_pvt->mparams.auto_rtp_bugs = profile->auto_rtp_bugs;
+       tech_pvt->mparams.timer_name = profile->timer_name;
+       tech_pvt->mparams.vflags = profile->vflags;
+       tech_pvt->mparams.manual_rtp_bugs = profile->manual_rtp_bugs;
+       tech_pvt->mparams.manual_video_rtp_bugs = profile->manual_video_rtp_bugs;
+       tech_pvt->mparams.extsipip = profile->extsipip;
+       tech_pvt->mparams.local_network = profile->local_network;
+       tech_pvt->mparams.mutex = tech_pvt->sofia_mutex;
+       tech_pvt->mparams.sipip = profile->sipip;
+       tech_pvt->mparams.jb_msec = profile->jb_msec;
+       tech_pvt->mparams.rtcp_audio_interval_msec = profile->rtcp_audio_interval_msec;
+       tech_pvt->mparams.rtcp_video_interval_msec = profile->rtcp_video_interval_msec;
+       tech_pvt->mparams.sdp_username = profile->sdp_username;
 
 
-       switch_media_handle_create(&tech_pvt->media_handle, session, tech_pvt->mparams);
+       switch_media_handle_create(&tech_pvt->media_handle, session, &tech_pvt->mparams);
        switch_media_handle_set_media_flags(tech_pvt->media_handle, tech_pvt->profile->media_flags);
 
 
@@ -717,7 +717,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                return status;
        }
 
-       if (!switch_channel_get_private(tech_pvt->channel, "t38_options") || zstr(tech_pvt->mparams->local_sdp_str)) {
+       if (!switch_channel_get_private(tech_pvt->channel, "t38_options") || zstr(tech_pvt->mparams.local_sdp_str)) {
                switch_core_media_gen_local_sdp(session, NULL, 0, NULL, 0);
        }
 
@@ -764,7 +764,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
 
                        sipip = tech_pvt->profile->sipip;
 
-                       if (!zstr(tech_pvt->mparams->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip)) {
+                       if (!zstr(tech_pvt->mparams.remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip)) {
                                sipip = tech_pvt->profile->extsipip;
                        }
 
@@ -804,7 +804,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                }
 
                if (sofia_test_pflag(tech_pvt->profile, PFLAG_AUTO_NAT)) {
-                       if (!zstr(tech_pvt->mparams->remote_ip) && !zstr(tech_pvt->profile->extsipip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip)) {
+                       if (!zstr(tech_pvt->mparams.remote_ip) && !zstr(tech_pvt->profile->extsipip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip)) {
                                rpid_domain = tech_pvt->profile->extsipip;
                        } else {
                                rpid_domain = tech_pvt->profile->sipip;
@@ -838,7 +838,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                        }
                }
 
-               if (!zstr(tech_pvt->mparams->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip)) {
+               if (!zstr(tech_pvt->mparams.remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip)) {
                        tech_pvt->user_via = sofia_glue_create_external_via(session, tech_pvt->profile, tech_pvt->transport);
                }
 
@@ -853,7 +853,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                char *ip_addr = tech_pvt->profile->sipip;
                                char *ipv6;
 
-                               if ( !zstr(tech_pvt->mparams->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip ) ) {
+                               if ( !zstr(tech_pvt->mparams.remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip ) ) {
                                        ip_addr = tech_pvt->profile->extsipip;
                                }
 
@@ -870,7 +870,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                if (sofia_glue_transport_has_tls(tech_pvt->transport)) {
                                        tech_pvt->invite_contact = tech_pvt->profile->tls_url;
                                } else {
-                                       if (!zstr(tech_pvt->mparams->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip)) {
+                                       if (!zstr(tech_pvt->mparams.remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip)) {
                                                tech_pvt->invite_contact = tech_pvt->profile->public_url;
                                        } else {
                                                tech_pvt->invite_contact = tech_pvt->profile->url;
@@ -1179,7 +1179,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                tech_pvt->nh->nh_has_invite = 1;
        }
 
-       if ((mp = sofia_media_get_multipart(session, SOFIA_MULTIPART_PREFIX, tech_pvt->mparams->local_sdp_str, &mp_type))) {
+       if ((mp = sofia_media_get_multipart(session, SOFIA_MULTIPART_PREFIX, tech_pvt->mparams.local_sdp_str, &mp_type))) {
                sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);
        }
 
@@ -1189,16 +1189,16 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                tech_pvt->session_refresher = nua_no_refresher;
        }
 
-       if (tech_pvt->mparams->local_sdp_str) {
+       if (tech_pvt->mparams.local_sdp_str) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
-                                                 "Local SDP:\n%s\n", tech_pvt->mparams->local_sdp_str);
+                                                 "Local SDP:\n%s\n", tech_pvt->mparams.local_sdp_str);
        }
 
        if (sofia_use_soa(tech_pvt)) {
                nua_invite(tech_pvt->nh,
                                   NUTAG_AUTOANSWER(0),
-                                  //TAG_IF(zstr(tech_pvt->mparams->local_sdp_str), NUTAG_AUTOACK(0)),
-                                  //TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), NUTAG_AUTOACK(1)),
+                                  //TAG_IF(zstr(tech_pvt->mparams.local_sdp_str), NUTAG_AUTOACK(0)),
+                                  //TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), NUTAG_AUTOACK(1)),
                                   // The code above is breaking things...... grrr WE need this because we handle our own acks and there are 3pcc cases in there too
                                   NUTAG_AUTOACK(0),
                                   NUTAG_SESSION_TIMER(tech_pvt->session_timeout),
@@ -1222,16 +1222,16 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                   TAG_IF(!zstr(route), SIPTAG_ROUTE_STR(route)),
                                   TAG_IF(tech_pvt->profile->minimum_session_expires, NUTAG_MIN_SE(tech_pvt->profile->minimum_session_expires)),
                                   TAG_IF(cseq, SIPTAG_CSEQ(cseq)),
-                                  TAG_IF(zstr(tech_pvt->mparams->local_sdp_str), SIPTAG_PAYLOAD_STR("")),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_ADDRESS(tech_pvt->mparams->adv_sdp_audio_ip)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_USER_SDP_STR(tech_pvt->mparams->local_sdp_str)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_REUSE_REJECTED(1)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_ORDERED_USER(1)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL)),
+                                  TAG_IF(zstr(tech_pvt->mparams.local_sdp_str), SIPTAG_PAYLOAD_STR("")),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_ADDRESS(tech_pvt->mparams.adv_sdp_audio_ip)),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str)),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_REUSE_REJECTED(1)),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_ORDERED_USER(1)),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE)),
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL)),
                                   TAG_IF(rep, SIPTAG_REPLACES_STR(rep)),
                                   TAG_IF(!require_timer, NUTAG_TIMER_AUTOREQUIRE(0)),
-                                  TAG_IF(!zstr(tech_pvt->mparams->local_sdp_str), SOATAG_HOLD(holdstr)), TAG_END());
+                                  TAG_IF(!zstr(tech_pvt->mparams.local_sdp_str), SOATAG_HOLD(holdstr)), TAG_END());
        } else {
                nua_invite(tech_pvt->nh,
                                   NUTAG_AUTOANSWER(0),
@@ -1260,7 +1260,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                                   TAG_IF(cseq, SIPTAG_CSEQ(cseq)),
                                   NUTAG_MEDIA_ENABLE(0),
                                   SIPTAG_CONTENT_TYPE_STR(mp_type ? mp_type : "application/sdp"),
-                                  SIPTAG_PAYLOAD_STR(mp ? mp : tech_pvt->mparams->local_sdp_str), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
+                                  SIPTAG_PAYLOAD_STR(mp ? mp : tech_pvt->mparams.local_sdp_str), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
        }
 
        sofia_glue_free_destination(dst);
@@ -1282,7 +1282,7 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session)
        switch_mutex_lock(tech_pvt->sofia_mutex);
        caller_profile = switch_channel_get_caller_profile(channel);
 
-       if (!zstr(tech_pvt->mparams->remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams->remote_ip)) {
+       if (!zstr(tech_pvt->mparams.remote_ip) && sofia_glue_check_nat(tech_pvt->profile, tech_pvt->mparams.remote_ip)) {
                sipip = tech_pvt->profile->extsipip;
                contact_url = tech_pvt->profile->public_url;
        } else {
@@ -1304,8 +1304,8 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session)
                nua_invite(tech_pvt->nh2,
                                   SIPTAG_CONTACT_STR(contact_url),
                                   TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
-                                  SOATAG_ADDRESS(tech_pvt->mparams->adv_sdp_audio_ip),
-                                  SOATAG_USER_SDP_STR(tech_pvt->mparams->local_sdp_str),
+                                  SOATAG_ADDRESS(tech_pvt->mparams.adv_sdp_audio_ip),
+                                  SOATAG_USER_SDP_STR(tech_pvt->mparams.local_sdp_str),
                                   SOATAG_REUSE_REJECTED(1),
                                   SOATAG_ORDERED_USER(1),
                                   SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE), SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), TAG_END());
@@ -1815,7 +1815,7 @@ int sofia_recover_callback(switch_core_session_t *session)
        switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
        switch_mutex_init(&tech_pvt->sofia_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
 
-       tech_pvt->mparams->remote_ip = (char *) switch_channel_get_variable(channel, "sip_network_ip");
+       tech_pvt->mparams.remote_ip = (char *) switch_channel_get_variable(channel, "sip_network_ip");
        tech_pvt->remote_port = atoi(switch_str_nil(switch_channel_get_variable(channel, "sip_network_port")));
        tech_pvt->caller_profile = switch_channel_get_caller_profile(channel);
 
@@ -1875,7 +1875,7 @@ int sofia_recover_callback(switch_core_session_t *session)
        switch_core_session_get_recovery_crypto_key(session, SWITCH_MEDIA_TYPE_VIDEO, "srtp_remote_video_crypto_key");
 
        if ((tmp = switch_channel_get_variable(channel, "sip_local_sdp_str"))) {
-               tech_pvt->mparams->local_sdp_str = switch_core_session_strdup(session, tmp);
+               tech_pvt->mparams.local_sdp_str = switch_core_session_strdup(session, tmp);
        }
 
        if ((tmp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE))) {
@@ -1930,7 +1930,7 @@ int sofia_recover_callback(switch_core_session_t *session)
                        
                        switch_core_media_set_codec(tech_pvt->session, 1, tech_pvt->profile->codec_flags);
 
-                       tech_pvt->mparams->adv_sdp_audio_ip = tech_pvt->extrtpip = (char *) ip;
+                       tech_pvt->mparams.adv_sdp_audio_ip = tech_pvt->extrtpip = (char *) ip;
                        tech_pvt->adv_sdp_audio_port = tech_pvt->local_sdp_audio_port = (switch_port_t)atoi(port);
 
                        if (!zstr(ip)) {
@@ -1939,7 +1939,7 @@ int sofia_recover_callback(switch_core_session_t *session)
                        }
 
                        if (!zstr(a_ip)) {
-                               tech_pvt->mparams->adv_sdp_audio_ip = switch_core_session_strdup(session, a_ip);
+                               tech_pvt->mparams.adv_sdp_audio_ip = switch_core_session_strdup(session, a_ip);
                        }
 
                        if (r_ip && r_port) {
index 9f84a0f3f972b52a4f2fb5536cb2be974f97bd48..80a2f4dd69011995571c16b473559ac4605d5a60 100644 (file)
@@ -123,8 +123,8 @@ switch_status_t sofia_media_activate_rtp(private_object_t *tech_pvt)
        switch_mutex_unlock(tech_pvt->sofia_mutex);
 
        ///HACK REMOVE ME
-       tech_pvt->rtp_session = tech_pvt->mparams->rtp_session;
-       tech_pvt->video_rtp_session = tech_pvt->mparams->video_rtp_session;
+       tech_pvt->rtp_session = tech_pvt->mparams.rtp_session;
+       tech_pvt->video_rtp_session = tech_pvt->mparams.video_rtp_session;
 
        if (status == SWITCH_STATUS_SUCCESS) {
                sofia_set_flag(tech_pvt, TFLAG_RTP);