Change codec behaviour

channel_variable: sdp_m_per_ptime
Adds a new m= line for each distinct ptime in codec list.

When this variable is not set:
	When mixing codecs with various ptime in a codec list, they will now be allowed to co-exist in the sdp but it will send no ptime attr.
		This means the ptime preferences on the offer will be ignored when mixing codecs with various ptimes.
	When receiving a codec list with no ptime attr, the ptime will be chosen from local preference instead of assuming 20ms
		This means if offer contains PCMU with not ptime and FS has PCMU@40i

Dynamic payloads will now start at 98 and increment per additional dynamic codec per call.
	So now you can add CELT@32000h,CELT@48000h and each one will be auto-assigned a dynamic paylaod type.
This commit is contained in:
Anthony Minessale
2010-10-13 19:27:45 -05:00
parent 3cd8766b9c
commit dfa78985b4
5 changed files with 351 additions and 188 deletions
+4 -7
View File
@@ -1031,13 +1031,10 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
if (codec_ms != tech_pvt->codec_ms) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
"We were told to use ptime %d but what they meant to say was %d\n"
"This issue has so far been identified to happen on the following broken platforms/devices:\n"
"Linksys/Sipura aka Cisco\n"
"ShoreTel\n"
"Sonus/L3\n"
"We will try to fix it but some of the devices on this list are so broken,\n"
"who knows what will happen..\n", (int) tech_pvt->codec_ms, (int) codec_ms);
"Asynchronous PTIME not supported, changing our end from %d to %d\n",
(int) tech_pvt->codec_ms,
(int) codec_ms
);
switch_channel_set_variable_printf(channel, "sip_h_X-Broken-PTIME", "Adv=%d;Sent=%d",
(int) tech_pvt->codec_ms, (int) codec_ms);