Asterisk Notes: Difference between revisions
No edit summary |
No edit summary |
||
Line 187: | Line 187: | ||
'''Unhook ethernet & login''' | '''Unhook ethernet & login''' | ||
cd/tftpboot | cd/tftpboot | ||
tftpboot#wget ftp://10.1.11.36/tftpboot/* | |||
ls (''to show listing'') | |||
etc/network/interfaces | |||
tftpboot#wget ftp://10.1.11.36/tftpboot/* | cp/etc/dhcp3/dhcpd.conf /etc/dhcpd.conf (''to copy config file from dhcpd3 to dhcpd'') | ||
ls (''to show listing'') | |||
etc/network/interfaces | |||
cp/etc/dhcp3/dhcpd.conf /etc/dhcpd.conf (''to copy config file from dhcpd3 to dhcpd'') | |||
Line 212: | Line 198: | ||
ifup eth0 | ifup eth0 | ||
ifconfig | |||
ifconfig | |||
'''Use the following command to see what is happening in real time and control c to get back''' | '''Use the following command to see what is happening in real time and control c to get back''' | ||
tail -f /var/log/syslog | tail -f /var/log/syslog | ||
cntrl c | |||
/etc/init.d/isc-dhcp-server start | |||
'''''If you encounter any errors with your configuration file you can edit it by going to:''''' | |||
nano /etc/dhcp/dhcpd.conf | |||
tail /var/log/syslog ('''''To show tail end of the log''''' | |||
'''''Anytime you need to make a change on the phone you will need to unplug and go through the start up process again''''' | |||
/etc/default/atftpd | |||
/etc/inetd.conf | |||
'''''Go to the line that starts with tftp go to end of line that and change /srvtftp to tftpboot''''' | |||
ps aux | grep tftp | |||
/etc/init.d/openbsd-inetd restart | |||
ps aux | grep tftp | |||
'''''If the srv is still up you have kill the line''''' | |||
nano XMLDefault.cnf.xml ('''''for editing''''') | |||
''Phone will "Phone Unprovisioned" when it is requesting configuration'' | |||
/ | cd/tftpboot | ||
tail/var/syslog | |||
make a copy of the SIPmacaddress.cnf | |||
cp SIPmacaddress.cnf SIP(insert mac address here) | |||
nano /etc/asterisk/sip.conf | |||
Edit file: | |||
[phone2line1] | |||
type=friend | |||
context=local_pod | |||
callerid="phone2line1" <5002> | |||
host=dynamic | |||
dtmfmode=rfc2833 | |||
nano SIP(insert mac address here and use all capital letters).cnf | |||
nano SIPDCefault.cnf | |||
Change the proxy addresses to your computer address | |||
Unplug phone and let configuration files reload | |||
and reconnect with the following command | |||
asterisk -rcvvvvvvvvvvvvv | |||
sip show peers | |||
cp SIPmacaddress.cnf | |||
Edit file by changing phone1 to phone2 on all instances: | |||
"phone2line1" | |||
"phone 2" | |||
Unplug phone and plug back in, after you make changes in asterisk you need it to reread the configuration | |||
asterisk -rcvvvvvvvvvvvvv | |||
reload | |||
sip show peers ''(to show neighbors)'' | |||
Now we need to set up a dial plan that allows the phones to communicate | |||
A key file is called extensions.conf where all kinds of config files are stored, one of the files is called [demo] which we will try to get to work. | |||
nano /etc/asterisk/extensions.conf | |||
[local_pod] | |||
exten => 5001,1,Dial(SIP/phone1line1) | |||
exten => 5002,1,Dial(SIP/phone2line1) | |||
asterisk -rcvvvvvvvvvvvvv | |||
reload | |||
Now can pick up phone and check for dialtone | |||
nano /etc/asterisk/extensions.conf | |||
[demo] to ring a "dummy" line | |||
exten =>6001,1,Goto(Demo,s,1) | |||
You can create another extension and change the caller id by going back to the exten file and entering commands: | |||
exten =>6001,1,Doto(demo,s,1) | |||
exten =>6002, | |||
Now lets see if we can get voicemail working by going to: | |||
''voice-info.com'' | |||
''google "trixbox"'' |
Revision as of 21:51, 7 December 2011
11-28-11 Astrerisk is a free call process, provides support for cards like T1 - it acts like a gateway, or you can employ a service (server to act as the card or gateway) It has become much better over the last five years and has been aroud for 7 or 8 but was no very stable in the beginning. You will find it built into most open source services. You can get asterisk to work on windows but it is not designed for that. The 7900 series of cisco phones work well with asterisk and can get a 7960 for around 20 bucks on ebay.
We will be using Oracle's VirtualBox to download Asterisk to. You will need to create a storage space on your D drive. Make a new folder with your name and semester "Name-FA11" then close.
Next open up VirtualBox settings and under general in the default box find the folder you just made and click ok. Your information will now be saved there.
Next create a new virtual machine by clicking on new machine under OS click on Linux, click next, under RAM use 768 , click next, create new hard disk, click next, VDI, next, Dynammically allocated, next location Astersiks server, default, next, then click create. You should now see that your VM has been created.
You will now nee to change the settings under the network by simply clicking on Network and under network click on adapter and on attatched and change to bridged.
- Next under storage CD/DVD Drive: click icon beside arrow change to choose a virtual disk CNT files under Linux then Ubuntu 10.10. asterisk tty1
You will get a couple of warnings, click on through them. Under language choose your language (English is the only one Franske will have support for) US, enter, under keyboard click no, enter, enter, it will the start to load. Under hostname use Asterisk, enter, yes, enter, enter, under partition move to yes click continue. Make changes to disks move to yes, continue. The base system will now be installed. enter your name in lowercase, password cisco, cisco again yes, no for encrypting and down arrow for no http proxy continue and it will continue installing choose no automatic updates. Under software selection leave them all blank by using tab key to tab through to select continue after installation select yes to install bootloader. Finish by clicking on devices and click on CD/DVD and make sure there is no check mark beside ubuntu. then click continue
Type your name and password that you entered You are not automatically admin to become the admin you have to enter: sudo bash You will see a # to confirm that you are now admin. We will now edit a file by typing: nano /etc/apt/sources.list (nano is the text editor and etc is the file) Click control W US. archive.ubuntu.com Under replace with: enter mirror .rit.edu then repeat control w and change security.ubuntu.com with the mirror.RIT.edu Update by typing aptitude update, enter aptitude full-upgrade, enter, click enter for yes and update starts. After update it will say Current Staus: 0 updates [-94] We will the type: aptitude install asterisk atfpd dhcp3-server enter 001 for USA country code and click continue If there are errors (and ther will be) type: aptitude update enter install aptitude update enter
to restart type: shutdown -r now
and try reinstalling if there are still errors, you will need to log back in and refollow steps to update
We should be able to program settings for 7960 phone nano sip.com nano extensions.com
better notes by Greg 2011 11 28
asterisk.org
open source / free call processor
gateway buy VOIP service from service provider on internet
connects over network to provider with actual gateway
asterisk has been around for 7 - 8 years
early days, not ready for prime time, not stable, poor configuration last 5 years, better many small businesses use asterisk, built into other products, often the engine is asterisk
can be customized
call centers robo dialing
GOALS: Walk through installing asterisk
install on linux (install linux, then install asterisk Cisco 7960 phones popular with asterisk
Virtual box
create folder on D drive with username, semester, and year update default folder in virtualbox general
virtualbox settings -- general New asterisk server linux ubuntu 768 MB ram Create new hard disk VDI (default) Dynamically allocated 8 GB is enough for virtual disk Confirm that drive is installed in expected folder
Create Create
Change Network Setting (click on Network) Attached to: Bridged Adapter (connects virtual machine directly to network card of computer)
ubuntu server file is already on system
Click on Storage click on IDE Controller / Empty click on disk on far right side (next ot IDE Secondary Master) Choose Virtual CD Disk File D:\\CNT Files\Linux Install CDs\ ubuntu-10.10-server-i386.iso
Click Start to start the virtual machine OK through warning about keyboard capture OK through virtual colors OK through audio problems English Enter Install Ubuntu Server OK through mouse pointer OK through color Enter through English Enter through United States no for detect keyboard USA Standard USA keyboard hostname asterisk America/Chicago time zone Guided - use entire disk adn set up LVM Select Disk -- SCSI3 select YES use default, 8.3 GB YES - Write changes to disk
lower corner of screen will show activity to hard disk, CD, and other devices.
Create User Accounts Full Name username password: cisco cisco Yes -- accept weak password NO -- do not encrypt home directory empty -- no http proxy
NO automatic updates
Software to Install Leave blank TAB to reach Continue button the distribution is Oct 2010 current Oct2011 server edition is the same Yes -- install GRUB boot loader to master boot record
Remove virtual CD before
Pull down Devices to --> CD/DVD Devices
Login using name and password that we specified
become administrator
sudo bash cisco
nano /etc/apt/soruces.list
ctrl-w ctrl-r search for us.archive.ubuntu.com replace with mirror.rit.edu In vi this is :1,$s/us.archive.ubuntu.com/mirror.rit.edu/g 14 lines are changed search for security.ubuntu.com replace with mirror.rit.edu :1,$s/security.ubuntu.com/mirror.rit.edu/g 6 lines change ctrl-o enter ctrl-x to exit
_______________________________________________________________________________________________________________
Notes 2011 11 30
The problem with the asterisk install was the age of the operating system. The fix is to upgrade the Ubuntu OS to a later version that is compatible with the current asterisk distribution.
The upgrade process includes the following. 1. login 2. become root via the command
sudo bash
3. Edit the file, /etc/apt/sources.list. Change the phrase, maverick, to the phrase, nantty, on every line.
The vi command phrase is :1,$s/maverick/nantty/g
4. Update via the command
aptitude update
5. Install the upgrade via the command
aptitude full-upgrade Accept this solution: Answer Y to every prompt Click OK for the openbsd-inetd cron atd upgrade Click OK for the cron atd upgrade
2011 12 05
- ! exclamation marks = enter
- nano = edit
Unhook ethernet & login
cd/tftpboot tftpboot#wget ftp://10.1.11.36/tftpboot/* ls (to show listing) etc/network/interfaces cp/etc/dhcp3/dhcpd.conf /etc/dhcpd.conf (to copy config file from dhcpd3 to dhcpd)
Once your plugged back in and have pc and phone plugged into a poe switch
ifup eth0 ifconfig
Use the following command to see what is happening in real time and control c to get back
tail -f /var/log/syslog cntrl c /etc/init.d/isc-dhcp-server start
If you encounter any errors with your configuration file you can edit it by going to:
nano /etc/dhcp/dhcpd.conf tail /var/log/syslog (To show tail end of the log
Anytime you need to make a change on the phone you will need to unplug and go through the start up process again
/etc/default/atftpd /etc/inetd.conf
Go to the line that starts with tftp go to end of line that and change /srvtftp to tftpboot
ps aux | grep tftp /etc/init.d/openbsd-inetd restart ps aux | grep tftp
If the srv is still up you have kill the line
nano XMLDefault.cnf.xml (for editing)
Phone will "Phone Unprovisioned" when it is requesting configuration
cd/tftpboot tail/var/syslog
make a copy of the SIPmacaddress.cnf
cp SIPmacaddress.cnf SIP(insert mac address here) nano /etc/asterisk/sip.conf
Edit file:
[phone2line1] type=friend context=local_pod callerid="phone2line1" <5002> host=dynamic dtmfmode=rfc2833 nano SIP(insert mac address here and use all capital letters).cnf nano SIPDCefault.cnf
Change the proxy addresses to your computer address Unplug phone and let configuration files reload and reconnect with the following command
asterisk -rcvvvvvvvvvvvvv sip show peers cp SIPmacaddress.cnf
Edit file by changing phone1 to phone2 on all instances:
"phone2line1" "phone 2"
Unplug phone and plug back in, after you make changes in asterisk you need it to reread the configuration
asterisk -rcvvvvvvvvvvvvv reload sip show peers (to show neighbors)
Now we need to set up a dial plan that allows the phones to communicate A key file is called extensions.conf where all kinds of config files are stored, one of the files is called [demo] which we will try to get to work.
nano /etc/asterisk/extensions.conf [local_pod] exten => 5001,1,Dial(SIP/phone1line1) exten => 5002,1,Dial(SIP/phone2line1) asterisk -rcvvvvvvvvvvvvv reload
Now can pick up phone and check for dialtone
nano /etc/asterisk/extensions.conf
[demo] to ring a "dummy" line
exten =>6001,1,Goto(Demo,s,1)
You can create another extension and change the caller id by going back to the exten file and entering commands:
exten =>6001,1,Doto(demo,s,1) exten =>6002,
Now lets see if we can get voicemail working by going to: voice-info.com google "trixbox"