[asterisk-bugs] [JIRA] (ASTERISK-27748) Random webrtc calls without audio and ALAW<->OPUS transcoding errors

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Wed Apr 11 16:59:50 CDT 2018


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=242983#comment-242983 ] 

Kevin Harwell commented on ASTERISK-27748:
------------------------------------------

I didn't get the corruption error, but the audio was unintelligible (buzzing sound) when I ran the described scenario:

Asterisk2 (alaw) -> (alaw) Asterisk1 (opus) -> (opus) Endpoint

I tried substituting a couple of different codecs for alaw (ulaw, g722) and heard the same result. Also noticed the following in the debug, which is similar to the reporters:
{noformat}
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.22.255:4038 (type 107, seq 014493, ts 3091628534, len 000050)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 960 vs 160
[Apr 11 16:33:03] DEBUG[7396][C-00000001] res_rtp_asterisk.c: Ooh, format changed from none to alaw
[Apr 11 16:33:03] DEBUG[7396][C-00000001] res_rtp_asterisk.c: Starting RTCP transmission on RTP instance '0x7fb20001db88'
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.17.53:17884 (type 08, seq 028459, ts 000200, len 000160)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 960 vs 160
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.17.53:17884 (type 08, seq 028460, ts 000360, len 000160)
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.17.53:17884 (type 08, seq 009371, ts 000160, len 000160)
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.22.255:4038 (type 107, seq 014494, ts 3091629494, len 000050)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 160 vs 960
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 960 vs 160
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.17.53:17884 (type 08, seq 028461, ts 000520, len 000160)
[Apr 11 16:33:03] DEBUG[7398][C-00000001] res_rtp_asterisk.c: Ooh, format changed from none to opus
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.22.255:4038 (type 107, seq 012029, ts 000672, len 000102)
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.17.53:17884 (type 08, seq 009372, ts 000320, len 000160)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 160 vs 960
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.22.255:4038 (type 107, seq 012030, ts 001632, len 000103)
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.22.255:4038 (type 107, seq 014495, ts 3091630454, len 000050)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 960 vs 160
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.17.53:17884 (type 08, seq 028462, ts 000680, len 000160)
[Apr 11 16:33:03] VERBOSE[7396][C-00000001] res_rtp_asterisk.c: Got  RTP packet from    10.24.17.53:17884 (type 08, seq 009373, ts 000480, len 000160)
[Apr 11 16:33:03] DEBUG[7396][C-00000001] translate.c: Sample size different 160 vs 960
[Apr 11 16:33:03] VERBOSE[7398][C-00000001] res_rtp_asterisk.c: Sent RTP packet to      10.24.22.255:4038 (type 107, seq 012031, ts 002592, len 000101)
{noformat}
Here's the basic _pjsip.conf_ endpoint configuration I used on ast1:
{noformat}
[endpoint_t](!)
type=endpoint
context=default
direct_media=no
rtcp_mux=yes

[aor_t](!)
type=aor
qualify_frequency=0
max_contacts=10

;; Phone endpoint using opus
[102](aor_t)
contact=sip:102@<endpoint IP>
mailboxes=102 at default

[102](endpoint_t)
aors=102
allow=!all,opus

;; Asterisk endpoint using alaw
[ast2](aor_t)
contact=sip:<IP of ast2>

[ast2](endpoint_t)
aors=ast2
from_user=ast1
allow=!all,alaw
{noformat}
And for ast2:
{noformat}
[ast1](aor_t) ; uses same template definition as ast1
contact=sip:<IP of ast1>

[ast1](endpoint_t) ; uses same template definition as ast1
aors=ast1
from_user=ast2
allow=!all,alaw
{noformat}
I then originated a call from ast2 to ast1, which called endpoint 102:
{noformat}
CLI> channel originate PJSIP/102 at ast1 application Playback demo-congrats
{noformat}

> Random webrtc calls without audio and ALAW<->OPUS transcoding errors
> --------------------------------------------------------------------
>
>                 Key: ASTERISK-27748
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27748
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Codecs/codec_opus, Core/CodecInterface
>    Affects Versions: 15.3.0
>         Environment: CentOS release 6.9 (Final)
> Linux fvicastwrtc.local 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
> Running on VMWare ESXi 6.0
>            Reporter: Fran Vicente
>            Assignee: Fran Vicente
>              Labels: opus, pjsip, webrtc
>         Attachments: capture2.zip, full, pjsip_extensions_pogp.conf
>
>
> I have an environment which uses an Asterisk 15.3.0 to bridge calls to WebRTC endpoints configured using OPUS codec. The calls are originated on another Asterisk, connected to this using ALAW codec.
> All the calls run the same dialplan (that simply calls the webrtc client) and the same webrtc endpoints, but randomly the following errors shows on the Asterisk console, and I get no audio on the calls. 
> {code}
> [Mar 19 11:53:25] WARNING[8195][C-00000002] translate.c: Out of buffer space
> [Mar 19 11:53:25] DEBUG[8194][C-00000002] translate.c: Sample size different 160 vs 960
> [Mar 19 11:53:25] DEBUG[8194][C-00000002] translate.c: Sample size different 160 vs 960
> [Mar 19 11:53:25] ERROR[8195][C-00000002] codec_opus.c: Opus: Unable to parse packet for number of samples: corrupted stream
> [Mar 19 11:53:25] WARNING[8195][C-00000002] translate.c: no samples for opustolin
> [Mar 19 11:53:25] ERROR[8195][C-00000002] codec_opus.c: Opus: decoding: corrupted stream
> [Mar 19 11:53:25] WARNING[8195][C-00000002] translate.c: Out of buffer space
> [Mar 19 11:53:25] DEBUG[8194][C-00000002] translate.c: Sample size different 160 vs 960
> [Mar 19 11:53:25] ERROR[8195][C-00000002] codec_opus.c: Opus: decoding: corrupted stream
> {code}
> The dialplan simply does:
> {code}
> exten => _X.,1,Dial(PJSIP/${EXTEN})
> {code}
> See the complete log and configuration attached.



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



More information about the asterisk-bugs mailing list