mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 13:12:03 +00:00
fix rtp issue
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4863 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -105,7 +105,8 @@ typedef enum {
|
||||
PFLAG_FULL_ID = (1 << 3),
|
||||
PFLAG_PRESENCE = (1 << 4),
|
||||
PFLAG_PASS_RFC2833 = (1 << 5),
|
||||
PFLAG_DISABLE_TRANSCODING = (1 << 6)
|
||||
PFLAG_DISABLE_TRANSCODING = (1 << 6),
|
||||
PFLAG_REWRITE_TIMESTAMPS = (1 << 7)
|
||||
} PFLAGS;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -547,6 +547,10 @@ switch_status_t config_sofia(int reload)
|
||||
if (switch_true(val)) {
|
||||
profile->pflags |= PFLAG_DISABLE_TRANSCODING;
|
||||
}
|
||||
} else if (!strcasecmp(var, "rtp-rewrite-timestamps")) {
|
||||
if (switch_true(val)) {
|
||||
profile->pflags |= PFLAG_REWRITE_TIMESTAMPS;
|
||||
}
|
||||
} else if (!strcasecmp(var, "auth-calls")) {
|
||||
if (switch_true(val)) {
|
||||
profile->pflags |= PFLAG_AUTH_CALLS;
|
||||
|
||||
@@ -682,7 +682,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t * tech_pvt)
|
||||
bw = tech_pvt->read_codec.implementation->bits_per_second;
|
||||
ms = tech_pvt->read_codec.implementation->microseconds_per_frame;
|
||||
|
||||
flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_RAW_WRITE | SWITCH_RTP_FLAG_AUTOADJ | SWITCH_RTP_FLAG_DATAWAIT);
|
||||
flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_AUTOADJ | SWITCH_RTP_FLAG_DATAWAIT);
|
||||
|
||||
if (switch_test_flag(tech_pvt, TFLAG_BUGGY_2833)) {
|
||||
flags |= SWITCH_RTP_FLAG_BUGGY_2833;
|
||||
@@ -693,6 +693,11 @@ switch_status_t sofia_glue_activate_rtp(private_object_t * tech_pvt)
|
||||
flags |= SWITCH_RTP_FLAG_PASS_RFC2833;
|
||||
}
|
||||
|
||||
if (!((tech_pvt->profile->pflags & PFLAG_REWRITE_TIMESTAMPS) ||
|
||||
((val = switch_channel_get_variable(channel, "rtp_rewrite_timestamps")) && switch_true(val)))) {
|
||||
flags |= SWITCH_RTP_FLAG_RAW_WRITE;
|
||||
}
|
||||
|
||||
if (tech_pvt->cng_pt) {
|
||||
flags |= SWITCH_RTP_FLAG_AUTO_CNG;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user