honor disabled soa flag in re-invite
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16193 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
fa9900bf72
commit
f5d74122bd
|
@ -4241,6 +4241,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||
NUTAG_MEDIA_ENABLE(0),
|
||||
SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
|
||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
||||
TAG_END());
|
||||
}
|
||||
if (switch_event_create_subclass(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_REINVITE) == SWITCH_STATUS_SUCCESS) {
|
||||
|
@ -6237,6 +6238,7 @@ void sofia_info_send_sipfrag(switch_core_session_t *aleg, switch_core_session_t
|
|||
NUTAG_MEDIA_ENABLE(0),
|
||||
SIPTAG_CONTACT_STR(b_tech_pvt->reply_contact),
|
||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||
SIPTAG_PAYLOAD_STR(b_tech_pvt->local_sdp_str),
|
||||
TAG_IF(!zstr_buf(message), SIPTAG_HEADER_STR(message)),
|
||||
TAG_IF(!zstr(b_tech_pvt->user_via), SIPTAG_VIA_STR(b_tech_pvt->user_via)),
|
||||
TAG_END());
|
||||
|
|
|
@ -1795,28 +1795,52 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||
tech_pvt->route_uri = switch_core_session_strdup(tech_pvt->session, route_uri);
|
||||
}
|
||||
|
||||
nua_invite(tech_pvt->nh,
|
||||
NUTAG_AUTOANSWER(0),
|
||||
NUTAG_SESSION_TIMER(session_timeout),
|
||||
TAG_IF(tech_pvt->redirected, NUTAG_URL(tech_pvt->redirected)),
|
||||
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
|
||||
TAG_IF(!zstr(tech_pvt->rpid), SIPTAG_REMOTE_PARTY_ID_STR(tech_pvt->rpid)),
|
||||
TAG_IF(!zstr(tech_pvt->preferred_id), SIPTAG_P_PREFERRED_IDENTITY_STR(tech_pvt->preferred_id)),
|
||||
TAG_IF(!zstr(tech_pvt->asserted_id), SIPTAG_P_ASSERTED_IDENTITY_STR(tech_pvt->asserted_id)),
|
||||
TAG_IF(!zstr(tech_pvt->privacy), SIPTAG_PRIVACY_STR(tech_pvt->privacy)),
|
||||
TAG_IF(!zstr(alert_info), SIPTAG_HEADER_STR(alert_info)),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
|
||||
TAG_IF(sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID), SIPTAG_HEADER_STR("X-FS-Support: "FREESWITCH_SUPPORT)),
|
||||
TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
|
||||
TAG_IF(!zstr(route_uri), NUTAG_PROXY(route_uri)),
|
||||
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)),
|
||||
SOATAG_ADDRESS(tech_pvt->adv_sdp_audio_ip),
|
||||
SOATAG_USER_SDP_STR(tech_pvt->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)), SOATAG_HOLD(holdstr), TAG_END());
|
||||
if (sofia_use_soa(tech_pvt)) {
|
||||
nua_invite(tech_pvt->nh,
|
||||
NUTAG_AUTOANSWER(0),
|
||||
NUTAG_SESSION_TIMER(session_timeout),
|
||||
TAG_IF(tech_pvt->redirected, NUTAG_URL(tech_pvt->redirected)),
|
||||
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
|
||||
TAG_IF(!zstr(tech_pvt->rpid), SIPTAG_REMOTE_PARTY_ID_STR(tech_pvt->rpid)),
|
||||
TAG_IF(!zstr(tech_pvt->preferred_id), SIPTAG_P_PREFERRED_IDENTITY_STR(tech_pvt->preferred_id)),
|
||||
TAG_IF(!zstr(tech_pvt->asserted_id), SIPTAG_P_ASSERTED_IDENTITY_STR(tech_pvt->asserted_id)),
|
||||
TAG_IF(!zstr(tech_pvt->privacy), SIPTAG_PRIVACY_STR(tech_pvt->privacy)),
|
||||
TAG_IF(!zstr(alert_info), SIPTAG_HEADER_STR(alert_info)),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
|
||||
TAG_IF(sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID), SIPTAG_HEADER_STR("X-FS-Support: "FREESWITCH_SUPPORT)),
|
||||
TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
|
||||
TAG_IF(!zstr(route_uri), NUTAG_PROXY(route_uri)),
|
||||
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)),
|
||||
SOATAG_ADDRESS(tech_pvt->adv_sdp_audio_ip),
|
||||
SOATAG_USER_SDP_STR(tech_pvt->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)), SOATAG_HOLD(holdstr), TAG_END());
|
||||
} else {
|
||||
nua_invite(tech_pvt->nh,
|
||||
NUTAG_AUTOANSWER(0),
|
||||
NUTAG_SESSION_TIMER(session_timeout),
|
||||
TAG_IF(tech_pvt->redirected, NUTAG_URL(tech_pvt->redirected)),
|
||||
TAG_IF(!zstr(tech_pvt->user_via), SIPTAG_VIA_STR(tech_pvt->user_via)),
|
||||
TAG_IF(!zstr(tech_pvt->rpid), SIPTAG_REMOTE_PARTY_ID_STR(tech_pvt->rpid)),
|
||||
TAG_IF(!zstr(tech_pvt->preferred_id), SIPTAG_P_PREFERRED_IDENTITY_STR(tech_pvt->preferred_id)),
|
||||
TAG_IF(!zstr(tech_pvt->asserted_id), SIPTAG_P_ASSERTED_IDENTITY_STR(tech_pvt->asserted_id)),
|
||||
TAG_IF(!zstr(tech_pvt->privacy), SIPTAG_PRIVACY_STR(tech_pvt->privacy)),
|
||||
TAG_IF(!zstr(alert_info), SIPTAG_HEADER_STR(alert_info)),
|
||||
TAG_IF(!zstr(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
|
||||
TAG_IF(sofia_test_pflag(tech_pvt->profile, PFLAG_PASS_CALLEE_ID), SIPTAG_HEADER_STR("X-FS-Support: "FREESWITCH_SUPPORT)),
|
||||
TAG_IF(!zstr(max_forwards), SIPTAG_MAX_FORWARDS_STR(max_forwards)),
|
||||
TAG_IF(!zstr(route_uri), NUTAG_PROXY(route_uri)),
|
||||
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)),
|
||||
NUTAG_MEDIA_ENABLE(0),
|
||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
||||
TAG_IF(rep, SIPTAG_REPLACES_STR(rep)),
|
||||
TAG_END());
|
||||
}
|
||||
|
||||
sofia_glue_free_destination(dst);
|
||||
switch_safe_free(extra_headers);
|
||||
|
|
Loading…
Reference in New Issue