Fresh install : voicemail makes asterisk crashing

Hi,

First, sorry for my english.

That’s not my first use of freepbx.
Now, on a new server (gentoo 64 bits), I install asterisk 1.6.1.0 (tried too with 1.6.1.1), freepbx, and when I enter in voicemail (dialing a not connected extension) to leave a message, asterisk stops just after begining to record.

-- Goto (macro-vm,s-CHANUNAVAIL,1) -- Executing [[email protected]:1] Macro("SIP/200-00b76bf8", "get-vmcontext,100") in new stack -- Executing [[email protected]:1] Set("SIP/200-00b76bf8", "VMCONTEXT=default") in new stack -- Executing [[email protected]:2] GotoIf("SIP/200-00b76bf8", "0?200:300") in new stack -- Goto (macro-get-vmcontext,s,300) -- Executing [[email protected]:300] NoOp("SIP/200-00b76bf8", "") in new stack -- Executing [[email protected]:2] VoiceMail("SIP/200-00b76bf8", "[email protected],u""") in new stack -- <SIP/200-00b76bf8> Playing 'vm-theperson.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'digits/1.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'digits/0.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'digits/0.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'vm-isunavail.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'vm-intro.gsm' (language 'en') -- <SIP/200-00b76bf8> Playing 'beep.gsm' (language 'en') serveur2*CLI> Disconnected from Asterisk server Executing last minute cleanups
I’ve tried to uninstall/reinstall several times.
what I do (correct me if necessary) :

  • uninstall asterisk, delete all /etc/asterisk, /var/lib/asterisk, /var/spool/asterisk, /var/www/{my_freepbx_root}
  • install asterisk with portage tool : emerge asterisk (~arched and unmasked)
  • download freepbx-2.5.1 and untar
  • cd freepbx-2.5.1/SQL && mysql -p < newinstall.sql
  • cd freepbx && install_amp (I don’t remove my amportal.conf)
  • connect to the web admin
  • NOT reload
  • administration modules :
    • upgrade FreePBX FRamework (never finish, have to reload the page)
    • upgrade all
    • NO new module
  • add a SIP extension : cid num 200, secret, and all the rest defaults
  • add a IAX2 extension : cid num 100, secret, voicemail enabled, voicemail password and email. Don’t change anything else.
  • go to my SIP softphone. Register with SIP extension, call the IAX2 extension (100)
  • asterisk crashes when starting recording :
# ll -Rla /var/spool/asterisk/voicemail/default/100/tmp/
/var/spool/asterisk/voicemail/default/100/tmp/:
total 8
drwxr----- 2 asterisk asterisk 4096 juil.  1 12:24 .
drwxr----- 4 asterisk asterisk 4096 juil.  1 02:56 ..
-rw-r--r-- 1 asterisk asterisk    0 juil.  1 12:24 KXD8j1

asterisk is running with asterisk user :

# ps axf | grep asterisk
14879 ?        SLsl   0:00 /usr/sbin/asterisk -U asterisk

All is onwed by asterisk :

12:28:35 [email protected] ~ # find /etc/asterisk/ /var/spool/asterisk/ /var/lib/asterisk/ /var/log/asterisk/ ! -user asterisk
12:29:21 [email protected] ~ #

Why am I almost sure that’s a problem with FreePBX ?
Because during all my tests, ONE time, I had it working, with all what is installed, and nothing more. But, I can’t tell exactly what I really did in FreePBX to make it working. Surely sometinhg in the order of the upgrade, or creating extensions just after one particular upgrade.
The pity is that I was so sure that I found the problem, and my installs were so dirty, that I removed all, and restarted a new from scratch install :frowning:

What I’d like ?
To have help to really find where is the problem in a from-scratch install.
I can test all what you want (except installing out of portage, so no asterisk 1.4.*)

Thanks in advance.

If I use FreePBX start script, I get :

    -- <SIP/200-022ca6f8> Playing 'vm-intro.gsm' (language 'en')
    -- <SIP/200-022ca6f8> Playing 'beep.gsm' (language 'en')
serveur2*CLI> /usr/sbin/safe_asterisk: line 146: 19778 Erreur de segmentation  (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.

Disconnected from Asterisk server
Executing last minute cleanups
Asterisk ending (0).
Automatically restarting Asterisk.

# ls -la /tmp/core.serveur2-2009-07-01T13\:20\:24-0400 -rw------- 1 asterisk asterisk 23158784 juil. 1 13:20 /tmp/core.serveur2-2009-07-01T13:20:24-0400
I can give the dump if you need (I don’t know what to do with).

that’s a real FreePBX bug.
All uninstalled.
Fresh asterisk 1.6.1.0 install with minimal conf :

14:39:28 [email protected] /etc/asterisk # cat sip.conf [1000] type=friend context=internal host=dynamic [1001] type=friend context=internal host=dynamic 14:39:30 [email protected] /etc/asterisk # cat extensions.conf [internal] exten => 1001,1,Verbose(1,Extension 1001) exten => 1001,n,Dial(SIP/1001,5) exten => 1001,n,GotoIf($["${DIALSTATUS}" = "BUSY"]?busy:unavail) exten => 1001,n(unavail),Voicemail([email protected],u) exten => 1001,n,Hangup() exten => 1001,n(busy),VoiceMail([email protected],b) exten => 1001,n,Hangup()

1000 dialing 1001 (not connected) :

== Using SIP RTP CoS mark 5 -- Executing [[email protected]:1] Verbose("SIP/1000-0209b648", "1,Extension 1001") in new stack Extension 1001 -- Executing [[email protected]:2] Dial("SIP/1000-0209b648", "SIP/1001,5") in new stack == Using SIP RTP CoS mark 5 [Jul 1 14:36:34] WARNING[7214]: app_dial.c:1518 dial_exec_full: Unable to create channel of type 'SIP' (cause 20 - Unknown) == Everyone is busy/congested at this time (1:0/0/1) -- Executing [[email protected]:3] GotoIf("SIP/1000-0209b648", "0?busy:unavail") in new stack -- Goto (internal,1001,4) -- Executing [[email protected]:4] VoiceMail("SIP/1000-0209b648", "[email protected],u") in new stack -- <SIP/1000-0209b648> Playing 'vm-theperson.gsm' (language 'en') [Jul 1 14:36:34] NOTICE[7214]: channel.c:2860 __ast_read: Dropping incompatible voice frame on SIP/1000-0209b648 of format ulaw since our native format has changed to 0x2 (gsm) -- <SIP/1000-0209b648> Playing 'digits/1.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'digits/0.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'digits/0.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'digits/1.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'vm-isunavail.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'vm-intro.gsm' (language 'en') -- <SIP/1000-0209b648> Playing 'beep.gsm' (language 'en') -- Recording the message -- x=0, open writing: /var/spool/asterisk/voicemail/default/1001/tmp/o0PYwS format: wav, 0x20a3078 [Jul 1 14:36:51] WARNING[7214]: app.c:724 __ast_play_and_record: No audio available on SIP/1000-0209b648?? -- User hung up == Spawn extension (internal, 1001, 4) exited non-zero on 'SIP/1000-0209b648'

[code]# ls -lRa /var/spool/asterisk/voicemail/default/1001/
/var/spool/asterisk/voicemail/default/1001/:
total 16
drwxr-xr-x 4 asterisk asterisk 4096 juil. 1 14:33 .
drwxrwx— 4 asterisk asterisk 4096 juil. 1 14:33 …
drwxr-xr-x 2 asterisk asterisk 4096 juil. 1 14:36 INBOX
drwxr-xr-x 2 asterisk asterisk 4096 juil. 1 14:36 tmp

/var/spool/asterisk/voicemail/default/1001/INBOX:
total 24
drwxr-xr-x 2 asterisk asterisk 4096 juil. 1 14:36 .
drwxr-xr-x 4 asterisk asterisk 4096 juil. 1 14:33 …
-rw-rw-rw- 1 asterisk asterisk 261 juil. 1 14:33 msg0000.txt
-rw-r–r-- 1 asterisk asterisk 1644 juil. 1 14:33 msg0000.wav
-rw-rw-rw- 1 asterisk asterisk 263 juil. 1 14:36 msg0001.txt
-rw-r–r-- 1 asterisk asterisk 1644 juil. 1 14:36 msg0001.wav

/var/spool/asterisk/voicemail/default/1001/tmp:
total 8
drwxr-xr-x 2 asterisk asterisk 4096 juil. 1 14:36 .
drwxr-xr-x 4 asterisk asterisk 4096 juil. 1 14:33 …[/code]

All is working fine, without freepbx installed.

That’s clearly a problem with FreePBX install/upgrade process.
I can help to find out if someone can spend time on it with me.

IMHO http://www.freepbx.org/trac/ticket/3742 should really be reopened.

Regarding:

serveur2*CLI> /usr/sbin/safe_asterisk: line 146: 19778 Erreur de segmentation  (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.

Have you checked to see why it is crashing? Did you check the Asterisk logs for any hints of errors. If FreePBX is providing bogus configuration information to make Asterisk core, that would be a bug in FreePBX, but is still very much a bug in Asterisk that needs to be understood. Asterisk should never core, it can shut down itself if it needs to from bogus info.

As far as getting help in general and in your comments in the ticket, you would be advised to not be quite so ‘assertive’ in your confidence as your tone is only going to result in people ignoring this and any thread associated with it. Countless people come by saying they are right, they know what they are doing, … only to almost always result in some issue on their side. It’s the best way to make everyone ignore your requests.

As far as the ticket being re-opened, as was indicated in the ticket, we can reopen a ticket as we have many times, when there is something that either points to a likely a bug in FreePBX, or some way that someone can independently reproduce the issue. Neither of those are present and given the thousands of active installs running with FreePBX, the current data seems to indicate that getting basic functionality up on 1.6 functions.

I don’t understand all what you write. I repeat, english is not my langage.
The only thing i can add, is that if I had something in asterisk logs, i surely told it here.

where’s the log output at the time of the crash, it’s not here (whether it appears helpful or not, knowing the last thing it did when starting up that made it crash may be valuable to someone.

Do you hear the beep sound before it craches?

If you start asterisk as root (not running amportatl start) with asterisk -cgddddddvvvvvvv - what does the cli output at the crash?

read the backtrace.txt in the doc folder of the asterisk source, and do as it say with the core dump

/niklas

Go to /var/spool/asterisk/voicemail/default and do

chmod -R 755 *

Then try again. The reason for the crash is lack of permission for the voicemail application to create the file.

If you Google for Asterisk ended with exit status 139 you will find numerous postings about this error, some of them are related to (fixed) bugs in Asterisk but most of them are faulty setups.

And NO, there is NO bug in FreePBX, it is certainly your setup that is failing.

Hahaha ! You’re fabulous !
Asterisk 1.2 works, 1.4 works, but the permissions are not ok ? hahahaha ! Splendid !
And no bug in Freepbx, that’s splendid too !
I found the bug, and i corrected it, and it works perfectly now…

And the bug is?

If you do not post it you are the laugh of the day…

There is no bug, I can’t post it :wink:

EOF for me.

So it was your setup that was wrong…

You’re so funny…

Did you simply have a configuration issue or was it something else?

If it was a config issue a thank you to the developers who assisted you. If you found a real bug it should be shared with the community.

Misconfiguration is not a bug.

Someone helped me ? when ? Telling me to put all my files in 755 mode ? Hahaha. I found it very funny, really. Why not 777 ? :smiley:
You’re all sure that there isn’t any bug in freepbx, so, I must answer there was any bug, but, I corrected it :wink: Yes, I can (correct non existing bug) !
But in fact, i’ll stop using freepbx, because I won’t be able to update with all the modifications. Freepbx isn’t clearly compatible with asterisk 1.6.

Real EOT for me.

OK, I see now that I have made a typo, it should have been chmod -R 775, not 755.
But still, if Asterisk crashes when creating the spool file it is not FreePBX fault.

The solution posted by me solves almost every cause when voicemail crashing after playing the beep (when typed correctly that is).

Still, what was the cause of your problem?

Of course not !

I can’t help replying - even though it wont matter, I run asterisk 1.6 with freepbx without issues (actually i did some of the work keeping freepbx updated to work with 1.6). So it would be really interesting to now why your system crashed. If there is some issues using gentoo - that something we can work around in the install of freepbx.

And please behave a bit here - we are all adults and can discuss issues as adults.

/niklas

@pnlarsson : is it possible to join you in private plz ?
chris at novazur.fr

https://issues.asterisk.org/view.php?id=15428&nbn=4

There (novazur):
“I’ve first reported to freepbx, but I think the problem is more with asterisk.”

Here (novazur):
“I found the bug, and i corrected it, and it works perfectly now…”

There (seanbright):
“I believe this has already been resolved in the 1.6.1 branch. Could you try the attached patch and report back your results?”

There (novazur):
“That’s perfect !
You saved me.
I’m on that for 2 weeks, tried all what I could…
Thanks a lot.”

LOL?