Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with asterisk and pulseaudio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
genterminl
Guru
Guru


Joined: 12 Feb 2005
Posts: 523
Location: Connecticut, USA

PostPosted: Sat Oct 24, 2015 7:36 pm    Post subject: Problems with asterisk and pulseaudio Reply with quote

I'm just starting to experiment with asterisk, and while I may get a dedicated box for it eventually, right now, I'd like to be able to play with in on my existing box. However, this seems to be causing a problem. I have alsa-lib (1.0.29) and pulseaudio (6.0) and I have otherwise had no problems with audio output - either speakers connected to the sound card, or headphones connected by USB. However, when I try to load chan_alsa, the asterisk message log shows
from /var/log/asterisk/messages:
[Oct 23 19:04:34] ERROR[29177] chan_alsa.c: snd_pcm_open failed: Connection refused
[Oct 23 19:04:34] ERROR[29177] chan_alsa.c: Problem opening alsa capture device
That's with input_device and output_device in alsa.conf set to pulse. If I them to default, I get "No such file or directory" instead of "Connection refused." I now believe the key messages are (with the timestamps and "localhost wrapper[28080]: asterisk: " trimmed from each line
from /var/log/messages:
Home directory not accessible: Permission denied
asterisk: W: [pulseaudio] core-util.c: Failed to open configuration file '/root/.config/pulse//daemon.conf': Permission denied
asterisk: W: [pulseaudio] daemon-conf.c: Failed to open configuration file: Permission denied
asterisk: ALSA lib /usr/portage/tmpdir/portage/media-plugins/alsa-plugins-1.0.29/work/alsa-plugins-1.0.29/pulse/pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
This happens with or without asterisk in the audio group.
ll /dev/snd:
total 0
drwxr-xr-x   4 root root      280 Oct 22 20:26 .
drwxr-xr-x  17 root root     3820 Oct 22 20:29 ..
drwxr-xr-x   2 root root       60 Oct 22 20:26 by-id
drwxr-xr-x   2 root root       80 Oct 22 20:26 by-path
crw-rw----+  1 root audio 116,  0 Oct 22 20:26 controlC0
crw-rw----+  1 root audio 116, 32 Oct 22 20:26 controlC1
crw-rw----+  1 root audio 116, 24 Oct 23 19:15 pcmC0D0c
crw-rw----+  1 root audio 116, 16 Oct 24 12:35 pcmC0D0p
crw-rw----+  1 root audio 116, 25 Oct 22 20:26 pcmC0D1c
crw-rw----+  1 root audio 116, 18 Oct 23 19:15 pcmC0D2p
crw-rw----+  1 root audio 116, 56 Oct 23 19:15 pcmC1D0c
crw-rw----+  1 root audio 116, 48 Oct 24 12:35 pcmC1D0p
crw-rw----   1 root audio 116,  1 Oct 22 20:26 seq
crw-rw----+  1 root audio 116, 33 Oct 22 20:26 timer
with the facl showing my user (which is currently running the pulseaudio daemon) has rw- permissions.
My best guess now is that the asterisk wrapper is running as root, and although it changes the effective UID and GID to asterisk before launching the asterisk daemon, loading chan_alsa is trying to run a pulseaudio daemon as root, and failing.
The default asterisk installation has the asterisk user set up not being able to log in. I have not yet tried changing this to see if perhaps it will then try launching pulseaudio as asterisk instead of root.
Is this simply an inherent limitation of the way asterisk and pulseaudio are generally set up? I suppose I can set up a VM, and within it run pulseaudio per system instead of per user, but I'd really rather not need that extra level just for playing around with asterisk.
Thanks for any hints or suggestions whether I seem to be barking up the right tree, whether what I'm trying is even possible, and what else I might try - or so I really need to jump to using a VM?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum