[asterisk-dev] Support for amr codec?

Michael Maier m1278468 at mailbox.org
Tue Aug 18 04:02:59 CDT 2020


Hello!

Thanks Joshua for your replay.

I tried to apply this patch here https://github.com/traud/asterisk-amr to asterisk 16. It's working fine for me after a few small changes to get the patches applied. For convenience,
I built one single patch file (I attached it), which can be applied with

patch -p1 amr-asterisk-16.12.patch

to asterisk 16.12.



To get it compile and working, you need (for CentOS 7) the following additional RPM packages:

vo-amrwbenc-0.1.3-1.el7.x86_64.rpm
vo-amrwbenc-devel-0.1.3-1.el7.x86_64 (only for compile)

opencore-amr-0.1.5-6.el7.x86_64.rpm
opencore-amr-devel-0.1.5-6.el7.x86_64.rpm (only for compile)

You can find them here: https://centos.pkgs.org/7/rpmfusion-free-updates-x86_64/


Additionally, you have to follow the build instructions given on https://github.com/traud/asterisk-amr , especially you have to run

./bootstrap.sh

before ./configure

of asterisk. As I'm building my asterisk binary on base of a self maintained Schmooze spec file, I can say, that it is not necessary to run this command with the option
--enable-category MENUSELECT_CORE_SOUNDS - Schmooze uses the opposite:

./menuselect/menuselect --disable-category MENUSELECT_CORE_SOUNDS



How to proof build success?
You should get after compile 2 new modules in /usr/lib64/asterisk/modules:

codec_amr.so
res_format_attr_amr.so

After restarting of asterisk, you can check with "core show codecs audio", if those 2 codecs are displayed:

1 audio amr          amr              (AMR)
2 audio amrwb        amrwb            (AMR-WB)

Further more, you can check, if transcoding basically works with "core show translation". If you can find amr and amrwb in the output, transcoding is expected to work.



How to test it in the wild?
With Deutsche Telekom e.g, there are mobile calls using amr codec (if you accept it). You can see it in the SDP of the INVITE. After enabling it for the trunk, Telekom will use it,
especially on outgoing calls (from what I've seen here).

You can check it for an active call in the asterisk CLI, too:
pjsip show channelstats



The final question: Is there a must have to support amr (with Deutsche Telekom)? I don't think so - I've never had any problem so far w/o support of amr. Therefore, at the time
being, it's nice to have from my point of view. But it's good to see, if it's working or if there are any problems with the use of amr and asterisk to get them addressed and
hopefully fixed.



Thanks
Kind regards
Michael


On 17.08.20 at 20:45 Joshua C. Colp wrote:
> On Mon, Aug 17, 2020 at 3:40 PM Michael Maier <m1278468 at mailbox.org> wrote:
> 
>> Hello all!
>>
>> Is there any official support for the amr codec in Asterisk? I couldn't
>> find any in asterisk 16.
>>
>> There is a patch for Asterisk 13:
>> https://github.com/traud/asterisk-amr
> 
> 
> There is no official support for it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amr-asterisk-16.12.patch.gz
Type: application/gzip
Size: 8158 bytes
Desc: not available
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200818/410346f2/attachment.gz>


More information about the asterisk-dev mailing list