Asterisk g.729 and g.723 Codec Transcoding/Pass-Thru
Posted by hasnain110 on February 10, 2009
Given below are the step by step instruction for making Asterisk work as a codec Transcoder
Step 1:
Download suitable codec binaries for your asterisk platform
Step 2:
Restart asterisk to make asterisk load newly installed codec modules
e.g. amportal restart
Step 3:
log into asterisk console asterisk -rvvvv and type this command core show codec and check if you can see newly install codecs
elastix*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) (0×1) audio g723 (G.723.1)
2 (1 << 1) (0×2) audio gsm (GSM)
4 (1 << 2) (0×4) audio ulaw (G.711 u-law)
8 (1 << 3) (0×8) audio alaw (G.711 A-law)
16 (1 << 4) (0×10) audio g726aal2 (G.726 AAL2)
32 (1 << 5) (0×20) audio adpcm (ADPCM)
64 (1 << 6) (0×40) audio slin (16 bit Signed Linear PCM)
128 (1 << 7) (0×80) audio lpc10 (LPC10)
256 (1 << 8) (0×100) audio g729 (G.729A)
512 (1 << 9) (0×200) audio speex (SpeeX)
1024 (1 << 10) (0×400) audio ilbc (iLBC)
2048 (1 << 11) (0×800) audio g726 (G.726 RFC3551)
4096 (1 << 12) (0×1000) audio g722 (G722)
65536 (1 << 16) (0×10000) image jpeg (JPEG image)
131072 (1 << 17) (0×20000) image png (PNG image)
262144 (1 << 18) (0×40000) video h261 (H.261 Video)
524288 (1 << 19) (0×80000) video h263 (H.263 Video)
1048576 (1 << 20) (0×100000) video h263p (H.263+ Video)
2097152 (1 << 21) (0×200000) video h264 (H.264 Video)
Step 4:
Choose your fav. editor in linux , mine is Vi
vi /etc/asterisk/extensions.conf and add these lines under the [General]
[general]
#include sip_general_additional.conf
bindport =5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
disallow=all
allow=g723
allow=g729
And for your GW settings do the same
[EXGN]
type=peer
host=x.x.x.x
port=5060
disallow=all
allow=g729
;dtmfmode=inband
;dtmf=inband
nat=no
;insecure=very
Now set your Eyebeam to send calls using g.729 codec to asterisk it should work
To check if calls are going into g.729/723 codec run this command on the main console
sip show channels
I hope this should work
Quick facts about VoIP SIP SDK | Intro to SIP said
[...] Asterisk g.729 and g.723 Codec Transcoding/Pass-Thru « Hasnain Ali … [...]
Tariq Aziz said
Salam hasnain Sb!
Really pleased to see this blog. I googled a lot about “Codecs(mainly G723) behaviour/compatability with Asterisk” but still confused. can you guide me a link where I can read the details of codecs and then which codecs are supported in asterisk w.r.t diff versions and how can i proceed further.??
Like what happens when a sip/sdp invite contains G723 as the first or only preference in media attribute.
2.Does asterisk behave differently for diff codecs if no licensing is involved and it works only in Pass through mode by default??.
3.Finally we are using Asterisk as SBC( in both; proxy and non-proxy mode) and face issue only when we receive invites with G723 as first preference and how much it depends on end system(Soft switch and Media GWs).
Your help/guidance will really solve a lot of problems!
hasnain110 said
Hello
Sorry for the rate reply as im pretty occupied with some stuff here. Here are the quick answers that I can give you for now
1.You can know the list of codecs supported core show codecs ..about information voip-info.org is the best guide for this
2. For all the liscense codecs which works in pass-thru mode the behaviour is different. However for the built-in free codecs its different. The only difference in simple words is for pass-thru codecs you can not register the device directly to Asterisk and make call.
3. please send me a Wireshark packet trace of sip. This will help me exactly narrow down the issue
Shuvro said
Hi Ali
It is a nice guide line to install codec. But could u let me know which binary is appropriate for me to use in Asterisk-1.6.1.6 and Fedora 10,64 bit and Intel Xeon processor??
and Secondly I must to pay for G723 and G729 even I installed those binary codec??
hasnain110 said
Hello
Sorry for a late reply as im pretty occupied with some stuff here. No you dont need to pay for any liscense its a pass-thru codec which means you can make a call if you receive a call from g729/g723 call. but you can not register a phone directly and make a call with g729 codec