traud / asterisk-amr

Asterisk 13 transcoding module: AMR-WB
The Unlicense
32 stars 19 forks source link

Asterisk 14,15? #12

Closed dziny closed 6 years ago

dziny commented 6 years ago

Is there any way this patch can be adapted to be used with Asterisk 15? Both patches do work but the codec amr does not appear on the list of codecs after make menuselect and after the compilation goes trough amr-nb and amr-wb do not appear in core show translation

traud commented 6 years ago

Officially only long-term support releases are supported. However, over the holidays, I found the time to investigate your issue. Here, I am not able to reproduce your issue. For example in Ubuntu 16.04 LTS, Asterisk 15 works with my patch:

cd /usr/src/
wget downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz
tar -xf ./asterisk*
cd ./asterisk*
sudo apt install build-essential libedit-dev libjansson-dev libsqlite3-dev uuid-dev libxml2-dev
sudo apt install libopencore-amrnb-dev libopencore-amrwb-dev libvo-amrwbenc-dev
sudo apt install autoconf

If my module does not show up in make menuselect → Codecs, something went wrong in configure or autoconf already.

  1. When you apply the build_tools.patch, do you get any error or warning?
  2. What happens while running ./bootstrap.sh (edit that script to get warnings about autoconf)?
  3. Is AMR(-WB) listed in the output of ./configure?

Although I am closing this issue, please, do not hesitate to re-open when you still face it. In that case, provide more information about your environment (which Linux distribution you use, which version), so I am able to reproduce it.

dziny commented 6 years ago

Thanks Alex, I'll have a look at it again. I'm using latest debian 9. I suspect I have not installed all dependencies, I need to recheck it. All the best.

dziny commented 6 years ago

I would like to reopen this as I've encountered an issue with asterisk 15. I had no issue this time with codes appearing in the config menu and the compilation went fine.

If I initiate a call from a phone supporting amr everything goes fine, no problem. However, if I call this phone from another line the transcoding does not work. I get busy signal if I only allow amr codec on the receiving phone. If I allow a different codec the phone rings and the call is set up using this codec (not amr). I have tried this with 2 different phones (old nokia and native android client) with same results. So unlikely it's a phone issue. I've also compiled the latest Asterisk 13 (13.19.0) on the same machine to compare and in this case everything works as expected. So there is some change Asterisk 13->15 breaking stuff when the codec on the receiving phone is amr. Even call amr->amr fails, the receiving phone is not able to use amr.

sfeigl commented 6 years ago

I am able to reproduce the problem here.

I noticed following error in the logs:

res_pjsip_sdp_rtp.c: Unable to get rtp codec payload code for amrwb

I did a comparison of the SIP INVITE package of outgoing and incoming calls. When asterisk creates the INVITE packet (calling the amrwb endpoint), there is no AMR-WB codec in the SDP payload. I suppose that is the cause why the connection cannot be established.

traud commented 6 years ago

Thank you very much for reporting and updating this issue. I was able to find the cause and it is an issue upstream since Asterisk 14.5. The issue not only affects AMR(-WB), not only all of mine formats, but also Digium SiLK and Codec 2. Therefore, I am sure the whole Asterisk community is happy that you reported.

Because a patch exits, and because a workaround via a configuration file change exists, I am going to close this report here. Until Asterisk is fixed, please, watch ASTERISK-27850… (there at the top-right a link exists to watch/subscribe to that issue).

If you still see your issue, that might be a different issue. Then, do not hesitate to re-open this report. In that case, please mention the channel driver (chan_sip or chan_pjsip), the concrete Asterisk version (like 15.4.0), and if possible post the result of (pj)sip set debug on from the command-line interface (CLI) of your Asterisk.