[asterisk-dev] Timestamps in RTP bridged calls

Olle E. Johansson oej at edvina.net
Thu Jul 3 15:30:23 CDT 2014


On 03 Jul 2014, at 19:45, Matthew Jordan <mjordan at digium.com> wrote:

> On Wed, Jul 2, 2014 at 4:58 AM, Olle E. Johansson <oej at edvina.net> wrote:
>> Related issue:
>> 
>> https://issues.asterisk.org/jira/browse/ASTERISK-23142
>> 
>> 
>> In the big jitterbuffer patch in 2006 ther was code that sets a flag on a AST_FRAME
>> that it contains time stamp information. This is set on all incoming RTP audio frames.
>> 
>> When sending RTP we reset the timestamp to the one in the frame if this flag is set.
>> 
>> Now, if we have a call on hold this is dangerous.
>> 
>> Alice calls Bob and he answers.
>> -> we take the incoming TS and send out to Bob in the RTP stream
>> 
>> Alice puts Bob on hold
>> -> we activate MOH and raise the TS with 160 for every RTP packet
>> 
>> Alice puts Bob off hold
>> -> We get RTP from Alice with a new time stamp and reset ours
>> 
>> This can lead to a big jump in time stamps and in our case lead to loss of audio.
> 
> 
Btw, for the tests: The above scenarios is a simple test. Two UAs placing a call,
moh enabled. UA one puts call on hold, asterisk plays moh. UA puts call off hold,
sudden jump in time stamps.

I ran this on my laptop and could repeat the issue before patch and see it
gone after patch.

/O


More information about the asterisk-dev mailing list