Specifications
PA-001011-03-04 Aastra July 2014
301
echo "Creating a default config file for Aastra phones"
echo "--------------------------------------------------------------"
echo ""
echo "Creating /tftpboot/aastra.cfg..."
echo ""
IFCONFIG=`which ifconfig 2>/dev/null||echo /sbin/ifconfig`
IPADDR=`$IFCONFIG eth0|gawk '/inet addr/{print $2}'|gawk -F: '{print $2}'`
cat > /tftpboot/aastra.cfg <<EOF
# Setup DHCP mode
dhcp: 1
# Setup TFTP server address
tftp server: $IPADDR
# Time server
time server disabled: 0
time server1: pool.ntp.org
time server2: $IPADDR
# Startup URI
action uri startup: http://$IPADDR/xml/startup/startup.php
EOF
chmod 666 /tftpboot/aastra.cfg
echo "Created /tftpboot/aastra.cfg using $IPADDR for the proxy. If the"
echo "IP address of your Asterisk system changes run this script again and reboot."
echo "Reboot your Aastra phones by disconnecting the power to the phone."
echo ""
Template files for the phones (typically located at /var/www/html/startup)
The following file is a template used to create the MAC.cfg file, there must be one file for each
Aastra phone.
Aastra53i.cfg for the 53i
Aastra55i.cfg for the 55i
Aastra57i.cfg for the 57i
Aastra57iCT.cfg for the 57iCT
Aastra6730i.cfg for the 6730i
Aastra6731i.cfg for the 6731i
Aastra6735i.cfg for the 6735i
Aastra6737i.cfg for the 6737i
Aastra6739i.cfg for the 6739i
Aastra9143i.cfg for the 9143i
Aastra9480i.cfg for the 9480i
Aastra9480iCT.cfg for the 9480iCT
In these template files, you can use variables that will be replaced with the corresponding value by
the script.
$$AA_SIPAUTHNAME_AA$$ for the user SIP authentication name
$$AA_SIPSECRET_AA$$ for the user SIP secret
$$AA_SIPUSERNAME_AA$$ for the user SIP username
$$AA_SIPCALLERID_AA$$ for the user SIP caller-id
$$AA_PROXY_SERVER_AA$$ for the name/IP address of the proxy server
$$AA_REGISTRAR_SERVER_AA$$ for the name/IP address of the registrar server
The template files can of course be completed with extra parameters (timezone, softkeys …).