mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-09 00:56:00 +00:00
fix rfc2833 bs
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5021 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
b37345c370
commit
eba9f4e218
@ -967,6 +967,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||||||
char key = switch_rfc2833_to_char(packet[0]);
|
char key = switch_rfc2833_to_char(packet[0]);
|
||||||
uint16_t in_digit_seq = ntohs((uint16_t) rtp_session->recv_msg.header.seq);
|
uint16_t in_digit_seq = ntohs((uint16_t) rtp_session->recv_msg.header.seq);
|
||||||
|
|
||||||
|
|
||||||
/* SHEESH.... Curse you RFC2833 inventors!!!! */
|
/* SHEESH.... Curse you RFC2833 inventors!!!! */
|
||||||
if ((time(NULL) - rtp_session->dtmf_data.last_digit_time) > 2) {
|
if ((time(NULL) - rtp_session->dtmf_data.last_digit_time) > 2) {
|
||||||
rtp_session->dtmf_data.last_digit = 0;
|
rtp_session->dtmf_data.last_digit = 0;
|
||||||
@ -974,12 +975,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
|
|||||||
}
|
}
|
||||||
if (in_digit_seq > rtp_session->dtmf_data.in_digit_seq) {
|
if (in_digit_seq > rtp_session->dtmf_data.in_digit_seq) {
|
||||||
rtp_session->dtmf_data.in_digit_seq = in_digit_seq;
|
rtp_session->dtmf_data.in_digit_seq = in_digit_seq;
|
||||||
|
|
||||||
if (duration && end) {
|
if (duration && end) {
|
||||||
if (key != rtp_session->dtmf_data.last_digit) {
|
if (key != rtp_session->dtmf_data.last_digit) {
|
||||||
char digit_str[] = { key, 0 };
|
char digit_str[] = { key, 0 };
|
||||||
time(&rtp_session->dtmf_data.last_digit_time);
|
time(&rtp_session->dtmf_data.last_digit_time);
|
||||||
switch_rtp_queue_dtmf(rtp_session, digit_str);
|
switch_rtp_queue_dtmf(rtp_session, digit_str);
|
||||||
|
switch_set_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
|
||||||
}
|
}
|
||||||
if (++rtp_session->dtmf_data.dc >= 3) {
|
if (++rtp_session->dtmf_data.dc >= 3) {
|
||||||
rtp_session->dtmf_data.last_digit = 0;
|
rtp_session->dtmf_data.last_digit = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user