[Freeswitch-users] Problems with G722 sample rate

Wesley Akio wesleyakio at tuntscorp.com
Mon Jul 8 21:04:24 MSD 2013


Yeap, now I know, Anthony explained and pointed me to some literature... :/
"Historical reasons"...

I'm playing with it right now and, in light of this information, it seems I
missed something really obvious...

Audiocodes has both G.722/8000 and G.722/16000 in the codecs list. At first
I though it would vary the sample rate but testing it now it seems all it
does is change the SDP, since using G.722/8000 results in:
2013-07-08 13:57:13.469291 [DEBUG] switch_ivr_play_say.c:1315 Codec
Activated L16 at 16000hz 1 channels 20ms

Will test a little bit further but it seems to be simpler than anticipated.


Wesley Akio
TuntsCorp.com


On Mon, Jul 8, 2013 at 1:50 PM, Michael Jerris <mike at jerris.com> wrote:

> It may seem crazy, but you have to use 8000 for g722.  If audiocodes is
> really sending it as 16000 you need to report that to them.
>
> http://www.ietf.org/rfc/rfc3551.txt
>
> 4.5.2 G722
>
>    G722 is specified in ITU-T Recommendation G.722, "7 kHz audio-coding
>    within 64 kbit/s".  The G.722 encoder produces a stream of octets,
>    each of which SHALL be octet-aligned in an RTP packet.  The first bit
>    transmitted in the G.722 octet, which is the most significant bit of
>    the higher sub-band sample, SHALL correspond to the most significant
>    bit of the octet in the RTP packet.
>
>    Even though the actual sampling rate for G.722 audio is 16,000 Hz,
>    the RTP clock rate for the G722 payload format is 8,000 Hz because
>    that value was erroneously assigned in RFC 1890 and must remain
>    unchanged for backward compatibility.  The octet rate or sample-pair
>    rate is 8,000 Hz.
>
>
>
> On Jul 8, 2013, at 12:17 PM, Wesley Akio <wesleyakio at tuntscorp.com> wrote:
>
> Hi all,
>
> I'm having some trouble with G722 and AudioCodes HD310 in latest
> 1.2-stable...
>
> The phone sends the SDP:
> v=0
> o=1000 946688278 946688278 IN IP4 192.168.0.108
> s=-
> c=IN IP4 192.168.0.108
> t=0 0
> m=audio 4000 RTP/AVP 9 0 8 18 101
> a=rtpmap:9 G722/16000
> a=rtpmap:0 PCMU/8000
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
>
> But Freeswitch is prepared to accept only G722 at 8000 as can be seen in:
>
> [DEBUG] sofia_glue.c:5181 Audio Codec Compare
> [G722:9:16000:20:64000]/[G722:9:8000:10:64000]
>
> For now I've changed the source to accept 16000 but according to Anthony,
> as per the RFC, 8000 is the correct value.
>
> I've seen some conversations between Nandy Dagondon ans Steven Ayre but
> I'm not sure if it is the same issue, nonetheless I could not find a
> solution.
>
> has anyone faced a similar problem and found a viable solution?
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130708/d6eb7425/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list