[Home]

Summary:ASTERISK-17042: IAX2 CODEC_PRES wrong (offset error?)
Reporter:Birgit Arkesteijn (birgita)Labels:
Date Opened:2010-11-29 08:41:21.000-0600Date Closed:2010-12-01 11:03:08.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_iax2
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:On an incoming IAX2 call, the console reports (correctly):

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW    
  Timestamp: 00005ms  SCall: 09646  DCall: 00000 [94.12.29.127:2705]
  VERSION         : 2
  CODEC_PREFS     : (gsm|ulaw)
  FORMAT          : 2
  FORMAT2         : gsm
  CAPABILITY      : 6
  CAPABILITY2     : unknown
  ADSICPE         : 2

However, Asterisk sends over the wire as value for CODEC_PREFS: "CD"
This is incorrect. It should be "BC":

A = "AUDIO_G723",
B = "AUDIO_GSM",
C = "AUDIO_ULAW",
D = "AUDIO_ALAW",

In this case codec negotiation does not fail because of FORMAT(2).

****** ADDITIONAL INFORMATION ******

CLI> core show version                                                    
Asterisk SVN-branch-1.8-r296230M built by xxx @ xxx on a x86_64 running Linux on 2010-10-05 18:02:49 UTC
Comments:By: Tilghman Lesher (tilghman) 2010-11-30 16:01:40.000-0600

By what basis do you prescribe that codecs start from 'A'?

By: Tilghman Lesher (tilghman) 2010-11-30 16:17:11.000-0600

More to the point, that IAX2's codec preferences start at 'B' is a legacy behavior that would break every version to date, if this were to change.  There is no specific information on how the encoding should occur in RFC 5456, so interoperation with existing implementations, namely Asterisk and iaxclient, becomes the primary source.

By: Birgit Arkesteijn (birgita) 2010-12-01 06:36:36.000-0600

I think I got my info from:
https://issues.asterisk.org/bug_view_page.php?bug_id=0002971

Indeed I cannot find the encoding information in RFC 5456 either:
http://www.rfc-editor.org/rfc/rfc5456.txt
which would have been helpful, but that is a different matter.

By: Tilghman Lesher (tilghman) 2010-12-01 10:23:12.000-0600

In my estimation, this becomes a documentation bug, then.  I'll add a note to the include file.

By: Birgit Arkesteijn (birgita) 2010-12-01 10:28:07.000-0600

Thanks.
Would it be possible to add it to the RFC? I would be good to be able to implement IAX2 based on the RFC only and not have to look at the Asterisk implementation.

By: Digium Subversion (svnbot) 2010-12-01 10:59:28.000-0600

Repository: asterisk
Revision: 296990

U   branches/1.4/include/asterisk/frame.h

------------------------------------------------------------------------
r296990 | tilghman | 2010-12-01 10:59:27 -0600 (Wed, 01 Dec 2010) | 5 lines

Clarify documentation on how we store codec preference lists.

(closes issue ASTERISK-17042)
Reported by: birgita

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

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

By: Digium Subversion (svnbot) 2010-12-01 11:01:02.000-0600

Repository: asterisk
Revision: 296991

_U  branches/1.6.2/
U   branches/1.6.2/include/asterisk/frame.h

------------------------------------------------------------------------
r296991 | tilghman | 2010-12-01 11:01:02 -0600 (Wed, 01 Dec 2010) | 12 lines

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

........
 r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
 
 Clarify documentation on how we store codec preference lists.
 
 (closes issue ASTERISK-17042)
  Reported by: birgita
........

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

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

By: Digium Subversion (svnbot) 2010-12-01 11:01:58.000-0600

Repository: asterisk
Revision: 296992

_U  branches/1.8/
U   branches/1.8/include/asterisk/frame.h

------------------------------------------------------------------------
r296992 | tilghman | 2010-12-01 11:01:57 -0600 (Wed, 01 Dec 2010) | 19 lines

Merged revisions 296991 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines
 
 Merged revisions 296990 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
   
   Clarify documentation on how we store codec preference lists.
   
   (closes issue ASTERISK-17042)
    Reported by: birgita
 ........
................

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

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

By: Digium Subversion (svnbot) 2010-12-01 11:03:07.000-0600

Repository: asterisk
Revision: 296993

_U  trunk/
U   trunk/include/asterisk/frame.h

------------------------------------------------------------------------
r296993 | tilghman | 2010-12-01 11:03:07 -0600 (Wed, 01 Dec 2010) | 26 lines

Merged revisions 296992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r296992 | tilghman | 2010-12-01 11:01:56 -0600 (Wed, 01 Dec 2010) | 19 lines
 
 Merged revisions 296991 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r296991 | tilghman | 2010-12-01 11:01:00 -0600 (Wed, 01 Dec 2010) | 12 lines
   
   Merged revisions 296990 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r296990 | tilghman | 2010-12-01 10:59:26 -0600 (Wed, 01 Dec 2010) | 5 lines
     
     Clarify documentation on how we store codec preference lists.
     
     (closes issue ASTERISK-17042)
      Reported by: birgita
   ........
 ................
................

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

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