Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated for 12.2.0 #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Updated for 12.2.0 #7

wants to merge 3 commits into from

Conversation

Thulinma
Copy link

Hey there! I went ahead and updated your patch for the latest release.
Feel free to copy/modify/blah/whatever.
No need to mention me anywhere, just trying to make it easier for folks to use Opus in the latest release. :-)

Updated for 12.2.0, removed VP8 passthrough parts since this is already part of 12.2.0.
@lminiero
Copy link
Member

@Thulinma thanks for the update! I'll look into it as soon as I can, but rather than merge I think I'll make the patch available in parallel to the one we already have. I'll also try and prepare other patches for more problematic versions of Asterisk (as the one in issue #8) which should help users not have to force changes on uncompliant versions.

@Thulinma
Copy link
Author

I figured, yes. I wanted to make it available in parallel as well, but my connection had some issues and I had to use github's web interface to make the commits (yuck!). Hence the mention of feeling free to modify. :-)

I did notice some others have created forks as well, and provided patches for other versions. You may want to look into those - though I suppose they haven't technically given you permission to copy their work... Yay copyright law, right?

@lminiero
Copy link
Member

It would be great to have all patches in a single place so I'll definitely look into them, but if that won't be possible, no problem at all! I'm only glad that the work we started helped and motivated so many people so far, so just linking to other patches in the README will be ok as well.

@Thulinma
Copy link
Author

Good idea!
I was also looking into adding support for .opus files through a new format_ogg_opus.c handler - but put that project on pause for now... The way Asterisk works with formats is... overwhelming, to say the least. Would have been nice, though! I might get back to that, later.

@lminiero
Copy link
Member

I thought about .opus files as well, especially considering they basically are .ogg files with a different extension, and Asterisk already has .ogg support for vorbis packets, but then never went for it either. In case you decide to give it another try, you may want to have a look at what we already did for recording Opus stream to .opus files in our WebRTC gateway Janus:

https://github.com/meetecho/janus-gateway/blob/master/plugins/janus_voicemail.c

Opus playout is still missing but it will probably end up in the streaming plugin of the same project. As soon as both will be available, I'll also check if and how difficult integrating those in Asterisk might be.

@Thulinma
Copy link
Author

Yeah, that's what stopped me - Asterisk has support for ogg-vorbis, but this is very specifically only ogg-vorbis. The optimizer in me wanted to extend the existing ogg support to be ogg vorbis/opus... But it's quite tightly bound to vorbis at the moment :-(
Thanks for the link - it might indeed help. If I get anything working I'll ping back here.

@SirLouen
Copy link

@lminiero good news about merging with cert version, any update about this? it would be really awesome to have opus unofficial support for asterisk cert-4 (most recent cert version)

@lminiero
Copy link
Member

We started converting the patch to the latest 11 version, but this was
before most of the team went to vacation. We'll probably have
something new to share next week.

2014-08-20 14:54 GMT+02:00, SirLouen [email protected]:

@lminiero good news about merging with cert version, any update about this?
it would be really awesome to have opus unofficial support for asterisk
cert-4 (most recent cert version)


Reply to this email directly or view it on GitHub:
#7 (comment)

@SirLouen
Copy link

@lminiero ok, this is awesome 👍
The thing I don't know if the code for 11.11 will serve for 11.6-cert4 since there have been multiple changes specially regarding SRTP issues that I don't know if affect directly to opus exchange.

@lminiero
Copy link
Member

The patch will most definitely address the latest 11 version as it
fixes several DTLS related issues.

2014-08-20 14:58 GMT+02:00, SirLouen [email protected]:

@lminiero ok, this is awesome 👍
The thing I don't know if the code for 11.11 will serve for 11.6-cert4 since
there have been multiple changes specially regarding SRTP issues that I
don't know if affect directly to opus exchange.


Reply to this email directly or view it on GitHub:
#7 (comment)

@SirLouen
Copy link

I'm actually "proxifying" thru rtpengine because Asterisk is failing misserably with webrtc DTLS support. So I prefer to use a stable version of Asterisk, than the latest for production. But I'm looking for opus support despite is unstable, so I will lookout the patch for 11.11 to try to fork it for 11.6-cert4, since the @alexfournier 11.10 patch did not work for me (adapting to 11.10). I will tryout @andrius fork soon (it says it has support for 11.11)

@andrius
Copy link

andrius commented Aug 20, 2014

Sure, http://sipjs-test.herokuapp.com

It is asterisk 11.11.0 + opus + webrtc, client is sipjs.com. It works

On Wed, Aug 20, 2014 at 3:21 PM, SirLouen [email protected] wrote:

I'm actually "proxying" thru rtpengine because Asterisk is failing
misserably with webrtc. So I prefer to use a stable version of Asterisk,
than the latest for production. But I'm looking for opus support despite is
unstable, so I will lookout the patch for 11.11 to try to fork it for
11.6-cert4, since the @alexfournier https://github.com/alexfournier
11.10 patch did not work for me (adapting to 11.10). I will tryout
@andrius https://github.com/andrius fork soon (it says it has support
for 11.11)


Reply to this email directly or view it on GitHub
#7 (comment).

@alexfournier
Copy link

You've got the wrong @alexfournier. I'm getting emails for this convo.

@fira
Copy link

fira commented Dec 5, 2014

@Thulinma @andrius

I'm in the process of attempting to port this to Asterisk 13.0.1 and have the following notes so far :

  • First, Asterisk now supports Opus Passthrough which means the RTP options have partly been implemented
  • Secondly, the transcorders info seem to now require specification of the source and destination codec in structure instead of doing so via ast_format_set()
  • Comparaison behind codecs are now done differently
  • The transcoder format codec definition is done directly instead of with ast_format_set() aswell
  • Asterisk only defines for passthrough Opus on Fullband 48kHz so to limit modding Asterisk i dropped support for other rates at first and forced internal sampling rate to 48kHz
  • There's no sample file for slin48 in Asterisk so one may need to be added
  • I couldn't get the transcoder to work as of now, failing with translate.c:392 framein: no samples for opustolin48 -- apparently both opus_decode and opus_decoder_get_nb_samples return zero samples regardless of the 920 bytes of data thrown into.

Any advice would be appreciated :)

@Thulinma
Copy link
Author

Thulinma commented Dec 5, 2014

@fira
A few notes:

  • Opus passthrough happened in 12 already.
  • Opus always internally uses 48kHz... and each packet can change the stream properties.

As for the rest of your notes... I'm not sure. Would have to look at everything in more detail and I don't have the time for that right now.

@PieterDeBruijn
Copy link

Our Grandstream phones support Opus and software phone App (CSipSimple). We run Asterisk on a Linux platfrom with the Opus codec installed. Can someone tell me what version of Asterisk is needed for these phones to get them to use the Opus codec? Do I need the custom build to let them talk to PCMA/G722 streams?

@Thulinma
Copy link
Author

Thulinma commented Jan 2, 2015

@PieterDeBruijn This is not really the place to ask, I think... But in order for them to "work", any version should be fine. For the Opus codec to be usable, version 12+ is what you need. If you want all connections to be Opus (and nothing else to go from the server to the phones), you'll need a patched/custom build as encoding to opus is what is added here.
Hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants