I have done further testings with a proper solution, I am now very confident with the script change I made. Need to make a file that copies the 3 files back to the asterisk folder.
place the command at the beginning of /etc/init.d/asterisk file
It seems that my suggestion is fine, you do not need to worry about that bug in GUI backup , just scp the metarouter and place the file into /usr/lib/asterisk/gui_backups/
as for 3. we shall await for Mikrotik if they wish to provide the way but again that is low priority for me.
I have a new question: is there a way to restart asterisk at a certain time of the day? I know that we can set it to restart every 2 or 3 hours by adding a command to the crontab -e
please let me know the command if you have it.
It is not! The command to make it restart every 3 hours is : */180 * * * * /etc/init.d/asterisk restart
this will force the asterisk to restart every 180 minutes = 3 hours, what I am looking for is to restart the asterisk say at 12:00 AM every day.
I think we are misunderstanding each other. The only part of your example text that is a “command” is the “/etc/init.d/asterisk restart” part. The prefix to that is instructions to cron on when and how often that command should be executed; if you tried to type that entire thing at a command shell, you would get a syntax error thrown back at you.
I specified “/etc/init.d/asterisk stop && /etc/init.d/asterisk start” because I actually looked at the init script for Asterisk and saw that it did not contain a “restart” section, so I didn’t think that particular verb was supported. I tried it, though, and you’re right: it does work. It turns out that there is a generic “restart” provided within /etc/rc.common that simply shortcuts my method by executing “stop” and then “start” for you, so it essentially does the same thing.
As for how to use cron, that is more a matter of learning about a general Unix administration concept, which is a subject outside the scope of this thread about MetaROUTER images and their functionality. I would advise you to actually read the documentation: “man 5 crontab”
I respect your suggestion, I will not post things that are not related to Metarouter however being talking about asterisk and solutions to make it more stable on Metarouter (The subject)
some of the commands posted by me about crontab were not correct.
Just need to correct the command to restart every 3 hours is : */0 0,3,6,9,12,15,18,21 * * 0-5 /etc/init.d/asterisk restart
Normal crontab does not require */ however openwrt does therefore in openwrt you need to add the */ at the start of the command to work.
use crontab -e to create the file.
Thank you and sorry if I created any miss-understanding or a confusion to anyone.
Tedd
that is ok, normal crontab does not use extra * as it is run with user privileges. While one in OpenWRT and one on ‘root’ account on *nix will require extra parameter.
Hello Nathan,
Your image for PPC works great. Thanks a lot. The GUI is very helpful for people like me. I have installed on RB1100AH. I just imported image file and configured basic setting like IP address, gateway, ntpclient, timezone, trunk, users etc… Now I`ll try to test how many active calls use how many CPU and memory usage.
My GUI file “etc/asterisk/httpd” loses after routerboard reboots without proper shutdown. Also NTP configuration loses. How to solve this? In this case every time I need to copy backup httpd file to Metarouter.
Now its okay after reboots. But I have new issue, OWRT stop to respond sometimes. When is freezes last CPU usage info is idle=98%. But suddenly stops to respond to ICMP, SSH, HTTP even console. Just freezes. Reboot or stop/start Metarouter helps. What might be the reason? Such unstable router cant be used for live usage.
Anyone knows what happened to site http://openwrt.wk.cz/trunk ?
Now, we have stable MetaROUTER but this site has disappeared! I downloaded OpenWRT r31411 some time ago from that link and it is working fine now but it’s useless if I cannot get packages.
Seems to only resolve via ipv6 now, no ipv4 addr. It comes up fine on my desktop, but not on the new openwrt metarouter I just imported because it doesn’t come with ipv6 out of the box.