fresh install : voicemail makes asterisk crashing

novazur's picture

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 [s-CHANUNAVAIL@macro-vm:1] Macro("SIP/200-00b76bf8", "get-vmcontext,100") in new stack
    -- Executing [s@macro-get-vmcontext:1] Set("SIP/200-00b76bf8", "VMCONTEXT=default") in new stack
    -- Executing [s@macro-get-vmcontext:2] GotoIf("SIP/200-00b76bf8", "0?200:300") in new stack
    -- Goto (macro-get-vmcontext,s,300)
    -- Executing [s@macro-get-vmcontext:300] NoOp("SIP/200-00b76bf8", "") in new stack
    -- Executing [s-CHANUNAVAIL@macro-vm:2] VoiceMail("SIP/200-00b76bf8", "100@default,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 root@serveur2 ~ # find /etc/asterisk/ /var/spool/asterisk/ /var/lib/asterisk/ /var/log/asterisk/ ! -user asterisk
12:29:21 root@serveur2 ~ #

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 :(

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.


__________________


Comment viewing options

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

If I use FreePBX start

novazur's picture

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

novazur's picture

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

14:39:28 root@serveur2 /etc/asterisk # cat sip.conf
[1000]
type=friend
context=internal
host=dynamic
[1001]
type=friend
context=internal
host=dynamic
14:39:30 root@serveur2 /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(1001@default,u)
exten => 1001,n,Hangup()
exten => 1001,n(busy),VoiceMail(1001@default,b)
exten => 1001,n,Hangup()

1000 dialing 1001 (not connected) :

  == Using SIP RTP CoS mark 5
    -- Executing [1001@internal:1] Verbose("SIP/1000-0209b648", "1,Extension 1001") in new stack
 Extension 1001
    -- Executing [1001@internal: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 [1001@internal:3] GotoIf("SIP/1000-0209b648", "0?busy:unavail") in new stack
    -- Goto (internal,1001,4)
    -- Executing [1001@internal:4] VoiceMail("SIP/1000-0209b648", "1001@default,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'
# 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 ..

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>

p_lindheimer's picture

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.


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


I don't understand all what

novazur's picture

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

p_lindheimer's picture

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.


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here


Do you hear the beep sound

pnlarsson's picture

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


__________________

/niklas


Go to

mickecarlsson's picture

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.


__________________

Mikael Carlsson, FreePBX Development Team


Hahaha ! You're fabulous

novazur's picture

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

mickecarlsson's picture

And the bug is?

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


__________________

Mikael Carlsson, FreePBX Development Team


There is no bug, I can't

novazur's picture

There is no bug, I can't post it ;)

EOF for me.


Quote: I found the bug, and

mickecarlsson's picture
Quote:
I found the bug, and i corrected it, and it works perfectly now...

Quote:
There is no bug, I can't post it ;)

So it was your setup that was wrong.....


__________________

Mikael Carlsson, FreePBX Development Team


You're so funny...

novazur's picture

You're so funny...


Mike is not making a joke

SkykingOH's picture

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 ?

novazur's picture

Someone helped me ? when ? Telling me to put all my files in 755 mode ? Hahaha. I found it very funny, really. Why not 777 ? :-D
You're all sure that there isn't any bug in freepbx, so, I must answer there was any bug, but, I corrected it ;) 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

mickecarlsson's picture

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?


__________________

Mikael Carlsson, FreePBX Development Team


Of course not !

novazur's picture

Of course not !


I can't help replying - even

pnlarsson's picture

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


__________________

/niklas


@pnlarsson : is it possible

novazur's picture

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


Google...

drmessano's picture

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?


mickecarlsson : "And NO,

novazur's picture

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

mickecarlsson : "So it was your setup that was wrong....."

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

LOL?


Well novazur, despite your

mickecarlsson's picture

Well novazur, despite your remarks the issue was that you used a version of Asterisk 1.6 that had a bug in it.

On June 6:th you posted that you have fixed the "bug" but refused to tell us what the problem was.

On the very same day seanbright told you what the problem was with this remark:

Quote:
I believe this has already been resolved in the 1.6.1 branch. Could you try the attached patch and report back your results?

Then on July 7:th you replied:

Quote:
That's perfect !
You saved me.
I'm on that for 2 weeks, tried all what I could...
Thanks a lot.

My point stands, it was your setup that was the issue, not FreePBX.

So LOL back to you.

PS. Your statement in the bug report is funny:

Quote:
I've first reported to freepbx, but I think the problem is more with asterisk.


__________________

Mikael Carlsson, FreePBX Development Team


An asterisk bug is a setup

novazur's picture

An asterisk bug is a setup issue for you ? Wow !

Even, YOUR solution with chmod was really so good !

Edit :
"PS. Your statement in the bug report is funny:"
Because you don't look at the time of my differents posts. You can't understand my way of search.
All what you could tell was "that's a setup issue. chmod ..."
And what i can remember is that all your help here was so useless.

But, when it starts with : "And NO, there is NO bug in FreePBX, it is certainly your setup that is failing.", what help can we hope from this forum...

In fact, you're really lucky that my english is so bad. I can't explain all what i feal about all of you (except /niklas), and it's surely better for you.


Well, if you install

mickecarlsson's picture

Well, if you install Asterisk on your machine, it is your setup

You blamed, loudly and very upset, that it was a bug with FreePBX. When everyone told you it was not and tried to help you, you eagerly continue to say it was FreePBX.

There where at least three developers that tried to help you, but no, you refused to listen to us.

And when you (finally) was convinced that it was not FreePBX that caused the error you had with your setup, you refused to tell us what it was.

We had to find out by ourself, and the remark that you put in when you filed the bug report at asterisk put a smile on our faces.

Take care,
Mikael Carlsson
Sweden


__________________

Mikael Carlsson, FreePBX Development Team


"Well, if you install

novazur's picture

"Well, if you install Asterisk on your machine, it is your setup"

Splendid !

"You blamed, loudly and very upset, that it was a bug with FreePBX. When everyone told you it was not and tried to help you, you eagerly continue to say it was FreePBX."

You're lying !
I even said :
"Why am I almost sure that's a problem with FreePBX ?"
that was to give all what i thought. I someone could at this moment tell me that I was wrong on this part.
But no, you didn't read, and you speak about chmod.
And THAT was STUPID !! Because the file WAS WRITTEN, and it was said in my post, and chown by "ll -Rla /var/spool/asterisk/voicemail/default/100/tmp/"

"There where at least three developers that tried to help you, but no, you refused to listen to us."
No, I couldn't listen YOU. Your answer was STUPID. How can I follow a stupid way ? Not possible for me.

"And when you (finally) was convinced that it was not FreePBX that caused the error you had with your setup, you refused to tell us what it was."
Finally ? Look at the dates !! The ticket is open on issues.asterisk.org BEFORE my post here !
Do you think that between my first post here 1er Jully, and YOUR first reply, 6 Jul, I stayd without doing anything ?
I have 2 softs installed, asterisk and freepbx, and I couldn't be sure the problem was on one or another. I day I think it's due to asterisk, one day I doubt and I thnk it's due to freepbx. That's normal when you spend days and days on a problem without finding HELP and solution.

"We had to find out by ourself, and the remark that you put in when you filed the bug report at asterisk put a smile on our faces."
That's only what you can do, smile. That's surely your role here.


Well, the only thing that

mickecarlsson's picture

Well, the only thing that you have posted here are nothing but trouble pointing out that you are so perfect, the FreePBX does not work with Asterisk 1.6 etc etc.
This is what you wrote in the ticket:

Quote:
Nothing wrong ? That's a joke ? Asterisk crashes and that's normal ? I'm now sure it's because of freepbx. I desinstalled and reinstalled about 20 times, and 1 time, I had it working, but my installations wrere very durty after that. So I uninstalled all, cleaned all, and installed again from scrash, and now, I have the same problem again.

Notice: "I'm now sure it's because of freepbx"

And by looking at the I desinstalled and reinstalled about 20 times I figured out that you are a Windows user because that is how they "solve" problems.

I guess that this discussion is ended.
There where no bug in FreePBX, there where a bug in Asterisk.
You got an answer, fixed it but would not tell us what it was. Why I don't know.


__________________

Mikael Carlsson, FreePBX Development Team


"And by looking at the I

novazur's picture

"And by looking at the I desinstalled and reinstalled about 20 times I figured out that you are a Windows user because that is how they "solve" problems."

Not at all. first, that's just because freepbx upgrade works differently if you do upgrades in different order (*). Second, because I had it working fine ONE time, but I made so much modifications that I wanted to know the exact way from a fresh install.
My error was thinking that i could have it working quickly another time.

(*) For exemple, do a fresh install of freepbx, as recommended, NOT reload before upgrade, and try to upgrade framework before core and admin. The upgrade of the framework never finishes. You have to refresh the page, without knowing if the upgrade worked fine or not. If you upgrade all modules BEFORE framework, it works without having to reload the page.
Of you, you must think it's normal and that's again a setup issue...
For all of this, I had to try a lot of orders between upgrades, freepbx loads, asterisk setup before installing freepbx, etc...
But of course, you don't (can't ?) understand that. I'm just a stupid boy who makes 20 times sames things just hoping one time it will work, and who have to learn permissions under linux. When I look to your purpose, I suppose I know a lot more than you about linux.


folks, it's not worth the

p_lindheimer's picture

folks, it's not worth the effort. I'll make this comment and then bow out. I've already been asked by people in the community if I would lock this thread as it is really pointless but being one who does not like censorship, I would prefer not to.

I think there is a simple conclusion here. When things go wrong, one should not be so quick to point blame, and in particular, when people are trying to help.

If one has expectations beyond what one gets from free help, go to one of the many sources of paid support (though no guarantee they are going to be better).

And when someone asks for help, especially after so strongly implying there is a problem, but in any event, it is proper etiquette to post what the solution is. Even if you don't like what the people who tried to help you are telling you, the thread is there to be found by the countless google searches for someone who may have the same problem. Not posting what you found implies a level of 'selfishness' that "I don't care about the rest of the world, I expected them to help me find my bug, but once I found it, I'm not willing to post the solution for the next person that comes along."


__________________

Philippe Lindheimer - FreePBX Project Leader
FreePBX Training Opportunities - Click Here
Get Official Paid Support - Click Here