Asterisk – Turn your QNAP into PSTN/VoIP Gateway

Asterisk – Turn your QNAP into PSTN/VoIP gateway

I – What is Asterix

II – Where to Use

III – Before Installation

IV – Asterisk Installation

V – Others

Fixed Document From : http://forum.qnap.com/viewtopic.php?f=165&t=16053)

I – What is Asterisk

Asterisk, one of the top feature requests we’ve been getting all the time is now available for EZ-install as QPKG software package. Big shouts go to Laurent (adnovea) who initiated the QPKGization for Asterisk and has done most of the work including writing a comprehensive user guide in QNAP Wiki. For those who might not be familiar with Asterisk or wants to know what it actually can do especially running it on a NAS device please see the paragraph below (referenced from the About page of Asterisk official site)

=========================================================================
What is Asterisk
Asterisk is the world’s leading open source telephony engine and tool kit. Offering flexibility unheard of in the world of proprietary communications, Asterisk empowers developers and integrators to create advanced communication solutions…for free.

Asterisk® is released as open source under the GNU General Public License (GPL), and it is available for download free of charge. Asterisk® is the most popular open source software available, with the Asterisk Community being the top influencer in VoIP.

 

II – Where to Use

Asterisk as a switch (PBX)
Asterisk can be configured as the core of an IP or hybrid PBX, switching calls, managing routes, enabling features, and connecting callers with the outside world over IP, analog (POTS), and digital (T1/E1) connections.

Asterisk runs on a wide variety of operating systems including Linux, Mac OS X, OpenBSD, FreeBSD and Sun Solaris and provides all of the features you would expect from a PBX including many advanced features that are often associated with high end (and high cost) proprietary PBXs. Asterisk’s architecture is designed for maximum flexibility and supports Voice over IP in many protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.

Asterisk as a gateway
It can also be built out as the heart of a media gateway, bridging the legacy PSTN to the expanding world of IP telephony. Asterisk’s modular architecture allows it to convert between a wide range of communications protocols and media codecs.
Asterisk as a feature/media server

Need an IVR? Asterisk’s got you covered. How about a conference bridge? Yep. It’s in there. What about an automated attendant? Asterisk does that too. How about a replacement for your aging legacy voicemail system? Can do. Unified messaging? No problem. Need a telephony interface for your web site? Ok.

Asterisk in the call center
Asterisk has been adopted by call centers around the world based on its flexibility. Call center and contact center developers have built complete ACD systems based on Asterisk. Asterisk has also added new life to existing call center solutions by adding remote IP agent capabilities, advanced skills-based routing, predictive and bulk dialing, and more.

Asterisk in the network
Internet Telephony Service Providers (ITSPs), competitive local exchange carriers (CLECS) and even first-tier incumbents have discovered the power of open source communications with Asterisk. Feature servers, hosted services clusters, voicemail systems, pre-paid calling solutions, all based on Asterisk have helped reduce costs and enabled flexibility.

III – Before Installation;

(from : http://wiki.qnap.com/wiki/Asterisk)

Foreword

SIP(Session Initiation Protocol) is a protocol for VoIP (Voice over IP) used to carry audio exchanges between users through the Internet infrastructure rather than hardwired telephone lines (PSTN). In order to do so there two requirements:

  • Need to have the relevant pieces of software to handle this protocol (it is implemented into the ISP boxes)
  • Need to have a capability to connect from Internet to the PSTN (handled by your ISP when you have the capability to use VoIP with your ISP boxes)

What we suggest to do here is:

  • To first implement on a QNAP server a local PBX (such as an old telephone switchboard) to support several phone lines. The handsets may be either softphones on PCs or IP-Phones.
  • To connect our internet phone network to the outside using our ISP SIP capability.

Exclamation.pngIMPORTANT:
On your router forward the port
5060 to your NAS server
Asterisk Web interface default ID/PWD is
admin/password


IV – Installation of ASTERISK

QPKG installation

  • 1 – Download, install and enable the Asterisk QPKG

 

  • 2 – Click the Web page hyperlink (http: //:8088/asterisk/static/config/cfgbasic.html)

 

  • 3 – Enter the default A/C (admin/password) and you will be prompted to change the password right away

 

  • 4 – Under Dial plan create a new dial plan (see below Configure your Asterisk PBX server)

Configure your Asterisk PBX server

Create profiles (DialPlan)

You may have different types of phone usages to manage (conference rooms, employees, guests, etc.). Each will have different privileges to access or not some areas such as international calls. The profiles are stored in DialPlans. To create the first profile, click on Dial Plans and Save. Leave options as is for this very first profile.

First dialplan

 

  • 5 – Under Users create two new users

a – Create new users

In order to test our Asterisk PBX, we need at least 2 users. Create the users with the here below parameters

  CallerID: 				6000 and 60001
  Name : 				User1 and User2
  DiaPlan: 				DialPlan1
  Enable Voicemail for this User:	Checked

Create users

 

b – Configure Voicemail

Click on Voicemail on the left panel and setup as follow: (we use 999 for the because it’s the one used by default our softphones)

Extension for checking messages  999
Direct Voicemail Dial		checked

Say message Caller-ID		checked
Say message duration		checked
Play envelope			checked
Allow users to review		checked

 

c – Advanced options / Set the language

On the left panel select Options and click on the tab “Languages“. Select the preferred language.

Display Advanced options

On the left panel select Options and click on the tab “Advanced options“. Click on “Show Advanced Options“, additional actions are displayed at the bottom of the left pane.

 

  • 6 – Install 2 soft phones (see below Testing the PBX )

Testing the PBX

Install on two (Windows) computers two softphones for examples. We have used 3CX softphones (http://www.3cx.com).

  • Configure each phone numbers extension 6000 and 6001.
  • Set an ID (name of PC user for example)
  • Click on “Advanced setting” and check “I’m in the office – local IP” and enter your nas IP address
  • Click on button “Appy Changes”. If you forget this step you get error message: “Not connected: Destination not found”

You must be able to talk to each other and do much more like leaving message, parking a call, etc…

 

Debugging

Shall you encounter issues with Asterisk and 3CX, you may enable the debugging window to get some information regarding the problem.

Asterisk 3CX-debug.jpg

Connect your PBX to the outside (add a Service provider trunk)

From the left panel, select Trunks and a new page is displayed with four tabs. There are 4 possibility to connect your IPBX to the outside:

  • using an external hardware box to connect to a standard PSTN line
  • using the VOIP capability and pre-setting of your ISP box if listed
  • setting manually the SIP/IAX parameters for your trunk using the VOIP capability of your ISP box
  • using an hardware to use your connection to support VOIP

 

Analog trunk

Depend of your external hardware. Select “Configure Hardware” from the Asterisk Control Panel left pane and setup the Analog Hardware parameters.

 

Service providers

The list of providers is stored under /etc/asterisk/providers.conf. By default such a list is empty. The provider parameters may listed into the “providers.conf” file to ease the future installation of the trunk. I have created (but of course, I have no way to test all the configuration inside) a list to help the trunk configuration.

Here is an sample of providers.conf for some ISPs. Feel free to correct/update this list.

 

VOIP trunks

Depend of your ISP. Select the type (IAX/SIP), enter Provider Name, Hostname, Username and Password. It assumes the “Provider name” parameters to be define somewhere else in the configuration files.

 

T1/E1/BRI Trunks

Depend of your digital hardware. Select “Configure Hardware” or “mISDN Config” from the Asterisk Control Panel left pane and setup the parameters.

 

V – Others

Asterisk web GUI administration

In order to be able to load the asterisk-gui, the configuration files must be modifies as stated and the Asterisk server restarted.
Then you can use asterisk-gui: http: //:8088/asterisk/static/config/cfgbasic.htmlNOTE: When the “Advanced options” is enable in the GUI, a CLI console will also be available from the GUI.

Backup the Asterisk configuration

In the left panel click on Backup then on Download from Unit. You can save your configuration files on your local disk for future restore if needed.

Required details: How to reload the saved file from the PC to Asterisk for restoring the settings.

How to Remove Asterisk

Asterisk QPKG

  • Uninstall Asterisk QPKG from the QNAP Admin page (this is the “official” QPKG)
VN:F [1.9.22_1171]
Rating: 5.3/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Asterisk - Turn your QNAP into PSTN/VoIP GatewayAsterisk - QNAP'ınızı PSTN/VoIP gateway'e Çevirin, 5.3 out of 10 based on 3 ratings

One Response to Asterisk – Turn your QNAP into PSTN/VoIP Gateway

  1. Peter says:

    Hello, can anyone help me please?
    if i tried du give http:xxx.xxx.xxx.xxx//:8088/asterisk/static/config/cfgbasic.html there is no gui.

    The only message was this:

    Not Found
    The requested URL /:8088/asterisk/static/config/cfgbasic.html was not found on this server.
    Apache Server at xxx.xxx.xxx.xxx Port 80

    the station is a login in http://xxx.xxx.xxx.xxx/ams but it ist not the real gui which you can made dial plans the modell ist a QNAP TS-EC 880 Pro
    Thx for answering

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>