Hello I’m experiencing a problem when I need to either reboot or use amportal. My inbound routes will not follow the same setup. They stay the same but do not work they follow a different pattern. I have to submit each inbound route and apply changes for it to work properly again. I just upgraded the core to 22.214.171.124 don’t know if this will solve the issue or if it’s another module.
My experience with this issue is that you do not find out until you notice the phone are not ringing.
Just thought I share this in case someone else has experienced the same or if there is a fix.
How are you rebooting? The proper procedure is to shut down asterisk - this will close the mysql database down properly, saving configurations, then stopping asterisk. Next is to shut down linux. Here’s the procedure from the linux command prompt:
amportal stop <= stops asterisk + mysql
shutdown -h now <= stops linux
amportal stop <= stops asterisk + mysql
shutdown -r now <= reboots linux
To restart asterisk only:
I’ve found that there seems to be a race condition if you use “amportal restart” and some things restart before others have completely shutdown… No problems if you do it with the stop/start method.
Amportal restart is what I use. When I first noticed this was in a power surge. It knock down the system and then booted up. But I never had something like this happen before. Where the freepbx gets out of wack. I was under the impression it had to be a bug.
I appreciate your input and I will be more careful about re-booting. Normaly I type reboot and that’s it but I Am guilty of using amportal restart. For some reason Eugene I still think there is something there not clicking.
Thank you so much for the help.
I’ve made two scripts called pbx-stop and pbx-reboot that just have the above listed commands in them. Put them in /usr/local/sbin and then if I want to stop, I just type pbx-stop or to reboot, I type pbx-reboot.
Please, stop and think for a minute here.
After you have clicked on Apply Changes in FreePBX the configuration files are generated. After that there is NOTHING that can change the behavior of Asterisk dialplan except a manual change of one of the configuration files. Nothing!
The settings in the FreePBX are read from the SQL database, not from the configuration files. After you click on Apply Changes the configuration files are generated from the SQL database and then a reload in Asterisk is done.
If you need to save each Inbound Route after a restart then you must have some weird thing going on in your system during boot up.
Do this, after you have Applied Changes and verified that your pbx is working as it should, then save the /etc/asterisk directory to some safe place. Open a shell to the pbx with putty and run asterisk -r. Make sure that you have at least 10000 lines in the buffer for putty and type dialplan show. Save the buffer to a text file.
Now, after a reboot, do the same and compare the saved /etc/asterisk directory against the real one, the do the putty thing again and compare the output. If those differs, then check your system if there is a script that replace some of your configuration files.
As far as MySQL goes, it is like this, if you have Applied Changes you can shut down MySQL as it is not used at all in Asterisk in a standard FreePBX install. The only time MySQL is used is when you access FreePBX.
I must agree with mickecarlsson which is to stop and think and look more carefully, don’t just start jumping at very wild straws, so to speak.
His additional points are very well received, the conf files are ‘static’ and no database corruption after the fact is going to effect that whether or not there was any. (If there is, mysql will tell you about it in some form or another, or you will get some obviously broken errors going on).
Another way to show your dialplan which may be easier then a screen capture is:
asterisk -rx ‘dialplan show’ > mydialplan.log
will drop it into that file, of which you can then do a diff between files if you take another dump elsewhere to see if there are any in memory changes.
Nothing will change the config files as long as they are generated by FreePBX in conjunction with the mysql database. If he is manually modifying the “config” files directly, won’t that put them out of sync with the mysql database for the next apply configuration changes and cause them to be written over?
I come here as last resort. I don’t like to waste anybody’s time and you probably don’t know how much I appreciate the input. My last update was the core module 126.96.36.199. I think I did this on Thursday or Friday. Yesterday after I got your messages I also did a yum update and rebooted. I did not noticed anything out place. Everything went back to normal. I was trying to recreate what had happened three times in the last two weeks yet everything was in place. I could not get it to malfunction and I had to try because when this happens during the week I will not noticed until I realize the phones are not ringing by that time you have lost a few calls.
I will try today again testing the output of files and see what I get.
Thank you everyone I appreciate the help.
When I use amportal restart or reboot I lose the configuration in the time groups. I have to submit a time group and apply configuration and it all goes back to normal. When I rebooted the system the same thing happened and I have to submit a time group and apply configuration. Otherwise the caller receives the announcement and goes directly to the queue but the phone does not ring nor the caller is there. The caller thinks he is next in line but the call is not there at all.
have you tried to do what was suggested and dump the dialplan before and after and compare?
It is highly unlikely that anything in the dialplan has changed. The “amportal restart” simply stops and starts asterisk and maybe FOP and resets permissions on all files to asterisk:asterisk or other if configured.
So it sounds more like your computer may be confused as to the time/timezone and choosing the wrong timecondition route.
No need to fight
We’re not fighting - we are discussing. I have the utmost regard for Philippe and Mikael and value their opinions greatly. I’m presenting scenarios that they might of not considered and also looking for clarification. Discussion is good!
On a side note, we are a multicultural society and some cultures tend to be more forceful than others are used to. That is amplified if English is not our native tonque.
I was just adding a bit of humor to my dilemma. Did not mean to offend anyone. All the contrary I appreciate the help I got so far.
I have upgraded and updated everything and will try the suggestions next weekend. I get home kind of tired and can’t do anything during the day anyways.
Thank you all.
I found this link that solved my problem. So far so good. Thank you all.
I have rebooted, amportal restarted, stop and start. So far is good.