Summary: | ASTERISK-26870: codec_opus: Codec configured with constant bit rate, but frame sizes changes | ||||||
Reporter: | Oussama Hammami (ohammami) | Labels: | |||||
Date Opened: | 2017-03-14 11:05:26 | Date Closed: | 2017-12-01 11:53:53.000-0600 | ||||
Priority: | Minor | Regression? | |||||
Status: | Closed/Complete | Components: | Codecs/codec_opus | ||||
Versions: | 13.13.1 | Frequency of Occurrence | Constant | ||||
Related Issues: |
| ||||||
Environment: | CentOS 7, Kernel 3.10.0-514.6.1.el7 | Attachments: | |||||
Description: | Hi,
We have the following setup: a client (iPhone) calls a number (113) which plays back a gsm file (i.e. no SIP call involved). In the dialplan: {noformat} exten => _5113,1,Answer() exten => _5113,n,Wait(3) exten => _5113,n,Playback(you-are-caller-num) exten => _5113,n,Wait(1) {noformat} We have a proprietary channel driver which handles the connections to the clients. Client and channel driver communicate over UDP. Given the dialplan above, the following should happen: the client connects to our proprietary channel driver. The channel driver creates an Asterisk channel (read/write format: ast_format_opus) and starts the call. Asterisk figures out in the dialplan that the you-are-caller-num must be played back. Because the file is in gsm format, Asterisk transcodes to opus and hands the data back to the created channel. The channel driver takes the data and sends it to the client (via UDP). The client decodes the opus data. Here is the opus configuration in /etc/asterisk/codecs.conf: {noformat} [opus] type=opus signal=voice application=voip sample_rate=8000 max_bandwidth=narrow max_playback_rate=16000 bitrate=auto cbr=true {noformat} Note that the client expects a sample rate of 8000 and a constant bit rate (cbr=true). In sip.conf, I added {noformat} allow=opus {noformat} When Asterisk calls the write callback on the channel to provide a frame, I see that the value of frame->datalen is changing with each callback invocation (99, 118, 111, 101, etc.), but frame->datalen should have a constant value: 28 (for a sample rate of 8000 and cbr=true). I do not understand why the frame size is constantly changing even though I configured opus with cbr=true? How can I enforce my settings? The issue was discussed in the Asterisk community: https://community.asterisk.org/t/asterisk-13-opus-no-translation-path/ Best regards, Ouss | ||||||
Comments: | By: Asterisk Team (asteriskteam) 2017-03-14 11:05:27.075-0500 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Richard Mudgett (rmudgett) 2017-11-30 14:30:35.294-0600 This should be fixed by Digium's codec_opus v1.3.0 when it is released. By: Richard Mudgett (rmudgett) 2017-12-01 11:53:24.926-0600 The patch that fixed ASTERISK-27381 should fix this issue. |