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. 



Environment used 

– ATA Linksys PAP2; 

– 2 analog phones; 

– A hub; 



– 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 ""; 

option domain-name-servers; 

option subnet-mask; 


default-lease-time 600; 

max-lease-time 7200; 

server-name "VOffice"; 


subnet netmask ( 



ATA host ( 

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



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. 





– Access the menu option "Line 1" 

– Line Enable: yes 

– Proxy: 

– Register: yes 

– Display name: 1000 

– Password: 1000 

– User ID: 1000 



– Access the menu option "Line 2" 

– Line Enable: yes 

– Proxy: 

– 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 



type = friend 

username = 1000 

callerid = 1000 

secret = 1000 

host = dynamic 

context = test 



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 



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 D 5060 Unmonitored 

1000/1000 D 5060 Unmonitored 


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

Be Sociable, Share!


Subscribe to our e-mail newsletter to receive updates.

No comments yet.

Leave a Reply