[asterisk-bugs] [JIRA] (ASTERISK-26870) codec_opus: Codec configured with constant bit rate, but frame sizes changes

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Fri Dec 1 11:55:08 CST 2017


     [ https://issues.asterisk.org/jira/browse/ASTERISK-26870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett reassigned ASTERISK-26870:
------------------------------------------

    Assignee: Richard Mudgett

> codec_opus: Codec configured with constant bit rate, but frame sizes changes
> ----------------------------------------------------------------------------
>
>                 Key: ASTERISK-26870
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26870
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Codecs/codec_opus
>    Affects Versions: 13.13.1
>         Environment: CentOS 7, Kernel 3.10.0-514.6.1.el7
>            Reporter: Oussama Hammami
>            Assignee: Richard Mudgett
>            Severity: Minor
>
> 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



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list