====== ASTLinux ======
http://www.astlinux.org/
http://doc.astlinux.org/userdoc:new-install
http://doc.astlinux.org/userdoc:documentation
http://www.sonoracomm.com/index.php?option=com_content&task=view&id=107
===== Remote Access =====
Use a web browser after accessing via SSH tunnelling:
ssh -p 2222 -l root -L 4443:pbx:443 -L 8088:pbx:8088 -L 8080:ata:80
**ASTlinux GUI**: https://localhost:4443/status.php
**Asterisk-GUI**: http://localhost:8088/static/config/index.html or http://localhost:8088/asterisk/static/config/index.html
===== Installation =====
http://doc.astlinux.org/userdoc:new-install
Download and extract the image file and write it to the flash card:
sudo dd if=Desktop/astlinux-1.1.0.img of=/dev/sdx
===== First Login =====
==== Credentials ====
Console: **root/astlinux**
Web Interface (HTTPS): **admin/astlinux**
https://192.168.1.30/admin/setup.php
==== Serial Console ====
* 19200,n,8,1,xon/xoff
==== Finish Installation ====
- Choose unified UnionFS + Key Disk (reboot)
- Click Finish (reboot again)
==== Install Sound Files ====
Needs Internet connection to download sound files.
http://doc.astlinux.org/userdoc:sounds-packages
**AstLinux Management -> System Tab -> Asterisk Sounds Packages -> core-english-ulaw -> Upgrade/Install -> Sounds Package**
also: ''extra-english-ulaw''
also: ''moh-english-ulaw''
FIXME Is this next line necessary?
Edit path in ''musiconhold.conf'' to be ''/var/lib/asterisk/moh/''.
===== Configuration =====
:!: The main configuration files for ASTLinux are in ''/mnt/kd/rc.conf.d''. If you never used the web interface, that file will not exist so you should edit ''/mnt/kd/rc.conf'' instead. If the ''/mnt/kd/rc.conf.d'' directory exists, do not edit ''/mnt/kd/rc.conf''.
:!: Do not manually edit the files in /etc/asterisk. Use the Edit tab in the web interface. This is due to the design of ASTLinux to run from flash storage and to minimize write operations.
That being said, here is some sample (minimal) web interface configuration.
==== Network ====
ASTLinux has a very powerful firewall and can easily function as a firewall/router edge device on your entire network or it can function as a gateway device to separate your voice and data networks. It can also provide easy and powerful DHCP server, provisioning (TFTP/HTTP) server, etc.
By default, only a single Ethernet interface is enabled (as External Interface) and the firewall and routing functions are disabled. Also, by default, ''eth0'' is set for DHCP so it will automatically be configured for Internet access most of the time.
If you did not configure a DHCP reservation, you will want to set a static IP address:
**AstLinux Management -> Network -> External Interface -> Connection Type -> Static ->**
* Hostname -> PBX
* Domain -> yourdomainname.org
* DNS -> 8.8.8.8
* Static -> 192.168.2.30
* NetMask -> 255.255.255.0
* Gateway -> 192.168.2.1
**AstLinux Management -> Network -> Network Time Settings -> Timezone -> User Defined -> America/Phoenix**
**AstLinux Management -> Network -> Outbound SMTP Mail Relay ->**
* SMTP Server -> mail.yourdomainname.com (with local mail and DNS servers, use IP address)
* SMTP Domain -> yourdomainname.com (be sure to use full e-mail addresses - no shortcuts)
* SMTP Authentication -> Plain
* SMTP Encryption -> SSL - Ignore Cert
* SMTP Username -> smtp
* SMTP Password -> yourchosenpassword
**Save Settings -> Confirm -> Reboot**
Log into the ASTLinux console as root, then run the following command to determine which NIC driver is actually being used (ASTLinux loads quite a few to make sure networking functions out-of-the-box):
dmesg | grep net
Now edit the rc.modules file so that it only loads the NIC drivers you actually use:
**AstLinux Management -> Edit -> rc.modules -> Open File**
Comment out any unnecessary drivers with '#' and save.
===== DAHDI (Analog) Hardware =====
http://doc.astlinux.org/userdoc:dahdi
Create DAHDI configuration if it did not previously exist:
dahdi_genconf
Edit ''/mnt/kd/rc.conf.d/user.conf'' and add/change the ''DAHDIMODS'' setting to load the proper module for your
Digium (or other Zap) card:
* ''DAHDIMODS=wctdm'' #OLD Digium 400p (and clones)
* ''DAHDIMODS=wctdm24xxp'' # NEW Digium cards 410p, etc
* ''DAHDIMODS=rcbfx'' # Rhino 8 and 24 port analog cards
Create a system.conf (old name was zaptel.conf) file in /mnt/kd/dahdi. This will be used after rebooting. Create or edit a chan_dahdi.conf (old name was zapata.conf) file in /mnt/kd/asterisk/.
If your DAHDI hardware does not have hardware echo cancellation, you will need to enable software echo cancellation in the system.conf file:
* ''echocanceller=mg2,1-8''
This specifies use of the mg2 echo canceller on channels 1-8.
==== Sangoma Hardware ====
http://doc.astlinux.org/userdoc:wanpipe
===== Asterisk-GUI =====
http://doc.astlinux.org/userdoc:tt_asterisk-gui
==== Backup ====
Before logging into the Asterisk-GUI for the first time, remember to back up the Asterisk configuration files:
cp -ar /mnt/kd/asterisk /mnt/kd/asterisk.bak
==== Enable Asterisk-GUI ====
:!: Asterisk-GUI is no longer supported with AstLinux 1.2.3 and later.
Create a link to the Asterisk-GUI in the Astlinux web interface:
**Prefs -> General Options -> External URL Link**
http://localhost:8088/static/config/index.html
:!: Try this URL if that URL doesn't work:
http://localhost:8088/asterisk/static/config/index.html
**AstLinux Management -> Prefs -> General Options -> External URL Name**
Asterisk-GUI
==== Configure Admin Credentials ====
Edit ''manager.conf'' from the Edit tab. Leave the ''[webinterface]'' stanza, but add new credentials with:
[admin]
secret = yoursecret ; this will be the user and password for the GUI login
deny = 0.0.0.0/0.0.0.0 ; deny all not specifically permitted
permit = 192.168.2.0/255.255.255.0 ; set appropriately for your network
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
Save and Reload Asterisk.
==== First Asterisk-GUI Login ====
If you get any errors during the first Asterisk-GUI login, restore /mnt/kd/asterisk from backup, fix the problem, reload Asterisk and then log in again.
Now use the Asterisk-GUI page to set up the PBX.
==== Logging ====
To have the CDR logging show the local time zone, use the Edit tab to open cdr.conf:
usegmtime=yes ; log date/time in GMT. Default is “no”
Change this value to “no” to have the system timezone used for the CDR.
==== Dialplan Customization ====
http://forums.asterisk.org/viewtopic.php?f=35&t=72076
===== Troubleshooting =====
tail /var/log/messages
==== Name Resolution ====
If name resolution is not working, that has to be fixed first.
nslookup google.com
cat /etc/resolv.conf
cat /etc/resolv-extern.conf
cat /etc/dnsmasq.conf
cat /etc/dnsmasq.static
Try adding upstream forwarders to dnsmasq using the Edit tab for dnsmasq.static:
server=192.168.1.2
server=8.8.8.8
service dnsmasq restart
==== NTP Timekeeping ====
Once name resolution is working, NTP will probably start working too:
service ntpd restart
tail /var/log/messages