[asterisk-dev] Asterisk 11 branch SIP/SDP: Media stream opened with two codecs simultaneously

Pavel Troller patrol at sinus.cz
Mon Jun 24 05:22:46 CDT 2013


Hi!
  Last Friday I upgraded one of our Asterisk VoIP gateways to the current v11
branch. Before it was running on a v11 branch from December 17th, 2012.
  I found that since then, average call duration decreased dramatically for
some destinations. I've made some tcpdumps and I've found the cause.
  The problem appears with some partners, which also use Asterisk, in one
particular case in version 1.6.2.24. The call flow is like this:
  - We send INVITE with offered codecs G.711A, G.729 and G.711U (in this
order).
  - The partner replies with 100 Trying (No SDP), 180 Ringing (No SDP) and
183 Sessiong progress (With SDP, offered G.711A, G.711U and G.729 codecs in
this order).
  The media stream is going from this time, in G.711A both directions.
  - The partner sends 200 Ok with SDP and with the same codecs as in 183.
  And now, the problem occurs: For no apparent reason, G.729 encoded packets
start appearing in the stream together with already present G.711A ones in
both directions, they are 1:1 and almost perfectly interleaved.
  I've never seen this. The subscribers don't understand each other and the
calls are terminated quickly, thus causing very low ACD.
  I've made a quick fix by disallowing G.729 on my side and ACD promptly
recovered.
  I've looked at svn log and I've found that in r369028 there was a relatively
big change in SDP handling, but IMHO doing a different thing - handling
multiple media streams (SDP m lines) than multiple codecs in one media stream.
  What I also don't understand is, that the same thing happens on both
endpoints - the remote party also sends me back perfectly interleaved mix
of G.711A and G.729 in one media stream.
  I didn't find a simple solution other than to disable G.729. Is it a bug ?
Should I file a Jira issue ? Or is it just some kind of misconfiguration ?
I didn't change anything in sip.conf during the upgrade.

With regards,
  Pavel



More information about the asterisk-dev mailing list