Hi, You're right. Just fixed this in SVN trunk r3146. Thanks, nanang On Sat, Apr 17, 2010 at 10:01 PM, Bram Kuijvenhoven <mailinglists.bram at kuijvenhoven.net> wrote: > Hi, > > The RTP payload type that PJSIP uses for the G726-32 codec is 2. See the > PJMEDIA_RTP_PT_G726_32 constant in pjmedia/include/pjmedia/codec.h. > > However, RFC 3551, page 31 states the following (see > http://www.ietf.org/rfc/rfc3551.txt): > > ?"Payload type 2 was assigned to G721 in RFC 1890 and to its equivalent > successor G726-32 in draft versions of this specification, but its use is > now deprecated and that static payload type is marked reserved due to > conflicting use for the payload formats G726-32 and AAL2-G726-32 (see > Section 4.5.4)." > > Table 4 in the RFC confirms this: > > ? ? ? ? ? ? PT ? encoding ? ?media type ?clock rate ? channels > ? ? ? ? ? ? ? ? ?name ? ? ? ? ? ? ? ? ? ?(Hz) > ? ? ? ? ? ? ___________________________________________________ > ? ? ? ? ? ? ... > ? ? ? ? ? ? 2 ? ?reserved ? ?A > ? ? ? ? ? ? ... > ? ? ? ? ? ? dyn ?G726-32 ? ? A ? ? ? ? ? ?8,000 ? ? ? 1 > > RFC 3551 is also referred to in the comments in > pjmedia/include/pjmedia/codec.h. > > Attached patch fixes this by making PJMEDIA_RTP_PT_G726_32 a dynamic payload > type (in pjmedia/include/pjmedia-codes/types.h). > > Without this fix, the SDP negotiation appears to never select the G726-32 > codec if the remote party mentions it as a dynamic payload type (which is > the case for both voip providers I tested this with). > > Regards, > > Bram > > Index: pjmedia/include/pjmedia-codec/types.h > =================================================================== > --- pjmedia/include/pjmedia-codec/types.h ? ? ? (revision 3139) > +++ pjmedia/include/pjmedia-codec/types.h ? ? ? (working copy) > @@ -73,7 +73,7 @@ > ? ? PJMEDIA_RTP_PT_AMRWBE, ? ? ? ? ? ? ? ? ? ? /**< AMRWBE > */ > ? ? PJMEDIA_RTP_PT_G726_16, ? ? ? ? ? ? ? ? ? ?/**< G726 @ 16Kbps > ?*/ > ? ? PJMEDIA_RTP_PT_G726_24, ? ? ? ? ? ? ? ? ? ?/**< G726 @ 24Kbps > ?*/ > - ? ?/* PJMEDIA_RTP_PT_G726_32,*/ ? ? ? ? ? ? ? /**< G726 @ 32Kbps, static? > */ > + ? ?PJMEDIA_RTP_PT_G726_32, ? ? ? ? ? ? ? ? ? ?/**< G726 @ 32Kbps (dynamic > according to RFC 3551, Table 4) */ > ? ? PJMEDIA_RTP_PT_G726_40, ? ? ? ? ? ? ? ? ? ?/**< G726 @ 40Kbps > ?*/ > ? ? PJMEDIA_RTP_PT_G722_1_16, ? ? ? ? ? ? ? ? ?/**< G722.1 (16Kbps) > ?*/ > ? ? PJMEDIA_RTP_PT_G722_1_24, ? ? ? ? ? ? ? ? ?/**< G722.1 (24Kbps) > ?*/ > Index: pjmedia/include/pjmedia/codec.h > =================================================================== > --- pjmedia/include/pjmedia/codec.h ? ? (revision 3139) > +++ pjmedia/include/pjmedia/codec.h ? ? (working copy) > @@ -196,7 +196,6 @@ > ?enum pjmedia_rtp_pt > ?{ > ? ? PJMEDIA_RTP_PT_PCMU = 0, ? ? ? /**< audio PCMU > */ > - ? ?PJMEDIA_RTP_PT_G726_32 = 2, ? ?/**< audio G726-32 > ?*/ > ? ? PJMEDIA_RTP_PT_GSM ?= 3, ? ? ? /**< audio GSM > ?*/ > ? ? PJMEDIA_RTP_PT_G723 = 4, ? ? ? /**< audio G723 > */ > ? ? PJMEDIA_RTP_PT_DVI4_8K = 5, ? ? ? ? ? ?/**< audio DVI4 8KHz > ? ? ? ?*/ > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >