Installation Help

Hi,

Im new to Asterisk, have spent a good part of my day trying to get it to work. THe first question I am going to ask I know returns more results than there are hours in the day from google, but it is one that fustrates me.

If I boot up my server (Running CentOS 6 & Asterisk 1.8) and try to go into the Asterisk CLI I get this lovely message:

At this point I obviusly checked that Astrisk is running to which I got:

[quote][root@aspen-hp625 src]# /etc/init.d/asterisk status
asterisk (pid 30002) is running…[/quote]

If I stop asterisk and start it I then get this (notice how there is no [OK] after starting…)

[quote][root@aspen-hp625 asterisk]# /etc/init.d/asterisk stop
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [ OK ]
[root@aspen-hp625 asterisk]# /etc/init.d/asterisk start
Starting asterisk:[/quote]

So I then checked in /var/run (& /var/run/asterisk) and there is no asterisk.ctl file in either. I did read on the internet somewhere that in asterisk.conf ´astrundir´ may be set incorrectly but it is set to /var/run/asterisk

However, I managed to get into the CLI by doing the following (I could get in at anypoint in console mode -c):

[quote][root@aspen-hp625 asterisk]# asterisk
[root@aspen-hp625 asterisk]# asterisk -r
Asterisk 1.8.5.0, Copyright (C) 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer markster@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.

Connected to Asterisk 1.8.5.0 currently running on aspen-hp625 (pid = 30059)
aspen-hp625*CLI>
[/quote]

At this point I thought all was well and I could keep my head down and play around (following the Get Started wiki guide of course, brilliant stuff!) but once I had played around for a while and went to configure my softphones to connect neither of them would, using Zoiper they try to register then it obviusly times out. Both computers are on the network and can ping each other.

My concern is that something may have gone wrong during the installation, and that the fact I cant get into Astrisk smoothly (and no asterisk.ctl) may be causing this problem.

If anyone could help me out I would really appreciated. Looking forward to playing around with asterisk!

Many Thanks,
JS

CentOS 5 is probably safer than CentOS 6.

How did you install Asterisk? Are you trying to run non-root?

It looks like safe_asterisk isn’t working properly.

Your IAX problem is likely to be different. I would try temporarily disabling the Linux firewall.

I ended up following the install guide here (linuxmoz.com/asterisk-centos-6-install-guide/) and comparing it with the wiki as I went along.

I have not yet tried running it non-root, however my thought was if it wont run as root it wouldnt run as non-root? What exactly is safe_asterisk?

It is a shell script, run by the startup script, which saves the core file and restarts Asterisk, when it crashes. It contains the actual code that starts Asterisk.

Ok, how would I go about checking if that is causing the problem. I have also disabled the firewall but the softphones are not registering - however nothing is cominng up on the CLI when in Debug mode saying that they cant register.

Check whether chan_iax is loaded.

If it is, it is most likely that the problem lies in the network and the requests are not even reaching Asterisk, however, to be certain, create a pcap file on that machine (e.g. tcpdump, or wireshark) and find out whether the packets are being received.

If the channel driver is not loaded, use module load to manually load it (this can also be used to see if it is already loaded, as it will complain if it is), and look for the error messages.