Unable to get G729 codec works

728 views
Skip to first unread message

Chee-Yang Chau

unread,
Mar 31, 2015, 10:47:43 AM3/31/15
to asteri...@googlegroups.com
I am trying to setup an IAX2 trunking on FreePBX using G729 codec only to communicate with Yeastar MyPBX U100.  The IAX2 trunk configuration should be fine as it works for ulaw or alaw codec.  When I use G729 codec, the MyPBX shows these message:

WARNING[1972]: chan_iax2.c:10395 socket_process: Call rejected by 192.168.0.15: Unable to negotiate codec
NOTICE[5898]: channel.c:3015 __ast_read: Dropping incompatible voice frame on SIP/500-00000573 of format slin since our native format has changed to 0x100 (g729)

This indicates that the G729 codec on FreePBX may has some issue.  I then discover my FreePBX may not have G729 codec installed.  I try install the G729 codec:

# asterisk -V
Asterisk 11.15.0

# uname -a
Linux pbx.com 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

# cd ~
# cd /usr/lib64/asterisk/modules
# mv ~/codec_g729-ast110-gcc4-glibc-x86_64-core2.so codec_g729.so
# /etc/init.d/asterisk restart

And "core show translation" look nice:

pbx*CLI> core show translation
         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

            gsm  ulaw  alaw  g726 adpcm  slin lpc10  g729  ilbc g726aal2  g722 slin16 testlaw
      gsm     - 15000 15000 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     ulaw 15000     -  9150 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     alaw 15000  9150     - 15000 15000  9000 15000 15000 15000    15000 17250  26250   15000
     g726 15000 15000 15000     - 15000  9000 15000 15000 15000    15000 17250  26250   15000
    adpcm 15000 15000 15000 15000     -  9000 15000 15000 15000    15000 17250  26250   15000
     slin  6000  6000  6000  6000  6000     -  6000  6000  6000     6000  8250  17250    6000
    lpc10 15000 15000 15000 15000 15000  9000     - 15000 15000    15000 17250  26250   15000
     g729 15000 15000 15000 15000 15000  9000 15000     - 15000    15000 17250  26250   15000
     ilbc 15000 15000 15000 15000 15000  9000 15000 15000     -    15000 17250  26250   15000
 g726aal2 15000 15000 15000 15000 15000  9000 15000 15000 15000        - 17250  26250   15000
     g722 15600 15600 15600 15600 15600  9600 15600 15600 15600    15600     -   9000   15600
   slin16 21600 21600 21600 21600 21600 15600 21600 21600 21600    21600  6000      -   21600
  testlaw 15000 15000 15000 15000 15000  9000 15000 15000 15000    15000 17250  26250       -


The incoming setting for IAX2 trunk is:

type=user
context=from-internal
disallow=all
allow=g729


 However, after reboot the FreePBX machine and try to dial to a FreePBX extension using IAX2 trunk, I still receive "All curcuit are busy now" prompt:

WARNING[1972]: chan_iax2.c:10395 socket_process: Call rejected by 192.168.0.15: Unable to negotiate codec
NOTICE[5898]: channel.c:3015 __ast_read: Dropping incompatible voice frame on SIP/500-00000573 of format slin since our native format has changed to 0x100 (g729)

Is there anything I miss when configure the G729 codec? 

I notice the codec shown in MyPBX and FreePBX are different:

MyPBX U100

MyPBX*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
        INT    BINARY        HEX   TYPE       NAME   DESC
--------------------------------------------------------------------------------
          1 (1 <<  0)      (0x1)  audio       g723   (G.723.1)
          2 (1 <<  1)      (0x2)  audio        gsm   (GSM)
          4 (1 <<  2)      (0x4)  audio       ulaw   (G.711 u-law)
          8 (1 <<  3)      (0x8)  audio       alaw   (G.711 A-law)
         16 (1 <<  4)     (0x10)  audio   g726aal2   (G.726 AAL2)
         32 (1 <<  5)     (0x20)  audio      adpcm   (ADPCM)
         64 (1 <<  6)     (0x40)  audio       slin   (16 bit Signed Linear PCM)
        128 (1 <<  7)     (0x80)  audio      lpc10   (LPC10)
        256 (1 <<  8)    (0x100)  audio       g729   (G.729A)
        512 (1 <<  9)    (0x200)  audio      speex   (SpeeX)
       1024 (1 << 10)    (0x400)  audio       ilbc   (iLBC)
       2048 (1 << 11)    (0x800)  audio       g726   (G.726 RFC3551)
       4096 (1 << 12)   (0x1000)  audio       g722   (G722)
      65536 (1 << 16)  (0x10000)  image       jpeg   (JPEG image)
     131072 (1 << 17)  (0x20000)  image        png   (PNG image)
     262144 (1 << 18)  (0x40000)  video       h261   (H.261 Video)
     524288 (1 << 19)  (0x80000)  video       h263   (H.263 Video)
    1048576 (1 << 20) (0x100000)  video      h263p   (H.263+ Video)
    2097152 (1 << 21) (0x200000)  video       h264   (H.264 Video)

FreePBX

pbx*CLI> core show codecs
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID  TYPE     NAME DESCRIPTION
-----------------------------------------------------------------------------------
  100001 audio     g723 (G.723.1)
  100002 audio      gsm (GSM)
  100003 audio     ulaw (G.711 u-law)
  100004 audio     alaw (G.711 A-law)
  100011 audio     g726 (G.726 RFC3551)
  100006 audio    adpcm (ADPCM)
  100019 audio     slin (16 bit Signed Linear PCM)
  100007 audio    lpc10 (LPC10)
  100008 audio     g729 (G.729A)
  100009 audio    speex (SpeeX)
  100016 audio  speex16 (SpeeX 16khz)
  100010 audio     ilbc (iLBC)
  100005 audio g726aal2 (G.726 AAL2)
  100012 audio     g722 (G722)
  100021 audio   slin16 (16 bit Signed Linear PCM (16kHz))
  300001 image     jpeg (JPEG image)
  300002 image      png (PNG image)
  200001 video     h261 (H.261 Video)
  200002 video     h263 (H.263 Video)
  200003 video    h263p (H.263+ Video)
  200004 video     h264 (H.264 Video)
  200005 video    mpeg4 (MPEG4 Video)
  400001  text      red (T.140 Realtime Text with redundancy)
  400002  text     t140 (Passthrough T.140 Realtime Text)
  100013 audio   siren7 (ITU G.722.1 (Siren7, licensed from Polycom))
  100014 audio  siren14 (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))
  100017 audio  testlaw (G.711 test-law)
  100015 audio     g719 (ITU G.719)
  100028 audio  speex32 (SpeeX 32khz)
  100020 audio   slin12 (16 bit Signed Linear PCM (12kHz))
  100022 audio   slin24 (16 bit Signed Linear PCM (24kHz))
  100023 audio   slin32 (16 bit Signed Linear PCM (32kHz))
  100024 audio   slin44 (16 bit Signed Linear PCM (44kHz))
  100025 audio   slin48 (16 bit Signed Linear PCM (48kHz))
  100026 audio   slin96 (16 bit Signed Linear PCM (96kHz))
  100027 audio  slin192 (16 bit Signed Linear PCM (192kHz))

Best regards,
Chee-Yang Chau
Reply all
Reply to author
Forward
0 new messages