Asterisk – QNAP’ınızı PSTN/VoIP gateway’e Çevirin

I – What is Asterix

II – Where to Use

III – Download Links

IV – Asterisk Advance Installation & Usage

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.

=========================================================================

[Changelog]

v1.4.22.1b

- Fixed asterisk not able to start/stop correctly

v1.4.22.1a

Initial release.

=========================================================================

Note the default username and password is admin/password.

III – Download Links

[Download]

Asterisk v1.4.22.1b ARM x09 [Applied models: TS-109/ 209/ 409/ 409U]

Asterisk v1.4.22.1b ARM x19 [Applied models: TS-119/ 219]

Asterisk v1.4.22.1b x86 x39 [Applied models: TS-239/ 439/ 509/ 639/ 809/ 809U-RP/ 839, SS-439/ 839]

[Free VoIP software phone]

3CX VoIP phone – FREE SIP SoftPhone for Windows

X-Lite VoIP softphone Free and powerful SIP softphone for Windows

[Support & Docs]

Official Asterisk site

Voip-Info (contains the most resources for anything VoIP wise)

[Feedback]

Do not hesitate to let me know if there are bug reports, feature addons, etc… or you’d like to suggest any interesting applications for Asterisk, etc..

IV – Asterix Advance 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.

There are 2 possibilities to install Asterisk on your NAS

  • Through the Asterisk QPKG available from the QNAP forum
  • Using the IPKG Manual installation (requires IPKG-Optware QPKG to be installed and enabled on your NAS)

Exclamation.pngIMPORTANT:

On your router forward the port 5060 to your NAS server

Asterisk Web interface default ID/PWD is admin/password

Installation of ASTERISK

QPKG installation

  • Download, install and enable the Asterisk QPKG
  • Click the Web page hyperlink (http: //:8088/asterisk/static/config/cfgbasic.html)
  • Enter the default A/C (admin/password) and you will be prompted to change the password right away
  • Under Dial plan create a new dial plan (see below Configure your Asterisk PBX server)
  • Under Users create two new users
  • Install 2 soft phones (see below Testing the PBX )

Manual installation on x86/ARM platforms

# ipkg update
# ipkg install asterisk14
# ipkg install asterisk-gui
# ipkg install asterisk-sounds

NOTE:

I recommand to select the GUI v2.0 as mentioned above.

There is also a “asterisk14-gui” package for the GUI 1.4. but it may lead you to the wizard and lock. You can come back to the login page and select from the left panel the actions to perform but you may also encounter issues to create users.

The asterisk16 package has some issues and the GUI is keeping reloading – There are some known bugs and until the ipkg will not download the fixed v1.6 version, we recommand to use the v1.4

IMPORTANT: with the IPKG installation, replace “/usr” by “/opt”

Save the default configuration files

It is recommended to back up your configuration files before you continue.

To achieve this just copy /etc/asterisk under different name:

cp -r /opt/etc/asterisk /opt/etc/asterisk.backup

NOTE:
on X86	/opt = /share/xx0_DATA/.qpkg/Optware/
on ARM	/opt = /share/xx0_DATA/optware/opt

Configure ASTERISK (manual installation)

There are mainly two files that you should modify.

The /opt/etc/asterisk/manager.conf file will be modified and a new user added. The administrator user will enable the Asterisk Administation through the GUI.

(much easier than editing the files for a begineer)

enabled = yes
webenabled = yes
httptimeout = 60

[administrator]
secret = mypassword
read = system,call,log,verbose,command,agent,user,config
write = system,call,log,verbose,command,agent,user,config

Then you have to modify /opt/etc/asterisk/http.conf:

enabled=yes
enablestatic=yes
bindaddr=0.0.0.0

Start & Stop Asterisk

Using a SSH console

Asterisk can be launched as a deamon or with the CLI (Command Line Interface)

IPKG installation (manual installation)

# /opt/sbin/asterisk –vvvgc		Start in debug mode with the CLI
*CLI> stop now				Stop Asterisk from the CLI
*CLI> module reload			Restart Asterisk (for example after a file configuration modification)

# /opt/sbin/asterisk			Start as a deamon
# /opt/sbin/asterisk -rx 'stop now'	Stop Asterisk (-rx sends a CLI command)
# /opt/sbin/asterisk -r			Open the CLI console (type quit to exit the CLI)

QPKG installation

# /usr/sbin/asterisk -vvvgc -C /etc/asterisk/asterisk.conf
# /usr/sbin/asterisk -r -C /etc/asterisk/asterisk.conf
...

Using the QPKG page

  • Enable or Disable Asterisk from the QPKG administration page

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.

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

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

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

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.

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.

Remove Asterisk (IPKG installation)

After manual installation

# /opt/sbin/asterisk -rx 'stop now'
# ipkg remove asterisk-sounds
# ipkg remove asterisk-gui
# ipkg remove asterisk14
  • Uninstall Asterisk QPKG from the QNAP Admin page (this is a small QPKG)

Asterisk QPKG

  • Uninstall Asterisk QPKG from the QNAP Admin page (this is the “official” QPKG)
VN:F [1.9.22_1171]
Rating: 1.0/10 (1 vote 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, 1.0 out of 10 based on 1 rating

One Response to Asterisk – QNAP’ınızı PSTN/VoIP gateway’e Çevirin

  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>