[asterisk-dev] Opus and VP8

Andrea Suisani sickpig at opinioni.net
Wed Jun 5 04:48:35 CDT 2013


Hi Lorenzo and all,

On 06/04/2013 05:31 PM, Lorenzo Miniero wrote:
> Dear James and all,
 >
 >
> I managed to find out the cause of the issue. I simply forgot (mea culpa!) to add a couple of lines to the patch (which is why I couldn't replicate it in my setup, where the lines exist) which tells Asterisk which rate to use for the format. As you know, Opus always uses 48kHz, while the default in
> Asterisk is 8000: this caused wrong timestamp increase calculations on the non-Opus RTP leg, and hence the corrupt audio.
>
> I updated the patch on the repository. If you don't want to apply the patch again, just add these lines in the ast_format_rate method of format.c:
>
> /* Opus */
> case AST_FORMAT_OPUS:
> return 48000;
>
> and make/make install again. The easiest thing to do is put this as the last case before the default.
>
> Let me know if this fixes the issue,

as I already said this fix solve the issue we had.

the tests we made are related to this configuration:

         (sip+opus)             (iax/sip+g729)
WebRTC ----------->  Asterisk -----------------> pstn/mobile
           (A)                      (B)

I know that there is no ad-hoc Opus configuration yet,
but I'm trying to measure the bandwidth of the call opus leg (A).

I've used iftop to get a rough measure, catching only udp
packets. the iftop instance was executed on the same host
where asterisk is running catching packets only on the net
interface to which asterisk is bind to.

While using opus the A leg bandwidth is something like 50/55 kb/s,
from the webrtc client to the asterisk, while something along
100kb/s from asterisk to client. is it normal?

with ulaw I've got 85kb/s both from and to the asterisk server.

another strange thing: when switching codec I need to restart asterisk
to get a functioning calls otherwise callee (pstn end point) does not hear
anything.

this could be related to my setup/dialplan and having nothing to
do with the patch in itself by the way, still it seems fishy though.

Andrea






More information about the asterisk-dev mailing list