Configuring Linksys PAP2 ATA with Asterisk

 

This guide will demonstrate the process of configuring a Linksys PAP2 ATA with Asterisk to make calls between two regular phones. Operating system used in this tutorial is Debian GNU / Linux (etch), kernel version 2.6.18-5-486 was used. 

 

linksys-pap2-asterisk

Environment used 

– ATA Linksys PAP2; 

– 2 analog phones; 

– A hub; 

 

Requirements 

– Asterisk installed and configured correctly 

 

Installing DHCP 

First you must take care not to put two DHCP servers on the same network, it can be used for a hub to link the local DHCP and ATA. To install the dhcp server will use the APT package manager, as illustrated in the following command. 

 

# Apt-get install dhcp3-server 

 

DHCP Configuration 

To configure the DHCP service is needed to edit / etc/dhcp3/dhcpd.conf. 

option domain-name "voffice.com.br"; 

option domain-name-servers 192.168.1.1; 

option subnet-mask 255.255.255.0; 

 

default-lease-time 600; 

max-lease-time 7200; 

server-name "VOffice"; 

 

subnet 192.168.1.0 netmask 255.255.255.0 ( 

range 192.168.1.100 192.168.1.150; 

 

ATA host ( 

hardware ethernet 00:12:17: FC: 36: AB; 

fixed-address 192.168.1.135; 

 

It can be observed in the above configuration, the IP address of the Linksys ATA has been configured according to their MAC address. 

 

Configuring the Linksys PAP2 ATA 

To configure the two lines of the Linksys ATA is necessary to access it using any browser with an IP address set to the same. 

 

http://IP-DO-ATA/admin/advanced 

 

LINE 1 

– Access the menu option "Line 1" 

– Line Enable: yes 

– Proxy: 192.168.1.1 

– Register: yes 

– Display name: 1000 

– Password: 1000 

– User ID: 1000 

 

LINE 2 

– Access the menu option "Line 2" 

– Line Enable: yes 

– Proxy: 192.168.1.1 

– Register: yes 

– Display name: 1001 

– Password: 1001 

– User ID: 1001 

 

The above options may vary according to the needs of each. Finished the setting, click Save Settings. 

 

Adding the extensions on Asterisk 

To add the extensions in Asterisk you must edit the file / etc / asterisk / sip.conf and add the configuration shown below. 

 

# Vi / etc / asterisk / sip.conf 

 

[1000] 

type = friend 

username = 1000 

callerid = 1000 

secret = 1000 

host = dynamic 

context = test 

 

[1001] 

type = friend 

username = 1001 

callerid = 1001 

secret = 1001 

host = dynamic 

context = test 

 

Adding a context in Asterisk 

Now you must create the context test, the phones can make calls, so you must edit / etc / asterisk / extenions.conf. 

 

# Vi / etc / asterisk / extensions.conf 

 

[Test] 

exten => _XXXX, 1, Dial (SIP / $ (Extensible)) 

exten => _XXXX, Hangup 

 

Final Thoughts 

After carrying out all the settings correctly you must start the asterisk, as illustrated below. 

 

# Asterisk-r 

VOffice * CLI> sip reload 

VOffice * CLI> extensions reload 

VOffice * CLI> sip show peers 

Name / username Host Dyn Nat ACL Port Status 

1001/1001 192.168.1.135 D 5060 Unmonitored 

1000/1000 192.168.1.135 D 5060 Unmonitored 

 

Now test calls can be performed from one analogue phone to other one.

Be Sociable, Share!

Subscribe

Subscribe to our e-mail newsletter to receive updates.

No comments yet.

Leave a Reply