mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-26 20:48:21 +00:00
FS-5959 FS-5958
This commit is contained in:
parent
aa8a4913b4
commit
2747660269
@ -6478,7 +6478,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||||||
switch_channel_set_flag(tech_pvt->channel, CF_REINVITE);
|
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, SDP_TYPE_REQUEST);
|
match = sofia_media_negotiate_sdp(session, r_sdp, SDP_TYPE_RESPONSE);
|
||||||
}
|
}
|
||||||
if (match) {
|
if (match) {
|
||||||
if (switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0) != SWITCH_STATUS_SUCCESS) {
|
if (switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
@ -497,6 +497,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_get_payload_code(switch_core
|
|||||||
recv_pt = pmap->recv_pt;
|
recv_pt = pmap->recv_pt;
|
||||||
fmtp = pmap->rm_fmtp;
|
fmtp = pmap->rm_fmtp;
|
||||||
found++;
|
found++;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(smh->sdp_mutex);
|
switch_mutex_unlock(smh->sdp_mutex);
|
||||||
@ -602,7 +603,12 @@ SWITCH_DECLARE(payload_map_t *) switch_core_media_add_payload_map(switch_core_se
|
|||||||
|
|
||||||
|
|
||||||
if (sdp_type == SDP_TYPE_REQUEST || !exists) {
|
if (sdp_type == SDP_TYPE_REQUEST || !exists) {
|
||||||
|
int b4 = pmap->pt;
|
||||||
pmap->pt = (switch_payload_t) (local_pt ? local_pt : pt);
|
pmap->pt = (switch_payload_t) (local_pt ? local_pt : pt);
|
||||||
|
|
||||||
|
if (b4 == 97 && pmap->pt == 109) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (negotiated) {
|
if (negotiated) {
|
||||||
@ -6433,6 +6439,10 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||||||
fmtp = switch_event_get_header(map, imp->iananame);
|
fmtp = switch_event_get_header(map, imp->iananame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (smh->fmtps[i]) {
|
||||||
|
fmtp = smh->fmtps[i];
|
||||||
|
}
|
||||||
|
|
||||||
if (zstr(fmtp)) fmtp = imp->fmtp;
|
if (zstr(fmtp)) fmtp = imp->fmtp;
|
||||||
|
|
||||||
if (zstr(fmtp)) fmtp = (char *) pass_fmtp;
|
if (zstr(fmtp)) fmtp = (char *) pass_fmtp;
|
||||||
|
@ -5047,6 +5047,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||||||
payload_map_t *pmap;
|
payload_map_t *pmap;
|
||||||
switch_mutex_lock(rtp_session->flag_mutex);
|
switch_mutex_lock(rtp_session->flag_mutex);
|
||||||
for (pmap = *rtp_session->pmaps; pmap && pmap->allocated; pmap = pmap->next) {
|
for (pmap = *rtp_session->pmaps; pmap && pmap->allocated; pmap = pmap->next) {
|
||||||
|
|
||||||
if (!pmap->negotiated) {
|
if (!pmap->negotiated) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -5056,6 +5057,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||||||
if (pmapP) {
|
if (pmapP) {
|
||||||
*pmapP = pmap;
|
*pmapP = pmap;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(rtp_session->flag_mutex);
|
switch_mutex_unlock(rtp_session->flag_mutex);
|
||||||
@ -5064,6 +5066,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||||||
if (!accept_packet &&
|
if (!accept_packet &&
|
||||||
!(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PAYLOAD) && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PACKETS)) {
|
!(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PAYLOAD) && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PACKETS)) {
|
||||||
/* drop frames of incorrect payload number and return CNG frame instead */
|
/* drop frames of incorrect payload number and return CNG frame instead */
|
||||||
|
|
||||||
return_cng_frame();
|
return_cng_frame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user