FS-3172 this also fixes the incorrect usage of L16 on payload 10 which may or may not break interop with other sip devices if we do it right. also added rtp_disable_byteswap variable that can be set to false to disable byteswap when a device is encountered that is incompat (inluding all precious version of FS up till now)

This commit is contained in:
Anthony Minessale
2011-03-21 14:31:10 -05:00
parent 244fd68dfd
commit e657e32fca
4 changed files with 25 additions and 4 deletions
+11
View File
@@ -2965,6 +2965,17 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
flags |= SWITCH_RTP_FLAG_AUTO_CNG;
}
#if __BYTE_ORDER == __LITTLE_ENDIAN
if (!strcasecmp(tech_pvt->read_impl.iananame, "L16")) {
flags |= SWITCH_RTP_FLAG_BYTESWAP;
}
#endif
if ((flags & SWITCH_RTP_FLAG_BYTESWAP) && (val = switch_channel_get_variable(tech_pvt->channel, "rtp_disable_byteswap")) && switch_true(val)) {
flags &= ~SWITCH_RTP_FLAG_BYTESWAP;
}
if (tech_pvt->rtp_session && sofia_test_flag(tech_pvt, TFLAG_REINVITE)) {
//const char *ip = switch_channel_get_variable(tech_pvt->channel, SWITCH_LOCAL_MEDIA_IP_VARIABLE);
//const char *port = switch_channel_get_variable(tech_pvt->channel, SWITCH_LOCAL_MEDIA_PORT_VARIABLE);