mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-21 10:44:16 +00:00
tell rtp stack about what remote payload type to expect when the receiving end follows the stupid SHOULD as WONT and sends a different dynamic payload number than the one in the offer
This commit is contained in:
1 parent
6ea5f03b44
commit
c565501f55
4 files changed
+78
-9
No files matched your search
+8
-4
@@ -1578,7 +1578,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
|
||||
rtp_session->recv_msg.header.cc = 0;
|
||||
|
||||
rtp_session->payload = payload;
|
||||
|
||||
rtp_session->rpayload = payload;
|
||||
|
||||
rtp_session->rtcp_send_msg.header.version = 2;
|
||||
rtp_session->rtcp_send_msg.header.p = 0;
|
||||
@@ -1773,6 +1773,12 @@ SWITCH_DECLARE(void) switch_rtp_set_telephony_recv_event(switch_rtp_t *rtp_sessi
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(void) switch_rtp_set_recv_pt(switch_rtp_t *rtp_session, switch_payload_t pt)
|
||||
{
|
||||
rtp_session->rpayload = pt;
|
||||
}
|
||||
|
||||
|
||||
SWITCH_DECLARE(void) switch_rtp_set_cng_pt(switch_rtp_t *rtp_session, switch_payload_t pt)
|
||||
{
|
||||
rtp_session->cng_pt = pt;
|
||||
@@ -2813,7 +2819,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
rtp_session->recv_msg.header.pt != 13 &&
|
||||
rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
|
||||
(!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) &&
|
||||
rtp_session->recv_msg.header.pt != rtp_session->payload) {
|
||||
rtp_session->recv_msg.header.pt != rtp_session->rpayload) {
|
||||
/* drop frames of incorrect payload number and return CNG frame instead */
|
||||
return_cng_frame();
|
||||
}
|
||||
@@ -3131,8 +3137,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
||||
rtp_session->recv_msg.header.pt = 97;
|
||||
}
|
||||
|
||||
rtp_session->rpayload = (switch_payload_t) rtp_session->recv_msg.header.pt;
|
||||
|
||||
break;
|
||||
|
||||
do_continue:
|
||||
|
||||
Reference in new issue
Block a user