As my Android phone supports only a handful of codecs other than GSM – no G.723 or G.729 -, I wanted to have my Asterisk support one of these, to have a better bitrate and/or sound quality.
PCMU/PCMA (G.711u/a) is crap and takes up a lot of bandwidth, GSM is something we know for a long time, GSM-EFR I haven’t heard about it, AMR looked like a good candidate. Looking up asterisk and AMR resulted in an obsolete patch for a 1.8.0rc, but as it turned out, it could be brought up to date to compile on a “current” Asterisk.
I’ve chosen 126.96.36.199 as that’s available with the Debian buildscripts in Digium’s repository. Here is a patch which includes the AMR codebase from the 3GPP site and the required patches to the various Makefiles – chan_mobile and app_dahdibarge is intentionally taken out. Compiles and works fine on Ubuntu Hardy.
What you need to do:
- Download the patch: http://uid0.hu/dl/asterisk-188.8.131.52-amr.patch
- Add the Digium repository into your sources.list:
deb-src http://packages.asterisk.org/deb lucid main
- apt-get source asterisk
- Apply the patch with “patch -p1” into the untarred Asterisk source directory
- Run debian/rules binary
- Install the created .debs
Let me know if the build procedure doesn’t work for you. As this is a Lucid-based source package, it could happen that it’d cry out for updated libtool and/or autoconf packages – let me know if that’s the case.