OpenWrt Forum Archive

Topic: servers, web, email, asterisk

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I have a wrt54g v2 and I just bought 2 wrt54gs v1, I am planning on making some mods like the sdcard reader and maybe cooling fans and of course the firmware. I tried the openwrt rc6 on my wrt54g and it wouldn't fetch the asterisk package so I went back to dd-wrt for now but it looks like openwrt is the way I have to go to to get to my goals and when I get the gs models I will start.

My goals are to have 2 or 3 wrt54's running servers, I know  the asterisk package is running and stable from what I have read so that seems achievable, and i am pretty sure an email server and web server can be set up on the wrt54's.  These will be for household use and family access to the webserver so I will not need blazing speed.

I like the idea of using these routers because of there small footprint and low power consumption( i can power them for a long time with a backup power supply) compared to doing the same using a pc.

Can anyone let me know the odds of getting these servers up and running in a usable state. I chose the wrt54gs v1 because of the 8/32 megs of ram and with 1 gig of sdcard ram I think hardware would not be an issue. I don't know as of yet what the software limitations are, if I can load a linux kernal and full software packages or if I will be limited to mini versions others have packaged together, specially on this site, seems to be the most advance site for info and packages for the router mods.

If anyone can take the time to post there ideas on what i am trying to do it would be greatly appriciated

Thank you
Gord

Hi Gazoo2

I have ASUS WL-500G Premium (8Mb flash, 32Mb RAM)
My installed packages, and memory utilization when Asterisk is running follow:


root@OpenWrt:~$ ipkg list_installed
asterisk - 1.2.12.1-1
asterisk-chan-bluetooth - 1.2.1-1 - Bluetooth HandsFreeProfile support for Asterisk
asterisk-mysql - 1.2.1-1 - MySQL support
base-files - 8 - OpenWrt filesystem structure and scripts
base-files-brcm - 2 - Board/architecture specific files
bluez-libs - 2.24-1 - Bluetooth library
bridge - 1.0.6-1 - Ethernet bridging tools
busybox - 1.2.1-6 - Core utilities for embedded Linux systems
dnsmasq - 2.33-1 - A lightweight DNS and DHCP server
dropbear - 0.48.1-1 - a small SSH 2 server/client designed for small memory environments.
e2fsprogs - 1.38-1 - Ext2/3 filesystem utilities
ez-ipupdate - 3.0.11b8-2 - Dynamic DNS services client
fdisk - 2.12r-1 -
haserl - 0.8.0-1 - a CGI wrapper to embed shell scripts in HTML documents
int2human - 3 - convert integers to human readable form
ip - 2.6.11-050330-1 - iproute2 routing control utility
ipkg - 0.99.149-2 - lightweight package management system
iptables - 1.3.3-2 - The netfilter firewalling software for IPv4
iptables-mod-extra - 1.3.3-2 - Other extra Iptables (IPv4) extensions
iptables-utils - 1.3.3-2 - iptables-save and iptables-restore for Iptables (IPv4)
iwlib - 29.pre10-1 - Library for setting up WiFi cards using the Wireless Extension
kernel - 2.4.30-brcm-4 -
kmod-brcm-wl - 2.4.30-brcm-4 - Proprietary driver for Broadcom Wireless chipsets
kmod-diag - 2.4.30-brcm-5 - Kernel modules for LEDs and buttons
- d-ext2 - 2.4.30-brcm-4
- d-ext3 - 2.4.30-brcm-4
kmod-ipt-extra - 2.4.30-brcm-4 - Other extra Netfilter (IPv4) kernel modules
kmod-ppp - 2.4.30-brcm-4 - PPP support
kmod-pppoe - 2.4.30-brcm-4 - PPP over Ethernet support
kmod-sched - 2.4.30-brcm-4 - Kernel schedulers for IP traffic
kmod-switch - 2.4.30-brcm-1 - switch driver for robo/admtek switch
- d-usb-core - 2.4.30-brcm-4
- d-usb-printer - 2.4.30-brcm-4
- d-usb-serial - 2.4.30-brcm-4
- d-usb-serial-pl2303 - 2.4.30-brcm-4
- d-usb-storage - 2.4.30-brcm-4
- d-usb-uhci - 2.4.30-brcm-4
- d-usb2 - 2.4.30-brcm-4
- d-vfat - 2.4.30-brcm-4
kmod-wlcompat - 2.4.30-brcm-4 - Compatibility module for using the Wireless Extension with broadcom's wl
libmysqlclient - 5.0.18-1 - MySQL client library
- ncurses - 5.2-7
- openssl - 0.9.8d-1
libpcap - 0.9.4-1 - a low-level packet capture library
- pthread - 0.9.27-1
mtd - 4 - Tool for modifying the flash chip
nas - 3.90.37-17 - Proprietary Broadcom WPA Authenticator/Supplicant
ntpclient - 2003_194-2 - NTP (Network Time Protocol) client
nvram - 1 - NVRAM utility and libraries for Broadcom hardware
openntpd - 3.9p1-1 - NTP server
- nssh-sftp-server - 4.4p1-1
ppp - 2.4.3-7 - a PPP (Point-to-Point Protocol) daemon (with MPPE/MPPC support)
ppp-mod-pppoe - 2.4.3-7 - a PPPoE (PPP over Ethernet) plugin for PPP
swap-utils - 2.12r-1 -
tc - 2.6.11-050330-1 - iproute2 traffic control utility
tcpdump - 3.9.4-1 - Network monitoring and data acquisition tool
uclibc - 0.9.27-8 - Standard C library for embedded Linux systems
webif - 0.3-2 - An HTTP administrative console for OpenWrt.
wificonf - 6 - Replacement utility for wlconf
wireless-tools - 29.pre10-1 - Tools for setting up WiFi cards using the Wireless Extension
- b - 1.2.2-2
Successfully terminated.
root@OpenWrt:~$

root@OpenWrt:~$ asterisk
root@OpenWrt:~$ asterisk -r
Asterisk 1.2.12.1, Copyright (C) 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type '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 'show license' for details.
=========================================================================
Connected to Asterisk 1.2.12.1 currently running on OpenWrt (pid = 852)
OpenWrt*CLI> ^C
root@OpenWrt:~$ asterisk
Asterisk already running on /var/run/asterisk.ctl.  Use 'asterisk -r' to connect.
root@OpenWrt:~$ free
              total         used         free       shared      buffers
  Mem:        30504        17404        13100            0          964
Swap:            0            0            0
Total:        30504        17404        13100
root@OpenWrt:~$ df
Filesystem           1k-blocks      Used Available Use% Mounted on
none                     15252        84     15168   1% /tmp
/dev/mtdblock/4           6080      4204      1876  69% /jffs
/jffs                     1280      1280         0 100% /
root@OpenWrt:~$

As You can see, You have room on jffs for audio files.

..._(8)-x  sm4u

Well this is What I have been able to do on my wrt54gs, installed asterisk and started to configure it with a pap2. I have been able to read and write to a network storage drive NAS, but only with smbclient, unable to find or load smbmount. dd-wrt has samba up and running great on a wrt54g v2, but I have yet to see one post where someone has asterisk up and running on dd-wrt tho. I would sure like to be able to use samba in openwrt with the ease of the dd-wrt setup.

I am trying to have a samba mount at boot, right now I have to use "smbclient //STORAGE/voicemail -U voicemail -N"

---------------------------------------------------
root@OpenWrt:~# smbclient //STORAGE/voicemail -U voicemail -N
smb: \> ls
  .                                   D        0  Mon Jan  2 10:18:02 2006
  ..                                  D        0  Mon Jan  2 10:18:02 2006
  softvoice.txt                       A     3167  Sun Oct 29 14:15:04 2006

                14900 blocks of size 16777216. 12786 blocks available
smb: \>



Connected to Asterisk 1.2.1 currently running on OpenWrt (pid = 4521)
Dec 31 19:15:40 NOTICE[4531]: chan_sip.c:10817 handle_request_register: Registration from 'phone2 <sip:5561@192.168.1.130
>' failed for '192.168.1.135' - Not a local SIP domain
OpenWrt*CLI> free
No such command 'free' (type 'help' for help)
OpenWrt*CLI>


root@OpenWrt:~# free
              total         used         free       shared      buffers
  Mem:        30504        14620        15884            0          548
Swap:            0            0            0
Total:        30504        14620        15884
root@OpenWrt:~#

Connected to Asterisk 1.2.1 currently running on OpenWrt (pid = 4521)
Dec 31 19:15:10 NOTICE[4531]: chan_sip.c:10817 handle_request_register: Registration from 'phone1 <sip:5560@192.168.1.130
>' failed for '192.168.1.135' - Not a local SIP domain
Dec 31 19:15:10 NOTICE[4531]: chan_sip.c:10817 handle_request_register: Registration from 'phone2 <sip:5561@192.168.1.130
>' failed for '192.168.1.135' - Not a local SIP domain
OpenWrt*CLI>


root@OpenWrt:~# ipkg list_installed
asterisk - 1.2.1-1 - Complete open source PBX
asterisk-codec-speex - 1.2.1-1 - Speex/PCM16 Codec Translator
asterisk-mysql - 1.2.1-1 - MySQL support
asterisk-pbx-dundi - 1.2.1-1 - DUNDi support
asterisk-sounds - 1.2.1-1 - Sound files
asterisk-voicemail - 1.2.1-1 - Voicemail support
base-files - 8 - OpenWrt filesystem structure and scripts
base-files-brcm - 2 - Board/architecture specific files
bridge - 1.0.6-1 - Ethernet bridging tools
busybox - 1.00-4 - Core utilities for embedded Linux systems
cifsmount - 1.5-2 - CIFS mounting helper utility
dnsmasq - 2.33-1 - A lightweight DNS and DHCP server
dropbear - 0.48.1-1 - a small SSH 2 server/client designed for small memory environments.
haserl - 0.8.0-1 - a CGI wrapper to embed shell scripts in HTML documents
ip - 2.6.11-050330-1 - iproute2 routing control utility
ipkg - 0.99.149-2 - lightweight package management system
iptables - 1.3.3-2 - The netfilter firewalling software for IPv4
iptables-saverestore - 1.0 - The iptables-save and iptables-restore files not present in a standard OpenWRT install.
iwlib - 28.pre7-1 - Library for setting up WiFi cards using the Wireless Extension
kernel - 2.4.30-brcm-4 -
kmod-brcm-wl - 2.4.30-brcm-4 - Proprietary driver for Broadcom Wireless chipsets
kmod-cifs - 2.4.30-brcm-4 - Kernel modules for CIFS support
kmod-diag - 2.4.30-brcm-5 - Kernel modules for LEDs and buttons
kmod-switch - 2.4.30-brcm-1 - switch driver for robo/admtek switch
kmod-vfat - 2.4.30-brcm-4 - Kernel modules for VFAT filesystem support
kmod-wlcompat - 2.4.30-brcm-4 - Compatibility module for using the Wireless Extension with broadcom's wl
libgcc - 3.4.4-8 - GCC support library
libmysqlclient - 5.0.18-1 - MySQL client library
libncurses - 5.2-8 - Terminal handling library
libpcap - 0.9.4-1 - a low-level packet capture library
libpthread - 0.9.27-1 - POSIX threads library
libspeex - 1.1.8-1 - an open source patent-free speech compression codec
libsqlite2 - 2.8.17-1 - SQLite (v2.x) database engine (library)
mtd - 4 - Tool for modifying the flash chip
nano - 1.3.8-1 - An enhanced clone of the Pico text editor
ntpclient - 2003_194-2 - NTP (Network Time Protocol) client
nvram - 1 - NVRAM utility and libraries for Broadcom hardware
samba-client - 2.0.10-2 - NetBIOS/SMB simple client
samba-server - 2.0.10-2 - NetBIOS/SMB file and print server
shorewall - 2.0.9 - A highly configurable firewall using iptables.
uclibc - 0.9.27-8 - Standard C library for embedded Linux systems
webif - 0.2-1 - A modular, extensible web interface for OpenWrt.
wificonf - 6 - Replacement utility for wlconf
wireless-tools - 28.pre7-1 - Tools for setting up WiFi cards using the Wireless Extension
zlib - 1.2.2-2 - an implementation of the deflate compression method (library)
Successfully terminated.

root@OpenWrt:~# top
Mem: 14784K used, 15720K free, 0K shrd, 548K buff, 4372K cached
Load average: 0.00, 0.05, 0.24    (State: S=sleeping R=running, W=waiting)

  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
4545 root     R        380  4542  5.6  1.2 top
4523 root     S       3024     1  0.0  9.9 asterisk
4531 root     S       3024  4524  0.0  9.9 asterisk
4530 root     S       3024  4524  0.0  9.9 asterisk
4524 root     S       3024  4523  0.0  9.9 asterisk
4532 root     S       3024  4524  0.0  9.9 asterisk
4529 root     S       3024  4524  0.0  9.9 asterisk
4527 root     S       3024  4524  0.0  9.9 asterisk
4533 root     S       3024  4524  0.0  9.9 asterisk
4526 root     S       3024  4524  0.0  9.9 asterisk
4528 root     S       3024  4524  0.0  9.9 asterisk
  979 root     S        460   406  0.0  1.5 dropbear
4542 root     S        444   979  0.0  1.4 ash
  439 root     S        288     1  0.0  0.9 smbd
   95 root     S        228     1  0.0  0.7 syslogd
  398 nobody   S        184     1  0.0  0.6 dnsmasq
   97 root     S        148     1  0.0  0.4 klogd
  419 root     S        140     1  0.0  0.4 crond
  384 root     S        132     1  0.0  0.4 wifi
    1 root     S        100     0  0.0  0.3 init
   92 root     S         68     1  0.0  0.2 logger
  409 root     S         68     1  0.0  0.2 httpd
   94 root     S         68     1  0.0  0.2 init
  406 root     S         60     1  0.0  0.1 dropbear
  416 root     S         48     1  0.0  0.1 telnetd
    4 root     SW         0     1  0.0  0.0 kswapd
    8 root     SW         0     1  0.0  0.0 mtdblockd
    3 root     SWN        0     1  0.0  0.0 ksoftirqd_CPU0
    2 root     SW         0     1  0.0  0.0 keventd
  161 root     SW         0     1  0.0  0.0 cifsoplockd
    5 root     SW         0     1  0.0  0.0 bdflush
    6 root     SW         0     1  0.0  0.0 kupdated
   68 root     SWN        0     1  0.0  0.0 jffs2_gcd_mtd4

WRT54G v.2 running the latest DD-WRT firmware


Mem: 13684K used, 492K free, 0K shrd, 1000K buff, 5508K cached
Load average: 0.01 0.02 0.00  (Status: S=sleeping R=running, W=waiting)
  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
3315 root     R        436  2780  1.1  3.0 top
   99 root     S        392     1  0.1  2.7 telnetd
  450 root     S       3564   447  0.0 25.0 ser
  457 root     S       3512   447  0.0 24.6 ser
  447 root     S       3504     1  0.0 24.6 ser
  456 root     S       3500   447  0.0 24.6 ser
  454 root     S       3492   447  0.0 24.5 ser
  455 root     S       3492   447  0.0 24.5 ser
  452 root     S       3492   447  0.0 24.5 ser
  453 root     S       3492   447  0.0 24.5 ser
  451 root     S       3492   447  0.0 24.5 ser
  437 root     S        968     1  0.0  6.8 smbmount
  106 root     S        592     1  0.0  4.1 httpd
  102 root     S        548     1  0.0  3.8 httpd
2780 root     S        524    99  0.0  3.6 sh
2837 root     T        440  2780  0.0  3.0 vi
  112 root     S        436     1  0.0  3.0 nas
    1 root     S        376     0  0.0  2.6 init
  114 root     S        332     1  0.0  2.3 dnsmasq
   68 root     S        300     1  0.0  2.1 resetbutton
  117 root     S        292     1  0.0  2.0 wland
  188 root     S        288     1  0.0  2.0 process_monitor
  230 root     S        272     1  0.0  1.9 cron
  418 root     S        252     1  0.0  1.7 rtpproxy
   14 root     S        252     1  0.0  1.7 watchdog
  168 root     S        248     1  0.0  1.7 udhcpd
    3 root     SWN        0     1  0.0  0.0 ksoftirqd_CPU0
   11 root     SW         0     1  0.0  0.0 mtdblockd
    4 root     SW         0     1  0.0  0.0 kswapd
    2 root     SW         0     1  0.0  0.0 keventd
   48 root     Z N        0     1  0.0  0.0 jffs2_gcd_mtd4
    5 root     SW         0     1  0.0  0.0 bdflush
    6 root     SW         0     1  0.0  0.0 kupdated

/tmp # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 2880      2880         0 100% /
//192.168.1.111/dd-wrt 244121600  34635776 209485824  14% /jffs
/tmp #


And this is from a WRT54GS v.1 running white WHITE RUSSIAN (RC6)


Mem: 15396K used, 15108K free, 0K shrd, 548K buff, 4920K cached
Load average: 0.00, 0.00, 0.00    (State: S=sleeping R=running, W=waiting)

  PID USER     STATUS   RSS  PPID %CPU %MEM COMMAND
4551 root     R        380  4546  4.7  1.2 top
4523 root     S       3024     1  0.0  9.9 asterisk
4531 root     S       3024  4524  0.0  9.9 asterisk
4530 root     S       3024  4524  0.0  9.9 asterisk
4524 root     S       3024  4523  0.0  9.9 asterisk
4532 root     S       3024  4524  0.0  9.9 asterisk
4529 root     S       3024  4524  0.0  9.9 asterisk
4527 root     S       3024  4524  0.0  9.9 asterisk
4533 root     S       3024  4524  0.0  9.9 asterisk
4526 root     S       3024  4524  0.0  9.9 asterisk
4528 root     S       3024  4524  0.0  9.9 asterisk
  979 root     S        460   406  0.0  1.5 dropbear
4546 root     S        444   979  0.0  1.4 ash
  439 root     S        288     1  0.0  0.9 smbd
   95 root     S        228     1  0.0  0.7 syslogd
  398 nobody   S        184     1  0.0  0.6 dnsmasq
   97 root     S        148     1  0.0  0.4 klogd
  419 root     S        140     1  0.0  0.4 crond
  384 root     S        132     1  0.0  0.4 wifi
    1 root     S        100     0  0.0  0.3 init
   92 root     S         68     1  0.0  0.2 logger
  409 root     S         68     1  0.0  0.2 httpd
   94 root     S         68     1  0.0  0.2 init
  406 root     S         60     1  0.0  0.1 dropbear
  416 root     S         48     1  0.0  0.1 telnetd
    4 root     SW         0     1  0.0  0.0 kswapd
    8 root     SW         0     1  0.0  0.0 mtdblockd
    3 root     SWN        0     1  0.0  0.0 ksoftirqd_CPU0
    2 root     SW         0     1  0.0  0.0 keventd
  161 root     SW         0     1  0.0  0.0 cifsoplockd
    5 root     SW         0     1  0.0  0.0 bdflush
    6 root     SW         0     1  0.0  0.0 kupdated
   68 root     SWN        0     1  0.0  0.0 jffs2_gcd_mtd4


root@OpenWrt:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                  896       896         0 100% /rom
none                     15252        76     15176   0% /tmp
/dev/mtdblock/4           6400      5684       716  89% /jffs
/jffs                      896       896         0 100% /



Does anyone know how OpenWRT can mount the network drive on /jffs like DD-WRT is able to do with smbmount and startup scripts.

The discussion might have continued from here.