I've installed chan_celliax on an Asterisk 1.4.26.2 with a Mobigater Pro.
Every time I make/receive a call, Asterisk crashes.
Particularly, when I make a call, Asterisk crashes soon after sending the ATD command to the Mobigater, in fact the called phone keeps ringing. I've already used the same Mobigater on a different hardware and it has worked fine. The main difference between the two installations seems to be that on the actual machine there is no hardware sound device. Anyway, the Mobigater seems to be correctly recognized, in fact the command "lsmod | grep snd" gives the following output:
nd_pcm_oss 64384 0
snd_mixer_oss 33408 1 snd_pcm_oss
snd_seq 73664 0
snd_usb_audio 100992 0
snd_pcm 100228 2 snd_pcm_oss,snd_usb_audio
snd_timer 40712 2 snd_seq,snd_pcm
snd_page_alloc 27400 1 snd_pcm
snd_usb_lib 34432 1 snd_usb_audio
snd_rawmidi 42624 1 snd_usb_lib
snd_seq_device 25100 2 snd_seq,snd_rawmidi
snd_hwdep 26372 1 snd_usb_audio
snd 79544 10 snd_pcm_oss,snd_mixer_oss,snd_seq,snd_usb_audio,snd_pcm,snd_timer,snd_usb_lib,snd_rawmidi,snd_seq_device,snd_hwdep
soundcore 24264 1 snd
usbcore 164940 8 snd_usb_audio,snd_usb_lib,cdc_acm,pl2303,usbserial,usbhid,uhci_hcd
and the command " aplay -l" gives the following output:
**** List of PLAYBACK Hardware Devices ****
card 1: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
If I enable debugging on chan_celliax I see that the last instruction executed (better, the last instruction debugged) is:
[...data...] DEBUG[....] chan_celliax.c: rev [0x81d7010|b6f65b90]DEBUG_SOUND 912 ][line0 ][ 3, 3, 3] DTMF recognition inited
-- Called line0/....numero chiamato.....
-- Celliax/line0 is ringing
I've taken a look to the code in chan_celliax.c but, soono after the line n. 912 (the one specified in the debug output that contains the debug message) I've not understand the program flow because it depends greatly from the definition of CELLIAX_PORTAUDIO and I've not understand if it's defined or not.
Any help would be gratly appreciated.
Tiziano Martelli
crash on Asterisk
Hi Tiziano,
if the only difference is that in one case there is sound hardware and in the other not, then you probably are using a configuration file that point to a non existant sound device.
You probably have to edit the configuration file, celliax.conf, and put:
plughw:0
where now there is plughw:1 or similar.
asterisk crash
Hi Giovanni, I've written about this problem directly to you too. I've already tried that solution but it has not solved the issue. Effectively, as I've already explained, the "aplay -l" command gives:
**** List of PLAYBACK Hardware Devices ****
card 1: default [C-Media USB Headphone Set ], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
as output so I supposed that the right index is 1. Anyway, when I've tried plughw:0 in the celliax.conf, asterisk don't crashes but the chan_celliax output said something about not founding the device and the call don't start: don't forget that, when using plughw:1 in the celliax.conf file, the call starts, so I think that this too means that the value 1 is correct. What also could I try? Thanks in advance
Tiziano
asterisk crash 2
Hi Tiziano,
now I've read your mail, but I prefer to reply here so maybe can be useful to others.
Can you post, here or in some pastebin, the full debug log of a "crashing" call, since the loading of celliax? (not only the last lines)
Are you using the svn version of celliax? (find it in the download section of this site)
What operating system/version/kernel/alsa are you using?
You can read this page on how to bring here the most information:
http://www.gsmopen.org/howtobug
-giovanni
asterisk crash 3
Hi, Giovanni. The server where I got the problem is a production one, so, because it crashes at every test, I've to do test outside work time. Anyway:
- Yes, I'm using the svn version of celliax (revision 16833)
- Asterisk is 1.4.26.2. running on a openSuSE 11.0, kernel 2.6.25.20-0.5 pae and alsa 1.0.16
Following you'll find 37 lines of the log, cleaned from the DEBUG_LOCKS and DEBUG_MONITOR. The full log (from the loading of the chan_celliax module to the call that crashed it) is 3627 line long, how can I send it?
Thanks
Tiziano
[Feb 25 19:17:34] VERBOSE[9162] logger.c: == Registered application 'CelliaxSendsms'
[Feb 25 19:17:34] WARNING[9162] manager.c: Manager: Action 'CELLIAXsendsms' already registered
[Feb 25 19:17:34] VERBOSE[9162] logger.c: == Registered channel type 'Celliax' (Celliax, Audio-Serial Driver)
[Feb 25 19:17:34] VERBOSE[9162] logger.c: == Parsing '/etc/asterisk/celliax.conf': [Feb 25 19:17:34] VERBOSE[9162] logger.c: Found
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1759 ][line0 ][-1, 0, 0] DEBUG_ALL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_ALL debugging output.
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1769 ][line0 ][-1, 0, 0] DEBUG_AT activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_AT debugging output.
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1791 ][line0 ][-1, 0, 0] DEBUG_SERIAL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_SERIAL debugging output.
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1802 ][line0 ][-1, 0, 0] DEBUG_SOUND activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_SOUND debugging output.
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1813 ][line0 ][-1, 0, 0] DEBUG_PBX activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_PBX debugging output.
[Feb 25 19:17:34] WARNING[9162] chan_celliax.c: rev [(nil)|b6f24b90][WARNING 1824 ][line0 ][-1, 0, 0] DEBUG_CALL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command "set debug 10" or start Asterisk with "-dddddddddd" option for full DEBUG_CALL debugging output.
[Feb 25 19:17:34] DEBUG[9162] chan_celliax.c: rev [(nil)|b6f24b90][DEBUG_SERIAL 2686 ][line0 ][-1, 0, 0] Syncing Serial
[Feb 25 19:17:34] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2637 ][line0 ][-1, 0, 0] sleeping for 500000 usec
[Feb 25 19:17:35] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2648 ][line0 ][-1, 0, 0] atciapa does not get OK from the phone. Continuing.
[Feb 25 19:17:35] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2699 ][line0 ][-1, 0, 0] sleeping for 500000 usec
[Feb 25 19:17:35] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2713 ][line0 ][-1, 0, 0] AT+mode=0 does not get OK from the phone. If it is NOT Motorola, no problem.
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2832 ][line0 ][-1, 0, 0] AT+CMER=? failed, continue
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2837 ][line0 ][-1, 0, 0] AT+CMER=? failed, continue
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2850 ][line0 ][-1, 0, 0] AT*ECAM=? failed, continue
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2855 ][line0 ][-1, 0, 0] AT*ECAM=1 failed, continue
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2864 ][line0 ][-1, 0, 0] AT+CLCC=0 failed, continue
[Feb 25 19:17:37] DEBUG[9162] celliax_additional.c: rev [(nil)|b6f24b90][DEBUG_AT 2881 ][line0 ][-1, 0, 0] AT+MCST=1 does not get OK from the phone. If it is NOT Motorola, no problem.
[Feb 25 19:17:37] NOTICE[9162] chan_celliax.c: rev [(nil)|b6f24b90][NOTICE 1348 ][none ][-1,-1,-1] Created channel Celliax: celliax.conf category '[line0]', channel name 'line0' control_device_name '/dev/ttyACM0'
[Feb 25 19:17:37] VERBOSE[9162] logger.c: Loaded chan_celliax => (Celliax, Audio-Serial Driver)
[Feb 25 19:18:58] VERBOSE[9171] logger.c: == CDR updated on SIP/...-081d7ad8
[Feb 25 19:18:58] VERBOSE[9171] logger.c: -- Executing [3356564601@interni:1] Dial("SIP/...-081d7ad8", "CELLIAX/line0/3356564601") in new stack
[Feb 25 19:18:58] DEBUG[9171] chan_celliax.c: rev [(nil)|b6e4fb90][DEBUG_PBX 576 ][none ][-1,-1,-1] Try to request type: CELLIAX, name: line0/3356564601, cause: 0, format: 64
[Feb 25 19:18:58] DEBUG[9171] chan_celliax.c: rev [(nil)|b6e4fb90][DEBUG_PBX 601 ][line0 ][-1, 0, 0] Requesting: CELLIAX, name: line0/3356564601, format: 64
[Feb 25 19:18:58] DEBUG[9171] celliax_additional.c: rev [(nil)|b6e4fb90][DEBUG_SOUND 402 ][line0 ][-1, 0, 0] Acquired fd 21 from the poll descriptor
[Feb 25 19:18:58] DEBUG[9171] celliax_additional.c: rev [(nil)|b6e4fb90][DEBUG_SOUND 425 ][line0 ][-1, 0, 0] started!
[Feb 25 19:18:58] DEBUG[9171] celliax_additional.c: rev [(nil)|b6e4fb90][DEBUG_SOUND 402 ][line0 ][-1, 0, 0] Acquired fd 22 from the poll descriptor
[Feb 25 19:18:58] DEBUG[9171] chan_celliax.c: rev [(nil)|b6e4fb90][DEBUG_PBX 1180 ][line0 ][-1, 0, 0] new channel: name=Celliax/line0 requested_state=0
[Feb 25 19:18:58] DEBUG[9171] chan_celliax.c: rev [0x81d6e20|b6e4fb90][DEBUG_SERIAL 1264 ][line0 ][ 0, 0, 0] STARTED controldev_thread=3073805200 STOP=4294967294 NULL=4294967295
[Feb 25 19:18:58] DEBUG[9174] chan_celliax.c: rev [0x81d6e20|b7368b90][DEBUG_SERIAL 2536 ][line0 ][ 0, 0, 0] In celliax_do_controldev_thread: started, p=0xb6e50008
[Feb 25 19:18:58] DEBUG[9105] chan_celliax.c: rev [0x81d6e20|b7d70b90][DEBUG_PBX 507 ][line0 ][ 3, 0, 0] Interface is OWNED by a channel
[Feb 25 19:18:58] VERBOSE[9171] logger.c: -- Called line0/3356564601
[Feb 25 19:18:58] VERBOSE[9171] logger.c: -- Celliax/line0 is ringing
[Feb 25 19:18:58] DEBUG[9171] chan_celliax.c: rev [0x81d6e20|b6e4fb90][DEBUG_SOUND 912 ][line0 ][ 3, 3, 3] DTMF recognition inited
asterisk crash 4
pastebin the log somewhere, or send it to me by mail.
You can pastebin it here:
http://pastebin:freeswitch@pastebin.freeswitch.org/
login: pastebin
password: freeswitch
then post here the resulting url, so I can see it
asterisk crash 5
the machine were you do the successful tests, has the same OS like the production machine?
Never used and never had reports of use celliax with Suse, tough...
But I don't think that's the problem....
Is generating a core when it crashes?
asterisk crash 6
Sorry Giovanni, I've tried to "cut" full logs and "paste" them on the link you suggested me but I've not been able to see nothing on destination window (I'm a "command-line" man, I work with text from over then 30 years and probably I don't use the right graphics tool), so I've decided to sent logs by e-mail at your address.
Regarding both openSuSE and its version, the answer is yes, we have plenty of asterisk installation on openSuSE from years and it's working fine. The Mobigater that's generating the problem, during the tests, was connected to a different hardware, but with the same operating system.
And no, there are no core dumped: as I already told you, asterisk exits with the two standard messages that it print whenever you give the cli command "stop now":
Disconnected from Asterisk server
Executing last minute cleanups
Ciao. Tiziano
asterisk crash 7
If on another machine with same hardware, same os, same software, same mobigater, it works then on the production machine is an hardware problem, maybe something to do with bios or usb internal hubs, or whatever...
If asterisk is exiting cleanly (not crashing), so maybe there is a signal sent to it, or something similar....
Do you have something in /var/log/messages, or wherever) that tell something about alsa or usb problems?
-giovanni
asterisk crash 8
Giovanni, I only said that the asterisk cli console messages are like the ones of a clean exit. In the message log, for every crash, there is a line like the following:
Feb 25 19:18:58 qcall kernel: asterisk[9171]: segfault at b7429e50 ip b7429e50 sp b6e496cc error 14 in chan_celliax.so[b742e000+76000]
or, sometime, a more generic:
Feb 25 19:05:10 qcall kernel: asterisk[9095]: segfault at 186 ip b73ea0dc sp b74226cc error 4
anyway, no messages at all about alsa or usb.
Another question: I would like to investigate the problem too, but I've not understand how to know if CELLIAX_PORTAUDIO is defined. What I would like to discover is where the program goes after the line 912 in chan_celliax.c. Could this be useful?
Ciao. Tiziano
asterisk crash 9
Ah, got it.
no, celliax_portaudio is not defined (you could easily see that with a #ifdeffed printf ;), or just grep the code and you'll see there is no PORTAUDIO #defined )
Put a lot of debugging output around, where you think there is the problem.
Maybe it crashes at line 958, that calls line 2480, that calls the real read audio dunction, alsa_read at line 444 in celliax_additional.c
Good luck with it, but I would first repeat the tests on another (non-production) machine, with same config etc.
If you have it working in past on a machine with same hardware/software/os/mobigater... maybe is a problem related to the production machine. But maybe no.
Let me know how it goes.
-giovanni