add manual_rtp_bugs to profile and chan var and 3 new RTP bugs SEND_LINEAR_TIMESTAMPS|START_SEQ_AT_ZERO|NEVER_SEND_MARKER

RTP_BUG_SEND_LINEAR_TIMESTAMPS = (1 << 3),

	  Our friends at Sonus get real mad when the timestamps are not in perfect sequence even during periods of silence.
	  With this flag, we will only increment the timestamp when write packets even if they are eons apart.

	RTP_BUG_START_SEQ_AT_ZERO = (1 << 4),

	  Our friends at Sonus also get real mad if the sequence number does not start at 0.
	  Typically, we set this to a random starting value for your saftey.
	  This is a security risk you take upon yourself when you enable this flag.

	RTP_BUG_NEVER_SEND_MARKER = (1 << 5),

	  Our friends at Sonus are on a roll, They also get easily dumbfounded by marker bits.
	  This flag will never send any. Sheesh....
This commit is contained in:
Anthony Minessale
2010-11-10 16:55:56 -06:00
parent ca8c23361b
commit b278dd2379
5 changed files with 112 additions and 44 deletions
+6 -35
View File
@@ -2220,39 +2220,6 @@ static void parse_domain_tag(sofia_profile_t *profile, switch_xml_t x_domain_tag
}
}
static void parse_rtp_bugs(sofia_profile_t *profile, const char *str)
{
if (switch_stristr("clear", str)) {
profile->auto_rtp_bugs = 0;
}
if (switch_stristr("CISCO_SKIP_MARK_BIT_2833", str)) {
profile->auto_rtp_bugs |= RTP_BUG_CISCO_SKIP_MARK_BIT_2833;
}
if (switch_stristr("~CISCO_SKIP_MARK_BIT_2833", str)) {
profile->auto_rtp_bugs &= ~RTP_BUG_CISCO_SKIP_MARK_BIT_2833;
}
if (switch_stristr("SONUS_SEND_INVALID_TIMESTAMP_2833", str)) {
profile->auto_rtp_bugs |= RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833;
}
if (switch_stristr("~SONUS_SEND_INVALID_TIMESTAMP_2833", str)) {
profile->auto_rtp_bugs &= ~RTP_BUG_SONUS_SEND_INVALID_TIMESTAMP_2833;
}
if (switch_stristr("IGNORE_MARK_BIT", str)) {
profile->auto_rtp_bugs |= RTP_BUG_IGNORE_MARK_BIT;
}
if (switch_stristr("~IGNORE_MARK_BIT", str)) {
profile->auto_rtp_bugs &= ~RTP_BUG_IGNORE_MARK_BIT;
}
}
switch_status_t reconfig_sofia(sofia_profile_t *profile)
{
switch_xml_t cfg, xml = NULL, xprofile, profiles, gateways_tag, domain_tag, domains_tag, aliases_tag, alias_tag, settings, param;
@@ -2382,7 +2349,9 @@ switch_status_t reconfig_sofia(sofia_profile_t *profile)
sofia_clear_pflag(profile, PFLAG_MESSAGE_QUERY_ON_FIRST_REGISTER);
}
} else if (!strcasecmp(var, "auto-rtp-bugs")) {
parse_rtp_bugs(profile, val);
sofia_glue_parse_rtp_bugs(&profile->auto_rtp_bugs, val);
} else if (!strcasecmp(var, "manual-rtp-bugs")) {
sofia_glue_parse_rtp_bugs(&profile->manual_rtp_bugs, val);
} else if (!strcasecmp(var, "user-agent-string")) {
profile->user_agent = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "auto-restart")) {
@@ -3103,7 +3072,9 @@ switch_status_t config_sofia(int reload, char *profile_name)
profile->rport_level = 2;
}
} else if (!strcasecmp(var, "auto-rtp-bugs")) {
parse_rtp_bugs(profile, val);
sofia_glue_parse_rtp_bugs(&profile->auto_rtp_bugs, val);
} else if (!strcasecmp(var, "manual-rtp-bugs")) {
sofia_glue_parse_rtp_bugs(&profile->manual_rtp_bugs, val);
} else if (!strcasecmp(var, "dbname")) {
profile->dbname = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "presence-hosts")) {