Asterisk Unslung NSLU2 Notes
  1. Hardware Needed
    1. NSLU2
    2. USB IMICRO external hard disk case
    3. 40MB hard drive
  2. Software Upgrade Steps
    1. Unslung
      1. Download firmware
        Unslung-6.10-beta-firmware.zip
      2. Download upgrade utility
        http://www.everbesthk.com/8-download/sercomm/firmware/all_router_utility.zip
        NSLU2-Linux Notes
      3. Place box in upgrade mode
      4. Run upgrade utility
      5. Load Unslung
      6. launch Web GUI
      7. Enable Telnet
      8. Configure network settings so box can see outside world
    2. Format Hard disk
      1. Why using a thumbdrive was a pain in the ass http://www.nslu2-linux.org/wiki/HowTo/UseAMemoryStickAsMainDrive
      2. Web GUI - administration - advanced - disk
      3. Format disk
      4. Disk has to show Formatted(Ext3)
    3. Sling Hard disk
      1. Unplug Disk
      2. Reboot box
      3. telnet in with root uNSLUng
      4. check Web GUI for disk status
      5. send command to sling disk
    4. Install Asterisk
    5. Install vsftpd http://www.nslu2-linux.org/wiki/Optware/Vsftpd?from=Unslung.Vsftpd
  3. Configuration
    1. Sample Configuration http://www.nslu2-linux.org/wiki/Optware/AsteriskSampleConfigurationForSlug
    2. Quick Configuration http://tech.groups.yahoo.com/group/nslu2-asterisk/files/config_unslung/

  4. ipkg notes
    asterisk run at startup notes http://www.nslu2-linux.org/wiki/Optware/Asterisk?from=Unslung.Asterisk
    Linux commands
    ls -la
    cd
    cd ..
    cd /
    How do I create scripts?
    How do I open files on the slug
    ps -pw
    ftp install notes
    Asterisk CLI COMMANDS:
                            !  Execute a shell command
                   abort halt  Cancel a running halt
                   cdr status  Display the CDR status
                 database del  Removes database key/value
             database deltree  Removes database keytree/values
                 database get  Gets database value
                 database put  Adds/updates database value
                database show  Shows database contents
             database showkey  Shows database contents
                debug channel  Enable debugging on a channel
                  debug level  Set global debug level
                dnsmgr reload  Reloads the DNS manager configuration
                dnsmgr status  Display the DNS manager status
                         help  Display help list, or specific help on a command
                         load  Load a dynamic module by name
                logger reload  Reopens the log files
                logger rotate  Rotates and reopens the log files
         logger show channels  List configured log channels
             no debug channel  Disable debugging on a channel
                       reload  Reload configuration
           restart gracefully  Restart Asterisk gracefully
                  restart now  Restart Asterisk immediately
      restart when convenient  Restart Asterisk at empty call volume
                    rtp debug  Enable RTP debugging
                 rtp debug ip  Enable RTP debugging on IP
                 rtp no debug  Disable RTP debugging
                    set debug  Set level of debug chattiness
                  set verbose  Set level of verboseness
            show applications  Shows registered dialplan applications
             show application  Describe a specific dialplan application
            show audio codecs  Shows audio codecs
                 show channel  Display information on a specific channel
                show channels  Display information on channels
            show channeltypes  Show available channel types
                  show codecs  Shows codecs
                   show codec  Shows a specific codec
         show config mappings  Show Config mappings (file names to config engines)
                show dialplan  Show dialplan
            show file formats  Displays file formats
               show functions  Shows registered dialplan functions
                show function  Describe a specific dialplan function
                   show hints  Show dialplan hints
            show image codecs  Shows image codecs
           show image formats  Displays image formats
                 show license  Show the license(s) for this copy of Asterisk
         show manager command  Show a manager interface command
        show manager commands  List manager interface commands
       show manager connected  Show connected manager interface users
                 show modules  List modules and info
            show modules like  List modules and info
                show switches  Show alternative switches
                  show uptime  Show uptime information
                 show version  Display version info
           show version files  Show versions of files used to build Asterisk
            show video codecs  Shows video codecs
                show warranty  Show the warranty (if any) for this copy of Asterisk
                  soft hangup  Request a hangup on a given channel
              stop gracefully  Gracefully shut down Asterisk
                     stop now  Shut down Asterisk immediately
         stop when convenient  Shut down Asterisk at empty call volume
                       unload  Unload a dynamic module by name
    
    VSFTPD notes:
    You'll need to add line like
    echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
     to your /unslung/rc.xinetd file
     -- see the wiki at http://www.nslu2-linux.org for more info
    
    ftp 192.168.82.1
    Connected to 192.168.82.1.
    500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp
    Connection closed by remote host.  
    
    I now that from http://www.nslu2-linux.org/wiki/Unslung/Vsftpd that 
    
    
    Quote:
    * Problem: When trying to ftp into the slug, it gives a message 500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp"" 
    
    Solution: Change the echo line in /unslung/rc.xinetd to: echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf  
    
    1. Create the empty jail directory as root with mkdir -p /usr/share/empty 
    2. Ensure vsftpd.conf is in /opt/etc (the default vsftpd.conf is below) 
    3. If you use the default vsftpd.conf make sure that /opt/var/log exists and is writable by vsftpd 
    4. Create (or modify existing) diversion script /unslung/rc.xinetd . Previous suggestions were broken in that multiple lines could be added or other services, like telnetd, become disabled.
    A good solution (not just for vsftpd, but for all applications needing entries in inetd.conf) seem to be: 
     
    #!/bin/sh
    # /unslung/rc.xinetd
    
    if [ ! -f /etc/inetd.conf ] || !(grep vsftpd /etc/inetd.conf -q) ; then
      echo "ftp stream tcp nowait root /opt/sbin/vsftpd /opt/etc/vsftpd.conf" >>/etc/inetd.conf
    fi
    
    return 1 
    
    1. Note: Make sure that the file /unslung/rc.xinetd file ends with the line "return 1" in order for inetd to be started when /etc/rc.d/rc.xinetd is executed 
    2. Restart xinetd with /etc/rc.d/rc.xinetd 
    3. Assure yourself that you use a linux compatible texteditor otherwise the CR/LFs? will be wrong and your ftp-server will not start!!