[Home]

Summary:ASTERISK-11199: in certain scenarios, asterisk can send rtp in an unsupported payload type to an endpoint
Reporter:Torrey Searle (tsearle)Labels:
Date Opened:2008-01-10 08:37:04.000-0600Date Closed:2008-01-11 13:51:02.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/CodecHandling
Versions:Frequency of
Occurrence
Related
Issues:
is related toASTERISK-20296 In certain scenarios, asterisk can send rtp in an unsupported payload type to an endpoint
Environment:Attachments:( 0) new_codec_patch_udiff.patch
( 1) new_codec_patch.patch
Description:SIP caller A supports alaw/ulaw

Asterisk is configured to support alaw,ulaw,g729 and places all 3 in the offer to B

SIP called B supports g729,alaw,ulaw putting all 3 in the 200 OK

If B sends audio in G.729 it gets forwarded to A without transcoding.

Comments:By: Torrey Searle (tsearle) 2008-01-10 09:35:55.000-0600

My analysis:

Asterisk starts the Packet2Packet bridge so long as at there is at least 1 codec in common between the two endpoints.  However, if the audio received is not in this codec,  the bridge isn't shut down.

Provided patch detects when this happens and shuts down the p2p bridge as needed.



By: Torrey Searle (tsearle) 2008-01-11 10:18:27.000-0600

Resubmitted patch with diff -u (instead of -c) as per FAQ

By: Joshua C. Colp (jcolp) 2008-01-11 10:26:07.000-0600

I'm curious, what is changing the underlying formats of the channels?

By: Torrey Searle (tsearle) 2008-01-11 10:38:04.000-0600

The first section of the code passes the first incompatible rtp packet to the core.  There it's detected/treated as a codec change.  This changes the raw formats.

Sorry, the patch was hastily forward ported from 1.4.4 to 1.4.17.  The problem (as described in the ticket) is still present, however the fix isn't working the same as expected.

I will look into why this patch isn't working and advise Monday.



By: Digium Subversion (svnbot) 2008-01-11 13:49:09.000-0600

Repository: asterisk
Revision: 98325

U   branches/1.4/main/rtp.c

------------------------------------------------------------------------
r98325 | file | 2008-01-11 13:49:08 -0600 (Fri, 11 Jan 2008) | 6 lines

If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue ASTERISK-11199)
Reported by: tsearle
Patches:
     new_codec_patch_udiff.patch uploaded by tsearle (license 373)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=98325

By: Digium Subversion (svnbot) 2008-01-11 13:51:02.000-0600

Repository: asterisk
Revision: 98334

_U  trunk/
U   trunk/main/rtp.c

------------------------------------------------------------------------
r98334 | file | 2008-01-11 13:51:02 -0600 (Fri, 11 Jan 2008) | 14 lines

Merged revisions 98325 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98325 | file | 2008-01-11 15:51:10 -0400 (Fri, 11 Jan 2008) | 6 lines

If the incoming RTP stream changes codec force the bridge to break if the other side does not support it.
(closes issue ASTERISK-11199)
Reported by: tsearle
Patches:
     new_codec_patch_udiff.patch uploaded by tsearle (license 373)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=98334