celliax and slmodemd

Ciao,
i finally got chan_celliax compiled correctly for my asterisk 1.4.4..
But things can't always go well..
When i load the chan_celliax module into asterisk i got the following error:

== Registered channel type 'Celliax' (Celliax, Audio-Serial Driver)
== Parsing '/etc/asterisk/celliax.conf': Found
[May 16 00:12:28] NOTICE[17655]: chan_celliax.c:2168 mkif: [b6a19bb0][NOTICE 2168 ][nicephone ][-1, 0, 0, 0] at_dial_post_number=|S"|
[May 16 00:12:28] ERROR[17655]: chan_celliax.c:3097 alsa_open_dev: [b6a19bb0][ERROR 3097 ][nicephone ][-1, 0, 0, 0] snd_pcm_open failed with error 'Permission denied', maybe you are using an ALSA voicemodem and slmodemd is running?
[May 16 00:12:28] ERROR[17655]: chan_celliax.c:2989 alsa_init: [b6a19bb0][ERROR 2989 ][nicephone ][-1, 0, 0, 0] Failed opening ALSA capture device: plughw:0
[May 16 00:12:28] ERROR[17655]: chan_celliax.c:2351 mkif: [b6a19bb0][ERROR 2351 ][nicephone ][-1, 0, 0, 0] Failed initializing sound device
[May 16 00:12:28] ERROR[17655]: chan_celliax.c:1820 load_module: [b6a19bb0][ERROR 1820 ][none ][-1,-1,-1,-1] Unable to create channel Celliax from celliax.conf category '[nicephone]'
== Unregistered channel type 'Celliax'

Effectively, i got slmodemd running, but even stopping it and unloading modem's driver didn't resolve. My sound card is correctly detected by the system, alsamixer works fine showing volume levels, and some sound is played when trying to "cat somefile > /dev/dsp".

Is there a way to solve this issue?

Ciao,
Michele

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

definitely. In this case it

definitely.

In this case it has nothing to do with slmodemd ;-).

Is probably that your soundcard is used by another program (esd or some other sound server demon).

Just edit the /etc/asterisk/celliax.conf file to use default:0 instead of plughw:0 (both for capture and playback, the config file is commented to explain this)

default gives little slower performance (but is almost negligible) but had the added benefit to allow sharing the sound device between different programs concurrently.

that message is now fixed, thank'you for pointing it out!

the fact that you got

the fact that you got slmodemd running has nothing to do with the error, but brings a nice news for you: you got a kind of modem that will probably work as alsa voicemodem.
So, you will soon (as soon as the code is back in the new version) be able to use your voicemodem with chan_celliax (for eg. to use the voicemodem for PSTN, reserving the cellular for GSM).

When you'll use the voicemodem for celliax, that message will be pertinent (you will have to shutup slmodemd) ;-)

BTW, added another couple of

BTW, added another couple of files, re-read the new README ;-)

changes are:

copy from the celliax_stuff directory the files chan_celliax.c celliax_spandsp.c celliax_spandsp.h celliax_libcsv.h celliax_libcsv.c to the channels/ directory of the asterisk source

insert the line (all in one line, without breaks):

$(if $(filter chan_celliax,$(EMBEDDED_MODS)),modules.link,chan_celliax.so): celliax_spandsp.o celliax_libcsv.o

in the file channels/Makefile into the asterisk source directory, just before the chan_alsa line

I tried to put default:0 as

I tried to put default:0 as input and output sound device, but this didn't solve.
The error returned is always the same: Permission Denied. Please note that /dev/dsp got world-writable permissions (0777) so this couldn't be the problem. Does chan_alsa.so need to be loaded?

Ciao,
Michele

not at all, chan_alsa has

not at all, chan_alsa has *not* to be loaded, neither chan_oss.

Seems you got a permission problem with the alsa device.

Maybe the user asterisk is running as cannot use the alsa device.

Trying to fix this can be tricky... because often those permissions are setup at any reboot.

Just to test, you can made world readable and writable the /dev/snd/* directory and all its contents before executing asterisk...

/dev/dsp is the OSS device, is not used by ALSA

maybe your module.conf loads

maybe your module.conf loads the chan_oss and/or the chan_alsa. If it loads the chan_oss this *for sure* makes the sound device unavailable to other programs...

You have to load *only one*

You have to load *only one* of chan_oss, chan_alsa or chan_celliax ;-)

Tried to do it too. Files in

Tried to do it too. Files in /dev/snd got all ugo+rwx permissions but neither this solves :\
There's nothing which could be using the sound device at all, as the machine running asterisk haven't either got Xorg! Sound support is built-in in the kernel... Got any other test to do?

all chan_alsa and chan_oss

all chan_alsa and chan_oss are set to noload in modules.conf

try aplay -l and arecord -l

try aplay -l and arecord -l to see if they gives you the device...

Oooops, got an idea, maybe wrong: maybe your soundcard is listed as default:1 (default:0 being the voicemodem)

what if you try alsamixer -V all -c 1?
what if you try alsamixer -V all -c 0?

what linux distro are you

what linux distro are you using?

Output of aplay

Output of aplay -l:
--------------------
**** List of PLAYBACK Hardware Devices ****
card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235]
Subdevices: 1/1
Subdevice #0: subdevice #0

Output of arecord -l:
----------------------
**** List of CAPTURE Hardware Devices ****
card 0: V8235 [VIA 8235], device 0: VIA 8235 [VIA 8235]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: V8235 [VIA 8235], device 1: VIA 8235 [VIA 8235]
Subdevices: 1/1
Subdevice #0: subdevice #0

alsamixer -V all -c 0: shows alsamixer volume meters.
alsamixer -V all -c 1: alsamixer: function snd_ctl_open failed for hw:1: No such device

I'm using a Linux Debian 3.1

I'm using a Linux Debian 3.1

have you compiled asterisk

have you compiled asterisk from the asterisk.org tgz or installed a debian package?
maybe in the case of debian package asterisk switches to an "asterisk" user that has no right to use the sound device, notwithstanding the sound device is ugo+rwx...

I got a similar problem in the past, can't remember how I fixed it :(

was something similar to the

was something similar to the fact that a non-logged in user can't access the device... and the "asterisk" user is not logged in...

try to run asterisk as root,

try to run asterisk as root, just to test, maybe you have to modify some config file for this...

Asterisk was compiled from

Asterisk was compiled from the latest sources available from digium website.
After some tests i noted that no sound is outputted from the sound card...
only the oss device (/dev/dsp) outputs sound.. it's a strange behaviour...
Maybe there's something wrong with the kernel itself.. I'll have a check then i'll come back..

Michele

maybe your kernel does not

maybe your kernel does not load the alsa modules but only the oss modules?

Why my card got 2

Why my card got 2 subdevices?? (referring to the output of aplay/arecord)

I found these setting in the kernel config, under:
Device Drivers -> Sound -> ALSA -> PCI Devices

<*> VIA 82C686A/B, 8233/8235 AC97 Controller
<*> VIA 82C686A/B, 8233 based Modems

I tried to remove the second one and now i'm recompiling the kernel.
What's that such "8233 based modem" ???

it's the device driver for a

it's the device driver for a kind of modem, I do not think this is the cause of the problems...

try to google around for your problem with your alsa soundcard not working in debian, maybe others had solved it.

what is the output of lsmod | grep snd ?

and the output of lspci?

and the output of lspci?

I found this one, maybe is

I found this one, maybe is pertinent ( http://www.andreas-janssen.de/debian-tipps-sarge.html ):

II. ALSA does not work because hotplug loads OSS first, then ALSA

Until some time ago, hotplug loaded the OSS drivers first, then ALSA. Because of that ALSA could not access the sound card because OSS was blocking it. Recent versions of the alsa-base package (1.0.4-2 or newer) solve the problem by telling hotplug not to load OSS at all.

III. ALSA does not work because discover1 loads the OSS drivers before hotplug can load ALSA

The Debian Sarge base system includes discover1, a system for hardware autodetection. In automatically load the OSS drivers. This is good for users of kernel 2.4 without ALSA, but for users of kernel 2.6 it prevents sound from working. The problem is solved in alsa-base 1.0.6a-4 or newer. It tells discover1 not to load the OSS drivers. This will however only work if discover1 1.7.2 or newer is installed.

Here it goes...

Here it goes... (lspci)

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host Bridge
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
0000:00:08.0 Modem: ALi Corporation SmartLink SmartPCI563 56K Modem
0000:00:09.0 PCI bridge: Intel Corporation 21152 PCI-to-PCI Bridge
0000:00:0a.0 Network controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
0000:00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
0000:00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
0000:01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8378 [S3 UniChrome] Integrated Video (rev 01)
0000:02:04.0 Ethernet controller: D-Link System Inc DL10050 Sundance Ethernet (rev 14)
0000:02:05.0 Ethernet controller: D-Link System Inc DL10050 Sundance Ethernet (rev 14)
0000:02:06.0 Ethernet controller: D-Link System Inc DL10050 Sundance Ethernet (rev 14)
0000:02:07.0 Ethernet controller: D-Link System Inc DL10050 Sundance Ethernet (rev 14)

sound is built-in in the

sound is built-in in the kernel.. as i mentioned before.. so there are no modules loaded.

probably the modules built

probably the modules built in are not the right ones... build the sound things as modules, build all of them and let the config machinery choose the right ones (or do a lot of modprobe rmmod until you find the right one).
Also, be sure not to load the "native oss", but the oss emulation by alsa (snd-pcm-oss or something similar)

Let me know how is going

I'm checking it... discover1

I'm checking it...
discover1 seems not to be installed.
alsa version seems to be 1.0.8 (referring to alsactl -v)
hotplug *should* not grab my sound card as it's builtin in the kernel..
and OSS is deselected from "make menuconfig". Only alsa is enabled.

Michele

probably the modules built

probably the modules built in are not the right ones... build the sound things as modules, build all of them and let the config machinery choose the right ones (or do a lot of modprobe rmmod until you find the right one).
Also, be sure not to load the "native oss", but the oss emulation by alsa (snd-pcm-oss or something similar)

Let me know how is going

Got the sound working with a

Got the sound working with a new kernel compilation (2.6.20).
Sound works with aplay and mpg123, even executing them with the asterisk user, but asterisk still doesn't like alsa too much...
It seems that's not able open the alsa device, as neither chan_alsa works giving the same "permission denied" error.

What device files are being used by alsa?
(i chmodded 777, /dev/audio*, /dev/snd/*, and /dev/dsp)

UPDATE:
chan_alsa and chan_celliax work executing asterisk as root!

Michele

Good to have the sound

Good to have the sound working!!!! It's 90% of the problem solved.

Maybe if asterisk works as root but not as "asterisk user", but the sound works if you use it as "asterisk user", is the "non logged in user" problem... but it seems to me that this problem I got on a centOS (redhat) system, not on a Debian

I think the /dev/snd/* are

I think the /dev/snd/* are the used devices, be sure to chmod -R all of them (there are directory in there, I think)

it's all chmodded 777 in

it's all chmodded 777 in /dev/snd and the user asterisk is in the group audio too... :(
I would like not to keep asterisk running as root... it's not so smart.. ;)

definitely! I got exactly

definitely!
I got exactly the same problem (IIRC on a centOS) and I'm damned but I can't remember how was solved... :(

if you luckily remember how

if you luckily remember how did you did it... pls don't forget to let me know.
I can finally start testing celliax anyway...

Grazie
Michele

found this:

found this: http://www.voip-info.org/wiki/index.php?page=Asterisk+non-root

If using chan_alsa:
chown --recursive asterisk /dev/snd

And now it seems to me that I was doing something similar, added to the script that start trixbox on centos

Unfortunately i found the

Unfortunately i found the problem... it was really stupid..
file permissions were ok.... but directory permission didn't !!
/dev/snd was owned by root:audio with permissions r-xr-x--- and wasn't accessible from the non-logged asterisk user.

Michele

happens ;-) so, can you

happens ;-)
so, can you write down a very short summary of how you get all working in asterisk 1.4.4 debian 3.1?
Maybe this would be useful for future users

How to install Celliax in

How to install Celliax in Trixbox 2.2: http://www.celliax.org/node/313

Unable to create channel of type 'celliax'

Please, remember how you resolved this problem. I've been installed asterisk 1.4.7.1 and celliax, so I am having the same problem in kurumin 7 debian.


sound device permissions

you have to:
chmod a+rwx /dev/snd*


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.