Lab 8
Talking Between HardphonesUsing Asterisk
Preliminary DiscussionIn this lab we will use one computer and two VOIP SIP enabled hardphones to allow calls to be made between the two hardphones by going through the Asterisk server.
Instructions:
In this example the instructions are specific to the Grandstream GXP1405 VOIP hardphone.
Connect the two hardphones to the same network the Asterisk virtual machine is connected to.
Determine the IP address assigned of each hardphone by pressing the menu key on the phone.
Select Status from the menu that appears using the navigation keys.
Record the IPv4 address shown.
Configure the hardphones using the GUI interface accessed by entering the IP address of the hardphone in an Internet browser. For example
This page will appear
Enter the administrator’s password, not the user password. The administrator’s default passowrd is
admin
Click on the Accounts tab
This screen will appear
The entries to make on this page are:
Account Active
Select the Yes button by clicking it
Account Name
Enter the name forthe account, such as Asterisk
SIP Server
Enter the IP address of the Asterisk virtual machine. This can be determined by entering ifconfig at the Linux command prompt.
Secondary SIP Server
Enter the IP address of the Asterisk virtual machine. This can be determined by entering ifconfig at the Linux command prompt.
SIP User ID
Enter the password used in the sip.conf file at the secret= line
In this case 1000
Authentication ID
In this case 1000
Authentication Password
Enter the password used in the sip.conf file at the secret= line
In this case 1000
Scroll to the bottom of the page, and then click
Update
If it indicates a reboot is required, click that button next.
Do the same for the second hardphone.
If desired, instead of using a DHCP server to supply the IP addresses, set the addressing of the three computers to use static addresses. For example
Hardphone 1
192.168.1.2 255.255.255.0
Hardphone 2
192.168.1.3 255.255.255.0
PC Running Asterisk in a Virtual Machine
192.168.1.1 255.255.255.0
Set the address in Linux using this command:
ifconfig eth0 192.168.100.100 netmask 255.255.2550 up
After the two hardphones reboot, check connectivity by pinging between all of the devices.
Configure the Asterisk sip.conf and extensions.conf as required to allow calls to be made between these two hardphones using these settings:
For sip.conf
[general]
[1000]
type=friend
host=dynamic
context=default
secret=1000
[1001]
type=friend
host=dynamic
context=default
secret=1001
For extensions.conf
[default]
exten=>100,1,Answer()
exten=>100,n,Playback(hello-world)
exten=>100,n.Hangup()
exten=>1000,1,Dial(SIP/1000,20)
exten=>1001,1,Dialup(SIP/1001,20)
Call extension 100 from each phone. You should here the phrase:
hello world
Next call between the two hardphones and talk to each other using them.
Troubleshooting:
If the phones do not work try the following.
At the Asterisk CLI prompt type
sip show peers
This should show the IP address of each phone.
If the IP addresses are not showing or even if they are but the phones do not connect to the Asterisk server as demonstrated by hearing hello world, ping both phones from the Linux command line, then try the connection again.
If this is not sucessful, recheck the settings in both hardphones, check the linesin sip.conf, and check the lines in extensions.conf.
1
Copyright 2014 Kenneth M. Chipps Ph.D.