Summary:ASTERISK-09900: Sound problems when bridging sip channels with packetization level different than 20ms
Reporter:George Spiliotis (gspiliot)Labels:
Date Opened:2007-07-18 11:02:31Date Closed:2007-09-28 19:40:46
Versions:Frequency of
Environment:Attachments:( 0) 10229.patch.txt
Description:When bridging chan_mobile with another sip channel which, for example, receives packets with 90ms size instead of the default 20ms then the sound coming out chan_mobile is choppy. It seems that repacketization or the rtp stream is needed if chan_mobile works with fixed 20ms packets.
Comments:By: Russell Bryant (russell) 2007-07-18 23:25:49

When you say "sound coming out of chan_mobile", do you mean that the audio that came in over RTP and is being sent over chan_mobile sounds bad?  or that the audio from chan_mobile going out over RTP sounds bad?

(This is a note for other developers looking at the issue)  bbryant was looking at this issue and assuming that it is the first scenario, I suggested that one way to approach this would be to use an ast_smoother in the write callback of chan_mobile.  You could put all frames through that to ensure that you are then always receiving 20ms frames for sending out in chan_mobile.  We do this same thing for handling frames that are going to be sent out over RTP already to ensure that we get frames into the right size (20ms or 30ms default size, or whatever is configured via packetization settings).

By: George Spiliotis (gspiliot) 2007-07-19 06:27:49

Yes I mean the first case: the audio that came in over RTP and is being sent over chan_mobile sounds bad.

By: Russell Bryant (russell) 2007-07-21 02:05:29

Here is a patch for this issue.  Please give it a try and let me know what happens.  It is completely untested beyond making it compile as I do not have the required equipment to test it.

By: George Spiliotis (gspiliot) 2007-07-23 12:26:58

Nope, with the proposed patch in place there is too much distortion even with 20ms packets (whereas without it the sound is crystal clear).

By: Russell Bryant (russell) 2007-07-23 14:18:50

Thanks for trying it out.  Someone with the right equipment is going to have to take a stab at this one.

By: Dave Bowerman (dbowerman) 2007-08-26 00:17:53

needs testing with latest addons trunk

By: Dave Bowerman (dbowerman) 2007-09-07 20:30:55

this should be resolved by trunk rev 441.

By: Dave Bowerman (dbowerman) 2007-09-28 19:40:11

no feedback, cant reproduce with latest trunk.