[asterisk-dev] Opus and VP8

Andrea Suisani sickpig at opinioni.net
Wed Jun 5 02:37:13 CDT 2013


Hi all

sorry for being late. I've managed to focus again on this subject only
this morning and luckily enough Lorenzo have already fix the issue!

as James I've tested those scenarios:

         (sip+opus)             (iax2+gsm)
WebRTC ----------->  Asterisk ------------> pstn


         (sip+opus)             (sip+gsm)
WebRTC ----------->  Asterisk ------------> pstn


         (sip+opus)             (iax2+g729)
WebRTC ----------->  Asterisk ------------> pstn


         (sip+opus)             (sip+g729)
WebRTC ----------->  Asterisk ------------> pstn


and everything seems to work flawlessly.

And the next few days I'll test that configuration
more thoroughly and I'll report back

many thanks

I owe Lorenzo a beer (or two) and since we are both Italian
maybe we will get a chance to drink that together :)


On 06/04/2013 05:55 PM, James Mortensen wrote:
> Hello Lorenzo!
>
> It always comes down to just a few lines of code, doesn't it. At any rate, YOU ROCK!
> We made the changes and verified the call leg from Chrome to Asterisk uses Opus, and we
> were able to transcode to both g729 and ulaw for the call leg to our PSTN trunk provider!
>
> Nice work!  Thank you again for the patch and for moving the world of WebRTC forward.
>
> James
>
>
>
>
> On Tue, Jun 4, 2013 at 8:31 AM, Lorenzo Miniero <lminiero at gmail.com <mailto:lminiero at gmail.com>> 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,
>     Lorenzo
>
>
>     2013/5/30 James Mortensen <james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>>
>
>
>         On Thu, May 30, 2013 at 5:15 AM, Lorenzo Miniero <lminiero at gmail.com <mailto:lminiero at gmail.com>> wrote:
>
>             James,
>
>             I mostly tested it in conferencing scenarios, using ConfBridge to attach heterogeneous peers. In those scenarios, I used both Chrome and Firefox (using the DTLS-SRTP hacks I mentioned in the other thread), and PhonerLite as well. For other codecs I used a bunch of softphones, our Java
>             applet (wideband speex) and calls from the PSTN using a VoIP gateway. This way it seems to work as expected.
>
>             At the beginning, through, I mostly used PhonerLite and Linphone calling each other through Asterisk to test the codec, and I can't recall issues like those you mentioned, but I didn't test this intensively. As I anticipated, I'm currently traveling and won't be able to do any testing
>             until Saturday: I'll keep you posted about this.
>
>             Lorenzo
>
>             Il giorno 30/mag/2013 00:43, "James Mortensen" <james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>> ha scritto:
>
>
>                 On Wed, May 29, 2013 at 11:06 AM, Lorenzo Miniero <lminiero at gmail.com <mailto:lminiero at gmail.com>> wrote:
>
>                     2013/5/29 James Mortensen <james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>>
>
>
>                         On Wed, May 29, 2013 at 8:37 AM, James Mortensen <james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>> wrote:
>
>
>
>                             There appears to be paths for both ulaw as well as g729.
>
>                             I did try the patch on Asterisk 11.1.2, but shifted gears when I realized the crypto headers are buggy as per https://issues.asterisk.org/jira/browse/ASTERISK-20849.  However, I'll apply the patch to fix that issue and then try a call on Asterisk 11.1.2.
>
>                             I'll follow up with additional details when I know more.  Again, thank you for your time and your work on this. We're really stoked about getting opus working in Asterisk! :)
>
>
>                             --
>                             James Mortensen
>                             Project Manager, VoiceCurve, Inc.
>                             866-707-4590 <tel:866-707-4590>
>                             james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>
>
>
>
>                         Hi Lorenzo,
>
>                         The problem exists on Asterisk 11.1.2 as well.  It sounds like the two parties are talking underwater.  Please let me know if there's any other details that I can get you.
>
>
>                     Ok, thanks for the details and the clarification. Unfortunately I'll be out of office for the next two days so I won't be able to look into this right away, but I'll check what may be going wrong as soon as I get back to work.
>
>                     Please keep me posted if you find any additional info that may be of use.
>
>                     Cheers,
>                     Lorenzo
>
>
>                         --
>                         James Mortensen
>                         Project Manager, VoiceCurve, Inc.
>                         866-707-4590 <tel:866-707-4590>
>                         james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>
>
>
>
>
>                 Hi Lorenzo,
>
>                 I wanted to let you know that our trunk provider supports both ulaw and g729. We're using Chrome with JsSIP in the browser.
>
>                 We've tried calls transcoding to/from ulaw to opus and g729 to opus, and we still hear the robotic audio in both scenarios, and this is on both Asterisk 11.1.2 and Asterisk 11.4.0.
>
>                 What is your setup like, as it sounds like you actually have this working?  What codecs are you transcoding to/from?  Are you making calls from the browser at all or are you only testing with that PhonerLite system?
>
>                 Also, our SIP clients are on Mac OS 10.8.  The Asterisk server is on Ubuntu 12.04.  I installed the opus libraries from this site: http://www.opus-codec.org/downloads/ using the latest version, 1.0.2
>
>                 Hope this helps!  Let us know if there's anything else we should try.
>
>
>                 --
>                 James Mortensen
>                 Project Manager, VoiceCurve, Inc.
>                 866-707-4590 <tel:866-707-4590>
>                 james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>
>
>
>
>
>         Hi Lorenzo,
>
>         Thanks again for your help.  When you do get back around to this, can you specifically test the scenario where you're calling from Chrome to Asterisk to the PSTN?  Using the codecs opus to g729 and opus to ulaw?
>
>         We really appreciate the work you're doing on this!  Thank you again!
>
>         James
>
>         --
>         James Mortensen
>         Project Manager, VoiceCurve, Inc.
>         866-707-4590 <tel:866-707-4590>
>         james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>
>
>
>
>
>
> --
> James Mortensen
> Project Manager, VoiceCurve, Inc.
> 866-707-4590
> james.mortensen at voicecurve.com <mailto:james.mortensen at voicecurve.com>




More information about the asterisk-dev mailing list