[asterisk-users] Asterisk throws error using the alsa module
vitaminx
vitaminx at callistix.net
Sun Dec 13 19:18:43 CST 2009
On Tue, 08 Dec 2009 10:42:58 -0800, Dave Platt <dplatt at radagast.org>
wrote:
>> [Dec 8 18:24:48] ERROR[10571]: chan_alsa.c:693 alsa_read: Read error:
> Resource temporarily unavailable
>
> I agree, this looks like some form of conflict for the sound device.
>
i've got so far that i can use pulseaudio normally as asterisk user, but
still not with the asterisk application itself (see below).
asterisk at puppy:~$ grep asterisk /etc/group
dialout:x:20:asterisk
audio:x:29:pulse,mpd,vitaminx,asterisk
pulse:x:111:mpd,asterisk
pulse-access:x:112:mpd,asterisk
asterisk:x:114:
> The first thing I'd suggest doing, is trying to reproduce the
> error with a command-line tool, with asterisk out of the loop
> entirely. You'd use a command such as
>
> aplay -D default /path/to/demo-congrats.wav
>
> 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'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
>
> A "resource temporarily unavailable" error from ALSA would tend
> to suggest one of two sorts of conflicts:
>
> [1] A low-level (e.g. IRQ) conflict for the sound device itself.
> This could occur as a result of motherboard misconfiguration...
> for example, if the sound card/chip was configured to use
> IRQ 2 or 3, and there was also a serial port in use which
> made use of this interrupt. Check (e.g.) /proc/interrupts
> to see if you can find such a conflict.
>
> [2] A higher-level conflict for use of the sound card, e.g.
> between two different (and incompatible) ALSA accesses,
> or between a "native" ALSA access and a user of ALSA's
> OSS driver- or library-level API emulation.
>
> One not-uncommon culprit is having an X Window desktop up and
> running. Some of the newer desktop packages have their own
> sound-management architecture (e.g. ESD, the Enlightenment
> Sound Daemon, or the JACK audio toolkit, or PulseAudio).
> These management systems often open the underlying sound
> device (in a non-shared mode) and then provide their own APIs
> for arbitrating access, mixing multiple outputs together, etc.,
> and a separate "native" ALSA access from Asterisk will often
> be unable to share access to the card.
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).
here are some of the relevant packages i have installed:
puppy:/etc/asterisk# dpkg -l | grep -iE 'alsa|asterisk|pulse'
ii alsa-base 1.0.21+dfsg-2 ALSA driver
configuration files
ii alsa-utils 1.0.21-1 ALSA
utilities
ii asterisk 1:1.6.2.0~rc7-1 Open Source
Private Branch Exchange (PBX)
ii asterisk-config 1:1.6.2.0~rc7-1
Configuration files for Asterisk
ii asterisk-sounds-main 1:1.6.2.0~rc7-1 Core Sound
files for Asterisk (English)
ii libasound2 1.0.21a-1 shared
library for ALSA applications
ii libasound2-plugins 1.0.21-3 ALSA library
additional plugins
ii libpulse-browse0 0.9.21-1 PulseAudio
client libraries (zeroconf support)
ii libpulse0 0.9.21-1 PulseAudio
client libraries
ii libsdl1.2debian-pulseaudio 1.2.13-5 Simple
DirectMedia Layer (with X11 and PulseAudio options)
ii linux-sound-base 1.0.21+dfsg-2 base package
for ALSA and OSS sound systems
ii pulseaudio 0.9.21-1 PulseAudio
sound server
ii pulseaudio-module-zeroconf 0.9.21-1 Zeroconf
module for PulseAudio sound server
ii pulseaudio-utils 0.9.21-1 Command line
tools for the PulseAudio sound server
That's what happens when I try to do a test call with asterisk:
asterisk at puppy:~$ /usr/sbin/asterisk -c
Asterisk 1.6.2.0~rc7-1, Copyright (C) 1999 - 2009 Digium, Inc. and others.
Created by Mark Spencer <markster at digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for
details.
This is free software, with components licensed under the GNU General
Public
License version 2 and other licenses; you are welcome to redistribute it
under
certain conditions. Type 'core show license' for details.
=========================================================================
[ Booting...
[ Reading Master Configuration ]
[ Initializing Custom Configuration Options ]
[Dec 14 02:12:31] NOTICE[24895]: cdr.c:1473 do_reload: CDR simple logging
enabled.
[Dec 14 02:12:31] NOTICE[24895]: loader.c:1050 load_modules: 195 modules
will be loaded.
.[Dec 14 02:12:31] NOTICE[24895]: res_odbc.c:1694 load_module: res_odbc
loaded.
.[Dec 14 02:12:31] NOTICE[24895]: config.c:1968
ast_config_engine_register: Registered Config Engine sqlite
...[Dec 14 02:12:31] WARNING[24895]: res_config_ldap.c:1591 parse_config:
No directory user found, anonymous binding as default.
[Dec 14 02:12:31] ERROR[24895]: res_config_ldap.c:1616 parse_config: No
directory URL or host found.
[Dec 14 02:12:31] NOTICE[24895]: res_config_ldap.c:1510 load_module:
Cannot load LDAP RealTime driver.
.....[Dec 14 02:12:31] NOTICE[24895]: res_smdi.c:1361 load_module: No SMDI
interfaces are available to listen on, not starting SMDI listener.
......................SIP channel loading...
.....[Dec 14 02:12:31] NOTICE[24895]: chan_skinny.c:7062 config_load:
Configuring skinny from skinny.conf
..................................................[Dec 14 02:12:31]
WARNING[24895]: utils.c:1534 __ast_string_field_init: trying to reset empty
pool
[Dec 14 02:12:31] WARNING[24895]: utils.c:1534 __ast_string_field_init:
trying to reset empty pool
[Dec 14 02:12:31] WARNING[24895]: utils.c:1534 __ast_string_field_init:
trying to reset empty pool
......[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:122 pbx_load_module:
Starting AEL load process.
[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:135 pbx_load_module: AEL load
process: parsed config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:138 pbx_load_module: AEL load
process: checked config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:141 pbx_load_module: AEL load
process: compiled config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:146 pbx_load_module: AEL load
process: merged config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895]: pbx_ael.c:149 pbx_load_module: AEL load
process: verified config file name '/etc/asterisk/extensions.ael'.
.............. == Aliased CLI command 'hangup request' to 'channel
request hangup'
== Aliased CLI command 'originate' to 'channel originate'
== Aliased CLI command 'help' to 'core show help'
== Aliased CLI command 'pri intense debug span' to 'pri set debug 2
span'
== Aliased CLI command 'reload' to 'module reload'
.........[Dec 14 02:12:31] ERROR[24895]: chan_vpb.cc:2706
ast_module_load_result load_module(): No Voicetronix cards detected
........[Dec 14 02:12:31] ERROR[24895]: ais/clm.c:141
ast_ais_clm_load_module: Could not initialize cluster membership service:
Try Again
...............[Dec 14 02:12:31] ERROR[24895]: codec_dahdi.c:620
find_transcoders: Failed to open /dev/dahdi/transcode: No such file or
directory
.....[Dec 14 02:12:31] NOTICE[24895]: config.c:1968
ast_config_engine_register: Registered Config Engine curl
..........[Dec 14 02:12:31] WARNING[24895]: chan_dahdi.c:17023
process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
[Dec 14 02:12:31] WARNING[24895]: chan_dahdi.c:17023 process_dahdi:
Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Dec 14 02:12:31] WARNING[24895]: chan_dahdi.c:17023 process_dahdi:
Ignoring any changes to 'hassip' (on reload) at line 35.
[Dec 14 02:12:31] WARNING[24895]: chan_dahdi.c:17023 process_dahdi:
Ignoring any changes to 'hasiax' (on reload) at line 39.
[Dec 14 02:12:31] WARNING[24895]: chan_dahdi.c:17023 process_dahdi:
Ignoring any changes to 'hasmanager' (on reload) at line 47.
.....................[Dec 14 02:12:31] WARNING[24895]: translate.c:654
__ast_register_translator: plc_samples 160 format f
......*CLI> ......[Dec 14 02:12:31] WARNING[24895]: res_musiconhold.c:1667
load_module: No music on hold classes configured, disabling music on hold.
... ]
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]
logs:
asterisk at puppy:~$ grep -v "temporarily" /var/log/asterisk/messages | grep
-v "output error" | tail -29
[Dec 14 02:12:31] NOTICE[24895] cdr.c: CDR simple logging enabled.
[Dec 14 02:12:31] NOTICE[24895] loader.c: 195 modules will be loaded.
[Dec 14 02:12:31] NOTICE[24895] res_odbc.c: res_odbc loaded.
[Dec 14 02:12:31] NOTICE[24895] config.c: Registered Config Engine sqlite
[Dec 14 02:12:31] WARNING[24895] res_config_ldap.c: No directory user
found, anonymous binding as default.
[Dec 14 02:12:31] ERROR[24895] res_config_ldap.c: No directory URL or host
found.
[Dec 14 02:12:31] NOTICE[24895] res_config_ldap.c: Cannot load LDAP
RealTime driver.
[Dec 14 02:12:31] NOTICE[24895] res_smdi.c: No SMDI interfaces are
available to listen on, not starting SMDI listener.
[Dec 14 02:12:31] NOTICE[24895] chan_skinny.c: Configuring skinny from
skinny.conf
[Dec 14 02:12:31] WARNING[24895] utils.c: trying to reset empty pool
[Dec 14 02:12:31] WARNING[24895] utils.c: trying to reset empty pool
[Dec 14 02:12:31] WARNING[24895] utils.c: trying to reset empty pool
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: Starting AEL load process.
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: AEL load process: parsed config
file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: AEL load process: checked
config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: AEL load process: compiled
config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: AEL load process: merged config
file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] NOTICE[24895] pbx_ael.c: AEL load process: verified
config file name '/etc/asterisk/extensions.ael'.
[Dec 14 02:12:31] ERROR[24895] chan_vpb.cc: No Voicetronix cards detected
[Dec 14 02:12:31] ERROR[24895] ais/clm.c: Could not initialize cluster
membership service: Try Again
[Dec 14 02:12:31] ERROR[24895] codec_dahdi.c: Failed to open
/dev/dahdi/transcode: No such file or directory
[Dec 14 02:12:31] NOTICE[24895] config.c: Registered Config Engine curl
[Dec 14 02:12:31] WARNING[24895] chan_dahdi.c: Ignoring any changes to
'userbase' (on reload) at line 23.
[Dec 14 02:12:31] WARNING[24895] chan_dahdi.c: Ignoring any changes to
'vmsecret' (on reload) at line 31.
[Dec 14 02:12:31] WARNING[24895] chan_dahdi.c: Ignoring any changes to
'hassip' (on reload) at line 35.
[Dec 14 02:12:31] WARNING[24895] chan_dahdi.c: Ignoring any changes to
'hasiax' (on reload) at line 39.
[Dec 14 02:12:31] WARNING[24895] chan_dahdi.c: Ignoring any changes to
'hasmanager' (on reload) at line 47.
[Dec 14 02:12:31] WARNING[24895] translate.c: plc_samples 160 format f
[Dec 14 02:12:31] WARNING[24895] res_musiconhold.c: No music on hold
classes configured, disabling music on hold.
[followed by the millions of input/output errors]
Thanks for any explanations,
vitaminx
--
irc ..... #callistix @ freenode
mail ..... vitaminx at callistix.net
www ..... http://www.callistix.net
icecast ..... http://icecast.callistix.net:8000/
More information about the asterisk-users
mailing list