[asterisk-users] Asterisk throws error using the alsa, module
Dave Platt
dplatt at radagast.org
Mon Dec 14 13:02:02 CST 2009
>> See if it plays back properly.
>
> Running aplay as asterisk user seems to be no problem:
>
> asterisk at puppy$ aplay /usr/share/sounds/alsa/Front_Center.wav
> Playing: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
> Little Endian, Rate: 48000 Hz, mono
> asterisk at puppy:~$ aplay -Dpulse /usr/share/sounds/alsa/Front_Center.wav
> Wiedergabe: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
> Little Endian, Rate: 48000 Hz, mono
> asterisk at puppy:~$ aplay -Ddefault /usr/share/sounds/alsa/Front_Center.wav
> Wiedergabe: WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit
> Little Endian, Rate: 48000 Hz, mono
>
> pulseaudio spawns itself as it should:
>
> asterisk at puppy:~$ ps -A | grep pulse
> 23820 ? 00:00:00 pulseaudio
>
>
> this works as defined in /etc/asound.conf:
>
> asterisk at puppy:~$ cat /etc/asound.conf
> pcm.pulse {
> type pulse
> }
>
> ctl.pulse {
> type pulse
> }
>
> pcm.!default {
> type pulse
> }
>
> ctl.!default {
> type pulse
> }
I haven't used pulseaudio myself, nor the ALSA plugin to
redirect audio through it. I infer that by default
you're routing ALSA connections through the pulseaudio
plugin/connector, and that the pulseaudio daemon has been
configured to send its output to a different ALSA device
(e.g. to hw: or plughw:)?
Best I can suggest, at this point, is that you check
to see whether you can turn on some sort of debugging
in the pulseaudio daemon, to see what sort of connections
it's receiving from clients, and what it's doing with them.
It's possible that there's some sort of access-permission
problem in pulseaudio and it's refusing to allow connections
from asterisk for some reason.
>
> i've acticated the alsa plugin for asterisk:
>
> puppy:/etc/asterisk# grep -E 'alsa|oss' modules.conf
> load => chan_alsa.so
> noload => chan_oss.so
>
> puppy:/etc/asterisk# grep default alsa.conf
> input_device=default
> output_device=default
Might try setting these to "pulse" rather than
"default", perhaps?
> i'm running pulseaudio on top of alsa. through setting /etc/asound.conf as
> above any calls to alsa should be redirected to pulseaudio (at least that's
> what i thought).
> Asterisk Ready.
> *CLI> console dial s
> *CLI> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read
> error: Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [Dec 14 02:12:36] ERROR[24945]: chan_alsa.c:456 alsa_read: Read error:
> Input/output error
> [repeated indefinitely until killed]
Hmmm. Since these are occurring when reading a channel, it indicates
that it's the attempt to read audio from pulseaudio which isn't
working. Have you confirmed that pulseaudio is in fact working
correctly in both directions (using e.g. both aplay and arecord)?
More information about the asterisk-users
mailing list