Allow SDP change on 200 OK
johannesk opened this issue · comments
Observed Behavior
I am using twinkle connected to a FritzBox which support g722 and g711. When calling somewhere without g722 support (e.g. Android SIP), the FritzBox at first plays the Ringtone over g722 and then changes its SDP offer and switches to g711 when the other side answers the call. Twinkle ignores this SDP change and continues to transmit g722 which results in distorted audio on the other end.
Cause
Upon digging through the twinkle source, I discovered, that twinkle has support for SDP changes, but by default ignores SDP changes unless explicitly configured to do so (Edit->User profile->SIP protocol->Allow SDP change during call setup). Upon enabling this, twinkle processes changed SDP offers received through a 200 OK and switches to transmitting g711.
Others (#177 (comment)) have observed the same behavior, but were unable to find the solution.
The source mentions a reason for this behaviour:
Lines 1966 to 1974 in 1ec8dbb
However, upon reading RFC3261-13.3.1, I did not find anything on ignoring changed SDP offers.
I have a SNOM 360 phone which supports g722 and supports SDP changes without special configuration. Unlike twinkle, the SNOM 360 therefore can establish a working phonecall to non g722 endpoints over the FritzBox.
Solution
Either remove this configuration option completely and always accept SDP changes, or at least enable this configuration option by default.
Closing, fixed by #243.