add yucky hacks to make googletalk work with ilbc (shame on them)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1204 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-04-19 20:38:02 +00:00
parent 0aab549821
commit ed53c98d67
5 changed files with 27 additions and 9 deletions

View File

@@ -541,6 +541,9 @@ static int rtp_common_read(switch_rtp *rtp_session, switch_payload_t *payload_ty
}
if (rtp_session->recv_msg.header.version == 2) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_GOOGLEHACK) && rtp_session->recv_msg.header.pt == 102) {
rtp_session->recv_msg.header.pt = 97;
}
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && rtp_session->from_addr->port &&
(rtp_session->from_addr->port != rtp_session->remote_port)) {
uint32_t old = rtp_session->remote_port;
@@ -679,6 +682,9 @@ static int rtp_common_write(switch_rtp *rtp_session, void *data, uint32_t datale
bytes = sbytes;
}
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_GOOGLEHACK) && rtp_session->send_msg.header.pt == 97) {
rtp_session->recv_msg.header.pt = 102;
}
switch_socket_sendto(rtp_session->sock, rtp_session->remote_addr, 0, (void*)send_msg, &bytes);
if (rtp_session->ice_user) {