Metarouter images

Nathan,

  1. 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
  2. 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.

Perhaps…

/etc/init.d/asterisk stop && /etc/init.d/asterisk start

…?

– Nathan

Nathan,

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.

—Tedd



0 12 * * * /etc/init.d/asterisk restart

:slight_smile:

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” :slight_smile:

– Nathan

@@Nathan

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.

Where can I find more custom images?

Btw link for default images:
http://openwrt.wk.cz/trunk/

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.

Hi Guys,

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.

Any advise?

Yes there is a solution ,

  1. you will need to backup the following files: dahdi_guiread.conf, dahdi_scan.conf and http.conf to a directory say "etc/astbkp/
  2. Create a script to restore these files everytime the router is rebooted.

enjoy!

Thanks tedd77,

I have added following startup commands to rc.local

echo GMT-8 > /etc/TZ

ntpclient -c 1 -s -h 202.131.XXX.XXX

hostname RouterBoard_PBX

echo "[general]
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088
enablestatic = yes
redirect = / /static/config/index.html
[post_mappings]
backups = /usr/lib/asterisk/gui_backups
moh = /usr/lib/asterisk/moh" > /etc/asterisk/http.conf

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.

Guys, any idea? I can`t see any even any failure logs on OWRT.

You will find more information about this problem here: http://forum.mikrotik.com/viewtopic.php?f=15&t=60746&start=350

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.

Does anyone have any contact to liquidcz?

I try access to site week ago - don’t work (

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.

luminescentsimian
Thank you. there is still hope )

Do you have access to contents of this site? Can you download it all and put it into archive?