[asterisk-dev] RTP Native Bridge Codec Change Handling - Appears to compare immediately after setting equal

Joshua Colp jcolp at digium.com
Tue Jun 4 08:56:02 CDT 2013


Dave WOOLLEY wrote:
> David Woolley wrote:
>
>> we noticed that when the response to a native bridge re-invite
>> changed the codecs, Asterisk didn't seem to react, even though the
>> resulting codecs were incompatible with the other side.
>
>> On looking through the code (rtp.c / rtp_engine.c), it looks like
>> the basic RTP native  bridge loop has a structure like this
> ......
>> To me this seems me to make it very difficult for a codec change to
>> actually be detected, as when you unroll the loop, the
>> unconditional set precedes the test for changes!

I *think* you are correct and I believe this stems from the 
UPDATE_RTP_PEER frame. It is used to indicate explicitly that the remote 
peer has changed. Removing the code that you mention I think should do 
it... although I think this really shows another issue which is, the 
code doesn't handle codecs changing to a non-joint situation so a joint 
check should also probably be added in.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com  & www.asterisk.org



More information about the asterisk-dev mailing list