Call Us Today! 877.742.2583




Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

About

by Daniel O'Neill

How to set up a Mumble conference with alsaALSA.

 

Expand
titleClick here to expand Table of Contents
Panel
borderColorlightgray
bgColor#f7f7f7
borderWidth1
borderStyledotted

Table of Contents
maxLevel3
outlinetrue
indent1em
excludeAbout
stylenone
printablefalse

Prerequisites

You'll need to verify you have a few things installed before you can get started:

...

For the FreeSWITCH, you'll need mod_portaudio and mod_conference.

Verify that you have these modules by looking in mod/ for their filenames (mod_portaudio.so and mod_conference.so)

Also, make sure they're enabled in autoload_configs/modules.conf.xml.

Conference Setup

Initially all you'll need to do is setup a conference, which is configured in autoload_configs/conference.conf.xml:

...

As you can see, it's a basic conference, but with some key differences: the RATE is quite high (48khz), but this is because Mumble (on my system) uses this samplerate. Using the same samplerate not only avoids resampling, but also improves stability (no jitters, or crackles). Take note of this setting though for later.

Dialplan Setup

Assign an extension to this conference, and test it out. My dialplan entry looks like this:

...

In our case, the conference is configured as 'default', and there is no conference named 'hydway', so .. it works. But I think if you have more than one conference, you should point your dialplan at it properly.

PortAudio Endpoint

The Portaudio plugin must also be setup, and the configuration is located at autoload_configs/portaudio.conf.xml. Mine looks like this:

...

Again, take note of the 'sample-rate' parameter, we want it to match both our conference and our mumble client.

ALSA asoundrc or asound.conf

Notice the 'indev' and 'outdev' values as 'cloop' and 'ploop' in the portaudio setup. These devices will be created using the snd-aloop ALSA module by adding (or creating) the following to /etc/asound.conf:

...

In this configuration, everything runs through dmix and dsnoop. This isn't required if your samplerates match. To freeball it, change the 'type' field to 'plug', and remove the ipc_key lines.

Preparing FreeSWITCH

In case your freeswitch is currently running, connect using fs_cli and issue:

...

The 'Loopback' entries (6 and 7) are possibly unusable. I haven't found any way to directly address the subdevices ('2,0,0', '2,0,1', etc.) Luckily, it picks up our handrolled PCMs, which is good enough.

Mumble Configuration

If you've made it this far, it gets much easier. Get/build/install Mumble. I'm not going to explain how, their website should help you out.

...

You may want to finish tuning your setup, but for great victory, click OK to save, and close Mumble.

Mumble manual device configuration

If your 'amix' and 'asnoop' PCM devices didn't appear in your Audio Input and Audio Output device selection fields in Mumble, some configuration hacking is required. Open ~/.config/Mumble/Mumble.conf in your favourite text editor, and locate a section which looks like this:

...

Save, close, restart Mumble. Easy, right? Sure, but the next time you open Configure->Settings and click Apply or OK, you'll have to do this all over again. In my case, the section itself was removed from the config file entirely, I just re-added it. Other than this inconvenience, it works perfectly. And once running, you should have little or no reason to reopen your configuration anyway, right? :)

Connecting it together

If you've managed all of this, connect to any server you like in Mumble. If anybody speaks to you on there, you won't be able to hear it (if you have speakers or a headset connected to your FreeSWITCH server at all, you weirdos) because Mumble is routing directly into our Loopback device, which is tied, on the opposing end, to our mod_portaudio instance.

...

In the terminal where you executed Mumble, note the sample rates it is using for both input and output. Configure your conference and/or portaudio to match, unless you're satisfied by dsnoop and dmix's resampling.

Testing

Now to test both ends:

Connect to the same mumble server from another computer, as usual. Pick up your SIP phone (or whatever you have connecting to FreeSWITCH, softphone, iax phone, whatever,) and dial into your conference. Talk into each, and listen with the respective other. If you have latency, adjust buffering accordingly.

Deploying

At this point, you may wish to set snd-aloop to automatically load on system startup by adding it to your /etc/modules file.

TODO List

I'd also like to request input on methods to do the following:

...


If there are better solutions, please comment. Otherwise, once/if the Autoconnect patch is accepted on Mumble upstream, instructions will be adjusted accordingly.

Credits

I stole the snd-aloop and asoundrc idea from this: http://alsa.opensrc.org/index.php/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge