mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 02:22:56 +00:00
SFSIP-195
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16250 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ae7e03da12
commit
5111bbb3da
@ -579,6 +579,7 @@ struct private_object {
|
|||||||
switch_rtp_crypto_key_type_t crypto_recv_type;
|
switch_rtp_crypto_key_type_t crypto_recv_type;
|
||||||
switch_rtp_crypto_key_type_t crypto_type;
|
switch_rtp_crypto_key_type_t crypto_type;
|
||||||
char *local_sdp_str;
|
char *local_sdp_str;
|
||||||
|
char *last_sdp_str;
|
||||||
char *dest;
|
char *dest;
|
||||||
char *dest_to;
|
char *dest_to;
|
||||||
char *key;
|
char *key;
|
||||||
|
@ -3412,6 +3412,11 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
|
|||||||
|
|
||||||
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
switch_channel_clear_flag(channel, CF_REQ_MEDIA);
|
||||||
|
|
||||||
|
tech_pvt->last_sdp_str = NULL;
|
||||||
|
if (!sofia_use_soa(tech_pvt) && sip->sip_payload && sip->sip_payload->pl_data) {
|
||||||
|
tech_pvt->last_sdp_str = switch_core_session_strdup(session, sip->sip_payload->pl_data);
|
||||||
|
}
|
||||||
|
|
||||||
if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
|
if (sofia_test_pflag(profile, PFLAG_MANAGE_SHARED_APPEARANCE)) {
|
||||||
if (channel && sip->sip_call_info) {
|
if (channel && sip->sip_call_info) {
|
||||||
char *p;
|
char *p;
|
||||||
@ -3833,6 +3838,20 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
NUTAG_ANSWER_SENT_REF(answer_sent),
|
NUTAG_ANSWER_SENT_REF(answer_sent),
|
||||||
SIPTAG_REPLACES_STR_REF(replaces_str), SOATAG_LOCAL_SDP_STR_REF(l_sdp), SOATAG_REMOTE_SDP_STR_REF(r_sdp), TAG_END());
|
SIPTAG_REPLACES_STR_REF(replaces_str), SOATAG_LOCAL_SDP_STR_REF(l_sdp), SOATAG_REMOTE_SDP_STR_REF(r_sdp), TAG_END());
|
||||||
|
|
||||||
|
|
||||||
|
if (session) {
|
||||||
|
channel = switch_core_session_get_channel(session);
|
||||||
|
tech_pvt = switch_core_session_get_private(session);
|
||||||
|
|
||||||
|
if (!tech_pvt || !tech_pvt->nh) {
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (status > 100 && status < 300 && tech_pvt && !sofia_use_soa(tech_pvt) && !r_sdp && tech_pvt->last_sdp_str) {
|
||||||
|
r_sdp = tech_pvt->last_sdp_str;
|
||||||
|
}
|
||||||
|
|
||||||
/* This marr in our code brought to you by people who can't read........*/
|
/* This marr in our code brought to you by people who can't read........*/
|
||||||
if (profile->ndlb & PFLAG_NDLB_ALLOW_BAD_IANANAME && r_sdp && (p = (char *) switch_stristr("g729a/8000", r_sdp))) {
|
if (profile->ndlb & PFLAG_NDLB_ALLOW_BAD_IANANAME && r_sdp && (p = (char *) switch_stristr("g729a/8000", r_sdp))) {
|
||||||
p += 4;
|
p += 4;
|
||||||
@ -3867,13 +3886,6 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (session) {
|
if (session) {
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
tech_pvt = switch_core_session_get_private(session);
|
|
||||||
|
|
||||||
if (!tech_pvt || !tech_pvt->nh) {
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((switch_channel_test_flag(channel, CF_EARLY_MEDIA) || switch_channel_test_flag(channel, CF_ANSWERED)) &&
|
if ((switch_channel_test_flag(channel, CF_EARLY_MEDIA) || switch_channel_test_flag(channel, CF_ANSWERED)) &&
|
||||||
(status == 180 || status == 183)) {
|
(status == 180 || status == 183)) {
|
||||||
/* Must you send 180 after 183 w/sdp ? sheesh */
|
/* Must you send 180 after 183 w/sdp ? sheesh */
|
||||||
|
@ -1817,7 +1817,10 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||||||
SOATAG_REUSE_REJECTED(1),
|
SOATAG_REUSE_REJECTED(1),
|
||||||
SOATAG_ORDERED_USER(1),
|
SOATAG_ORDERED_USER(1),
|
||||||
SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
|
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());
|
SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL),
|
||||||
|
TAG_IF(rep, SIPTAG_REPLACES_STR(rep)),
|
||||||
|
SOATAG_HOLD(holdstr),
|
||||||
|
TAG_END());
|
||||||
} else {
|
} else {
|
||||||
nua_invite(tech_pvt->nh,
|
nua_invite(tech_pvt->nh,
|
||||||
NUTAG_AUTOANSWER(0),
|
NUTAG_AUTOANSWER(0),
|
||||||
@ -1839,6 +1842,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
|
|||||||
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
|
||||||
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
SIPTAG_PAYLOAD_STR(tech_pvt->local_sdp_str),
|
||||||
TAG_IF(rep, SIPTAG_REPLACES_STR(rep)),
|
TAG_IF(rep, SIPTAG_REPLACES_STR(rep)),
|
||||||
|
SOATAG_HOLD(holdstr),
|
||||||
TAG_END());
|
TAG_END());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user