Before too many of you laugh, yes I am a Windows user that has turned to Linux to run Asterisk for a project.
I have what is probably the simplest question, but I am not finding an answer anywhere.
I am running Fedora 11, Asterisk 1.6. I installed Asterisk using “yum install asterisk” so i do not have the source.
I am trying to get Asterisk to automatically start when the computer is reboot. I have found several sites talking about using the source and making it work, I found a few sites talking about using the rc.local to get it to work.
I put the entries into the rc.Local (/usr/sbin/asterisk) and it does start Asterisk on reboot, and asterisk does work for local extensions like this. BUT asterisk does not seem to be able to register the SIP provider. It gets a 404 error, almost like it is loading before the nic drivers are loaded.
Here’s the kicker, if I go into the cli for asterisk and type restart now, asterisk kicks me out to the command line, then I go asterisk -r again and now the SIP provider works, and everything is blissful until the next reboot.
I know it’s all me, but could someone PLEASE give me step by step instructions for fixing this??? I am using strictly sip for all phones and extensions
It is a legal requirement that you be able to get the matching source.
Where did you get the package from? The only RPM’s for Asterisk that I am aware of are for AsteriskNow, which is a complete OS and Asterisk install, not an Asterisk install for a normal OS.
Provided that you have the Asterisk binaries and suitable configuration files installed, in normal places,it can be started by running /usr/sbin/asterisk, from anywhere in the startup scripting. However, for RedHat-like systems, it is normal to install a startup scriptin /etc/init.d and add it to the appropriate runlevels with chkcfg (spelling?). These scripts normally use safe_asterisk, which autatically restarts Asterisk on a crash.
Note that most non-trivial uses of Asterisk benefit from Dahdi or Zaptel drivers and those are specific to a particular kernel build.
Installing from source ond CentOS and presumably RedHat, is fairly painless.
Please re-read my original post. I asked for simple step by step instructions for a simple problem. I did not ask about how to get the source, nor do I honestly care. It is not a trivial thing for a non linux user to install from the source. When I attempted to work from the source, I run non stop into cases where I needed to use the command line and su to the root user which got tiring at best.
YUM INSTALL ASTERISK is one of three steps, HOW is that trivial in comparison to the need to download GCC, then download the source, then uncompress the source, then go to command window and go to the src dir, oh wait have to be root to get into the asterisk src dir, then make clean, then build then mess with copying files to other directories oops, gotta modify those files etc…
The insistance of the linux crowd to force people to do things the longest most round about way is why the last three linux projects I have attempted ended up completed on Windows. Its sad that I had to go to a lesser OS to accomplish the simplest of tasks just because I did not have weeks and weeks to learn all the nuances of the command window and the rights and all that crap about linux.
You also make reference to the ZapTel drivers being useful for any non trivial Asterisk system. Each of the three books I have on Asterisk state that the ZapTel driver’s as well as libPri are not necessary if I am not using any of the trunk/fxs/fxo cards that install directly in the server.
The only driver mentioned that they say is necessary is the ztdummy, and it’s for the meetme conferencing which I may or may not be developing to use. I haven’t determined that yet.
I am using ATA/IAD for analog to SIP communications to the server, as well as SIP phones. I am intentionally going this route for simplifying the hardware and allowing me to host the Asterisk server in a datacenter eventually for use by numerous sites.
ztdummy is part of zaptel. It is also needed if any SIP phones try to use silence suppression, and may also help the quality of recorded announcements and music on hold, in more general cases.
The package referenced at http://atrpms.net/dist/el4/asterisk/ looks, on a cursory glance, as though it will install and run out of the box (I don’t know if you need to configure it to avoid a startup abort). It has the proper startup scripts and the proper post-install script to enable those startup scripts.
However, it is marked as having testing status, not stable status.
I understand the history of Open Source Support, but just because it’s always been a given way doesn’t mean that it’s conducive of good relations.
Every member of the Linux and the Open Source community wants to see their product expand and take off, but then when a new user does decide to try their product they turn around and give ridiculously complicated answers leading them halfway around the web to another site that leads them somewhere else and so on, instead of simply typing 1) do this, 2 do this, 3 do this and your done.
You’ve yet again went far out of your way typing multiple EXCUSES, and yet again I am leaning toward saying simply SCREW Asterisk, there are windows solutions out there where I can get REAL support rather than BS.
Congratulations David, yet again open source has nearly run off another potential user of it’s software… You must be so proud of yourself in keeping your little community out of those nasty windows user’s hands…
So many words.
Less persons will “learn” linux - more job will be there for those who “learned” (at least some basic things).
Any way - David gave you direction - your fault is that you saw only what you can see.
Check if you have init script in /etc/init.d/ - something like /etc/init.d/asterisk, then follow instructions adding it to desired runlevel (normally 2…5)
Or of course you could explain us more …
Saying you used yum to install asterisk is kind of like saying you copied everything from C:\program files\ms office from one computer to another and now office won’t run on the second computer. Well, kind of. Yum attempts to put all of the required pieces in place, but it doesn’t always get it right. And, I’ve never made a yum install of asterisk work. I’ve tried.
I always compile asterisk from source on my production boxes. I use yum to get them ready in many cases, but I always install from source. That’s the only way to be sure every thing in it is built and tuned to run on your particular hardware and build of linux.
Given that, there is a pretty decent tutorial at voip-info.org/wiki/view/Cent … stallation on how to install it in CentOS (which is very similar to Fedora, I think).
This box is not the production box, but rather a development box. It is a cheap HP desktop box that I had sitting on a shelf as a spare visat machine for my customers.
I actually started off using CentOS, but it had issues with this hardware. It would lockup on re-boot, and half the time would not shut down correctly either.
I assumed it had something to do with the hardware being too new for CentOS to support it.
I went to Fedora because I was familiar with it’s installation, and have never had issues with it’s install. It installed flawlessly on this box.
I did not install from the src because after the 10th or 50th time of having to shell out and su to root I got sick of messing with it and tried yum install, and it went perfect. I have Asterisk up and running with no apparent issues other than it does not connect to the SIP provider when I reboot. It loads and runs, it handles all the local extensions just fine, but it cannot make a call through the SIP provider until I restart it.
I am leaning towards this being a bug in the 1.6 version of Asterisk and not a problem with the installation. As I originally stated it seems like Asterisk is loading and starting before the NIC card gets loaded and operational.
I am not all that good with Linux, but I am also not a total newbie either.
My only reason for doing this is to know what I am talking about when I finally hire someone to finish this project. This final project is far outside my scope of skills, but at this point I wouldn’t even have a clue as to what to ask someone that was interviewing which opens me to getting burned by wannabies
Look in /etc/rc.d/rc3.d and see if you see the script that is starting asterisk. I believe is starts the apps in alphabetical order based on where they are in this directory. For instance, in that directory (among other things) I have S85apache2 and S90asterisk. That means that apache is going to start before asterisk. If you see your asterisk start up script there (or in one of the other rcn.d directories) try renaming it’s link to something that puts it later in the alphabet.
Also, sorry I got your name wrong in my last post. I’ve been sitting in front of a computer too long today.
I would highly suggest you get the lastest version of AsteriskNOW. It will sheild you from about 98% of the linux stuff and get you up and running very fast.
AsteriskNOW is CentOS, Asterisk and the FreePBX GUI all rolled into one easy install from a CD. Easy to install, easy to configure.
Actually for what I am trying to do, Asterisk now will actually be counter productive for me. I had already looked at it.
First off it won’t allow me to develop the call plans that I need to develop. I am building a “normal” PBX/VM system. The Dial Plans that I need are going to require tons of interaction with a DB Server, as well as some creative solutions for some of the tasks as well.
BUT the main reason for this phase is for me to learn enough to talk intelligiently about what I need/want when I go to interviewing an Asterisk Developer to actually develop what I need.
I own a small company, and cannot afford to make the mistake of hiring someone that doesn’t have the skills to do what I need, pay them for several months for me to learn that they didn’t have the skills, then learn from that experience to hire someone else.
Ultimately this project is probably going to cost me $40k + with an experienced developer, so spending $10k or more to learn I made a mistake in who I hired isn’t a very attractive option for me.
Besides that I there is always the gamble that I might find that I can go on to develop the project on my own rather than hire someone…
Actually I got distracted on another project, but yes I did look in rc3.d, and there wasnt anything in there.
One of the sites I read suggested using rc.local, and I did put it in that file, and it does run at startup, but it doesn’t connect to flowroute until I restart it.
Now this is where my Linux (lack of) experience shows. I tried to VI rc3.d to move my startup entry into it, but I cannot save back to the file even when I am using the root account.
My best guess is that the chmod settings are such that it cannot be written to or something, but when it comes to chmod I am hands off unless I know EXACTLY what to type because I have no clue what the parameters do…
[quote] I am building a “normal” PBX/VM system. The Dial Plans that I need are going to require tons of interaction with a DB Server, as well as some creative solutions for some of the tasks as well. [/quote] Nothing out of the ordinary there
But it will install the OS and Asterisk correctly and ready to go. You dont need to use its dialplan or even its GUI . But you will have Linux, Asterisk, Apache, php and Mysql all installed and ready to go.
That should have read “I am NOT building a normal PBX/VM”
I actually started off trying AsteriskNOW and CentOS, but CentOS had issues with the hardware I am using, and I don’t have the Linux Experience to troubleshoot those issues at all. The system under a defaul install of CentOS 5.3 (and 4.8) would hand on shutdown or reboot, and would occassionally hang on boot with hardware errors.
There isn’t any problems with the hardware, it is a new off the shelf machine, everything checked out under windows, and Fedora. I assume it was just that the right drivers didn’t exist for CentOS or I didn’t know how to find them. But in either case it was outside my skillset to fix at this time.
Before going to Fedora 11, I actually tried CentOS 4.8, 5.3 and Ubunto (can not remember version) and had issues on each of them that I did not have the skills to get past. CentOS was the highest recommended OS for Asterisk from what I could tell, but it didn’t like this machine. When I go to production though I will use CentOS, I know it runs fine and supports the Server Hardware I will be using because I evaluated VMWare on CentOS on the sister machine to Asterisk’s eventual destination.
I had had experience with Fedora 7 in the past, and had actually been impressed by how easy it was to install so I finally went back to it based on previous good luck.
I feel your pain. I can see by the posts that you’ve made some progress and that’s good. I can tell you that Asterisk running on Linux does work quite well, even though I run it mainly on FreeBSD.
But to address some of your points. Yes, the *nix community is notorious for thinking that if you’re posting to this or just about any other *nix forum that you know as much about it as they do. Further, so many of the *nix users are young people, younger than me anyway, and there’s a very large level of arrogance in this crowd. They exepect you to know as much about it as they do and if you don’t their advice will be RTFM. Honestly this is the part that ticks me off more than anything. And many times when they don’t know the answer instead of keeping quite or admitting they don’t know the answer they will post ridiculous, uncalled for replies which basically center around the RTFM concept. I could go on and on but it will only start more flames.
I guess I don’t understand your reluctance to install from source. There is mainly no difference when installing from source and installing from YUM as far as useage I would think.
I started a new project this morning for our office with Asterisk on FreeBSD and using bandwidth.com as our DID provider. I just got off the phone with one of the owners and he’s as pleased as sunday punch to see it working so quickly. Now to tweak the dial plan and really make an impression. But I’m not sure why your asterisk server doesn’t login to your provider automatically. My system comes up and logs in without a hitch. It also logs all the other users, one who is in NY and the other in Atlanta. Latency is a little bit of a problem but so far everyone is impressed with the results. So keep at it, I’m sure you’ll get what you need.