How to use an analog telephone with Asterisk

As we already know, we can connect VoIP telephones or softphones to an Asterisk server in order to make phone calls over the internet. But what if we want to make calls over the internet using a desk/home phone connected to a classic telephone line (PSTN – such as Romtelecom)? To accomplish that we need a telephone adapter (ATA) or an analog card, which links the digital network (Asterisk) with the analog network (analog telephone line). More information on how to connect an analog line to an Asterisk server can be found in the article "About VoIP".
In the following, we describe how to setup such an equipment in order to functionally integrate an analog phone with an Asterisk server. We used a Linksys PAP-2T telephone adapter and an Asterisk server based on trixbox CE v2.6.2.3 distribution.

Connection

The Linksys PAP-2T telephone adapter has one RJ45 (Internet) port, two RJ11 ports (Line 1 and Line 2) and a power supply port. 
PAP-2T
Connect the local Ethernet patch cable in the RJ45 port labeled "Internet". Connect the analog phone in the RJ11 port labeled "Line 1". Plug in the power supply and connect it to the adapter. The green lights on the case should now flash intermittently.

Configuration/Installation

Analog extension setup

In order to be able to make calls from the analog telephone, connected to the VoIP adapter, we need to assign (in the Asterisk server) an extension corresponding to the analog telephone. The configuration steps are:
  • If no available extension exists, define one in the Asterisk server
  • Find the IP address of the adapter to which the telephone is connected and, using a web browser, access its graphic setup interface
  • The extension’s specific data is used (username and password) as well as the setup data specific to the corresponding VoIP protocol (SIP or IAX).

Phone adapter setup

The basic settings of the Linksys PAP-2T telephone adapter are made from the analog telephone connected to "Line 1" port.  Afterwards, all other settings will be on the web administration interface of the adapter.
In order to access the setup menu of the adapter, press "*" 4 times on the analog phone. The configuration commands are:
**** Enter Menu
100# Check DHCP - in the headset it is heard whether this service is active or not
101# Set DHCP -> for disable press “0”; to enable press "1"
110# Check IP address
111# Set IP address -> Enter the IP address using the telephone keys. Use "*" for dot.  If DHCP is enabled, the message "Invalid Option" is played.
120# Check Network Mask
121# Set Network Mask -> – Enter the network mask using the telephone keys. Use "*" for dot. If DHCP is enabled, the message "Invalid Option" is played.
130# Check Gateway
131# Set Gateway -> Enter the gateway address uising the telephone keys. Use "*" for dot. If DHCP is enabled, the message "Invalid Option" is played.

Web administration interface

After retrieving the IP address  (110# in the setup menu) assigned to the PAP-2T telephone adapter, use a browser to connect to the admin interface. The default setting do not require password assures for both regular (User) or administrator (Admin) accounts. Select the Admin profile and choose "Advanced view" option.

Configure "Line 1" port

  • Choose the "Line 1" section (or "Line 2" depending on the port used). In our case the phone has been connected to the "Line 1" port.
  • Check the "Line Enable" option is set to "Yes"
  • Fill in  the "Proxy" and "Outbound Proxy" parameters with the address of the Asterisk server.
    Configurare PAP-2T
  • Fill in the "Display Name", "User ID" and "Auth ID" parameters with the specific user values of that extension. The extension used for tests has been previously set up on the Asterisk server.
  • Fill in the "Password" parameter with the extension password
    Configurare PAP-2T
  • Replace the existing setup for the "Dial Plan" parameter with the values (*x.|**x.|x.). These values allow dialing destinations beginning with "*". In our case, such destinations may be Asterisk predefined short codes (for ex. "*43"  - the short code for the echo application). Also, the "x." part is a wildcard that allows dialing to anywhere, be it an internal extension or an outgoing destination.
    Configurare PAP-2T
  • Save the settings using the "Save Settings" button.
Now, the adapter is configured. If the "110" extension is called, the analog telephone connected into the "Line 1" port of the telephone adapter will ring.
The same procedure is used to install an additional analog telephone (if necessary) in the second port of the telephone adapter ("Line 2"). The second extension corresponding to the additional phone (for ex. "111") must be defined in the Asterisk server.  

Comments