Home » Incredible PBX » Ubuntu/Debian (Page 13)

Category Archives: Ubuntu/Debian

The Most Versatile VoIP Provider: FREE PORTING

Some Fresh CallerID Magic for Incredible PBX 13-13

It’s been more than 10 years since we first introduced CallerID Trifecta for Asterisk® and the FreePBX® platform. A few months later it morphed into CallerID Superfecta and, as they say, the rest is history. Today CallerID Superfecta is used by over a million people around the globe to obtain CallerID Name (CNAM) information from over 70 different lookup sources. WOW! Just call me the Proud Papa. What a journey it has been, and our special thanks to the dozens of contributors.

Unfortunately, for those in the United States, most of the lookup sources now are commercial enterprises much like the original Bell Sisters that monopolized CallerID information by keeping it proprietary instead of forwarding CallerID Name data together with the CallerID number of incoming calls. In fact, for many users, the cost of CallerID lookups now is more expensive than the cost of the VoIP trunks carrying the calls. While we can’t solve the problem, we can make the cost of these CallerID lookup services considerably cheaper using a neat little trick with CallerID Superfecta.






Here’s the problem. Many cell phone users don’t subscribe to any service that keeps track of the caller’s identity. The same is true for those using services such as Google Voice. When you receive a call from one of these users, the CNAM provided for the caller will either show something like "Mobile Phone User" or the city and state of the caller’s cellphone provider. This doesn’t keep the commercial CNAM providers from dinging you every time you receive one of these calls. And if your girlfriend calls you a hundred times a month, the commercial CNAM providers charge you for a hundred lookups even when the calls are from the same caller. That ends today. Once you implement this new CallerID add-on, you’ll only get billed for a single CNAM lookup regardless of how many times that person calls your PBX. Better yet, with a little effort, you can quickly replace the CNAM entries of the mystery cellphone and Google Voice callers by inserting their actual names into your Asterisk phonebook using either the FreePBX GUI or the Asterisk CLI. We’ll show you how.

Here’s the trick. CallerID Superfecta lets you prioritize source lookups when incoming calls hit your PBX. For example, you can lookup the CallerID number in AsteriDex and the Asterisk Phonebook in a fraction of a second at no cost. Once there’s a match on the CallerID number of the caller, additional lookups stop. So what we want to do is prioritize the lookups so that the free sources are used before any commercial lookup service is triggered. For the commercial CNAM source in the U.S., we’re going to use OpenCNAM in our examples because their service is one of the easiest and least expensive to implement. All OpenCNAM lookup options are less than a half a cent per lookup. By placing OpenCNAM third in the Default Superfecta lookup sequence, it will only be used when there is no match in either AsteriDex or the Asterisk Phonebook.




Getting Started. It would obviously be a hassle to have to add every caller to one of these phonebooks every time a call arrives on your PBX. So the other half of today’s magic is to automatically add an entry to the Asterisk Phonebook every time a call hits your PBX. Then, the next time you receive a call from that same number, CallerID Superfecta will be able to find it in your free databases instead of querying OpenCNAM for yet another commercial lookup. As a general rule, in the United States, phonebook data is not copyrightable. However, you should consult an attorney for questions regarding the legality of this methodology as it applies to any particular CNAM lookup service.

We’re aware that CallerID Superfecta has had a caching option which provides similar functionality; however, users have reported mixed results and data corruption with that feature so we’ll be implementing a slightly different solution that relies on Asterisk’s extremely reliable SQLite3 database. This also provides the flexibility to customize the entries after completion of a call for more accurate CNAM information on subsequent calls. Unfortunately, a CNAM entry of ATLANTA, GA doesn’t tell you much about the caller even though you paid for the lookup. By inserting these call entries in the Asterisk Phonebook, you then have the option of easily customizing them in multiple ways. Not only will this provide better CNAM data on subsequent inbound calls, but the phonebook can also be used to make outgoing calls and to produce an alphabetized phonebook listing as well.

cd /var/lib/asterisk
sqlite3 astdb.sqlite3 "select key,value from astdb where key LIKE '%cidname/%' order by value"

Upgrading Asterisk Phonebook Module. Before we get too deep in the weeds, let’s get your Asterisk Phonebook module in FreePBX upgraded to resolve a bug in the version that ships with Incredible PBX which won’t let you edit phonebook entries without also adding a speed dial number for each entry. For generic FreePBX platforms, you can use Module Admin to upgrade the Phonebook module. For Incredible PBX platforms, log into your server as root and issue these commands:

cd /root
./gpl-install-fpbx phonebook

Activating CallerID Superfecta. There are three steps in activating CallerID Superfecta. First, configure the Default Scheme for CallerID Superfecta in Admin:CID Superfecta using the settings we previously displayed. Use the Arrow keys to properly order the three lookup sources: AsteriDex, Asterisk Phonebook, and OpenCNAM.



Be advised that there is a credentials mismatch in the Default setup for AsteriDex. To correct this, open the Default configuration for Superfecta and click on the Tool icon to the left of AsteriDex. The username must be root, and the password is passw0rd with a zero. Save your settings.

Next, you need to create and fund an account at OpenCNAM.com. Once your account is established, copy your credentials and insert them into the OpenCNAM lookup source by clicking on OpenCNAM’s tool icon :



Once you have saved the Default Scheme, then you need to enable CallerID Superfecta for each of your Inbound Routes under the Other tab in Connectivity:Inbound Routes:



Adding Hook for Inbound Call Processing. One of the decade-old shortcomings of FreePBX has always been the inability to insert dialplan code into the Inbound Call process without forever damaging your ability to add additional DIDs moving forward. While extensions_override_freepbx.conf lets you extract and manipulate large chunks of FreePBX code, the drawback is that once you do that, the flexibility provided by the GUI goes up in smoke unless you remember to always move the newly generated dialplan code back into the override context.

We much prefer a simpler way of inserting custom dialplan code into the Inbound Call processing routine, but it requires a change in the FreePBX Core module. We would caution you about using this except on Incredible PBX 13-13 servers running under CentOS 6 or 7 or Ubuntu 18.04 with Signature Checking Disabled. It will trigger nasty signature checking errors on the FreePBX Dashboard. See the next section for a workaround on generic FreePBX 13 platforms. On Incredible PBX 13 servers, login as root and issue the following commands making sure that you expand the last two lines into a single command before executing it:

cd /var/www/html/admin/modules/core
sed -i "s|new ext_noop('CallerID Entry Point')|new ext_gosub('1','s','sub-log-caller')|" \\
functions.inc.php
mysql -u root -ppassw0rd asterisk -e "update admin set value='true' \\
where variable='need_reload'"
amportal a r

Next, we need to add some supplemental dialplan code to extensions_custom.conf. This code actually populates the Asterisk Phonebook with the new call entries each time a call is received by your PBX:

cd /tmp
wget http://incrediblepbx.com/sub-log-caller.tar.gz
tar zxvf sub-log-caller.tar.gz
rm -f sub-log-caller.tar.gz
cd /etc/asterisk
cat /tmp/sub-log-caller.txt >> extensions_custom.conf
fwconsole reload
amportal restart

Disabling Module Signature Checking. If you’re running FreePBX 13 behind a secure firewall that blocks web access to FreePBX for anonymous users, then here’s a simple way that you can apply the patch above and take advantage of the sub-log-caller functionality without having to endure module signature errors within FreePBX. Simply disable Module Signature Checking. Here’s how:

cd /var/www/html/admin/libraries
sed -i 's|"SIGNATURECHECK", true|"SIGNATURECHECK", false|' modulefunctions.class.php
mysql -u root -ppassw0rd asterisk -e "UPDATE notifications SET candelete =  '1' WHERE  true;"
mysql -u root -ppassw0rd asterisk -e "DELETE FROM notifications WHERE true;"
mysql -u root -ppassw0rd asterisk -e "UPDATE freepbx_settings SET value='0' WHERE \\
keyword='SIGNATURECHECK';"
amportal restart

Adding CNAM data to CDR Listings. One of our concerns with the current CDR implementation in FreePBX is the lack of display of CNAM data for most entries in CDR listings. Currently, the only way to decipher the CNAM information is to use your mouse to hover over each of the CallerID numbers. We much prefer displaying both CallerID Name and Number in the CallerID column of CDR Reports. Here’s how to fix it:

cd /var/www/html/admin/modules/cdr
sed -i "s|cdr_formatSrc(\$row\['src'], \$row\['clid']);|cdr_formatSrc(\$row\['clid'], \\
\$row\['clid']);|" page.cdr.php
amportal a r

Managing Your Asterisk Phonebook. As we mentioned, there are a couple of ways to display and/or update entries in your Asterisk Phonebook that have been populated with OpenCNAM lookups. From the Asterisk CLI, you can display entries like this: database show cidname.

You also can add or update entries using the Asterisk CLI like this:

database put cidname 8431234567 "Mundy, Ward"

The simplest method to manage your Asterisk Phonebook is from within the FreePBX GUI. Simply navigate to Admin:Asterisk Phonebook. There you can edit individual entries and replace generic CNAM entries such as Atlanta, GA within something more descriptive of the caller’d identity. You also have the ability to export the data and even create speed dial entries for frequently called parties. Once Speed Dial numbers have been created, you can reach the party from any phone connected to your PBX by dialing *0 plus the speed dial number.

Finally, you need to complete some additional steps to implement the Spam Call Blocker as documented in this tutorial. Enjoy!

Originally published: Wednesday, May 30, 2018  Updated: Monday, November 26, 2018


Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It’s the best Asterisk tech support site in the business, and it’s all free! Please have a look and post your support questions there. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of users just like you. You won’t have to wait long for an answer to your question.



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

Dare to Compare: The Best (free) VoIP Offerings for 2018



Last week we showed you how to get 10 months of free hosting for your Incredible PBX® in the Cloud. And today we present our semi-annual survey of the latest and greatest VoIP offerings for 2018. The beauty of the cloud platform is you can try all of them for less than a penny an hour and decide for yourself which free offering best meets your needs. This year we’ve ushered in new Asterisk® 13 LTS releases of Incredible PBX® on the CentOS, Ubuntu, and Raspberry Pi platforms as well as new versions for Issabel 4 and VitalPBX. To sweeten the pot even further, we nailed down a new Cloud-based offering for $10 a year that makes a perfect VOIP sandbox for our CentOS platform. For 2018, we also secured new (free) DID offerings in the U.S. and announced a Nerd Vittles exclusive providing access to 300+ VoIP providers worldwide, all at wholesale prices. And, last but not least, we introduced Digium’s newest IP phones for Asterisk including a $59 model that makes a perfect VoIP companion.



Choosing the Best VoIP Platform for Your Needs

Choosing a VoIP platform is partially a subjective decision, but there also are some glaring red flags to consider. We suggest you begin by deciding whether your preferences include any must-have’s. Do your requirements mandate an open source solution? Do you need text-to-speech and voice recognition? Does the operating system have to be Linux-based and, if so, must it be CentOS, Debian, or Ubuntu? If you’ll be using SIP phones, must the platform include phone provisioning software for your phones, or is the ability to purchase it as an add-on sufficient? Is paid support important in making your platform decision and how much are you prepared to pay? Are automatic or pain-free software updates critical in making your selection? Is migration from an existing platform a factor? Does a preconfigured, secure firewall matter, or are you prepared to do it yourself or take your chances? Before choosing to ignore security, read this RIPS analysis of FreePBX®. Here’s a snippet from the article. Read it carefully. It’s your phone bill.

Since FreePBX is written completely in PHP, we decided to throw it into our code analysis tool RIPS. The results were more than surprising and should tell you why a rock-solid firewall is absolutely essential.

The total amount of detected vulnerabilities is very high. Luckily, the majority of the detected vulnerabilities are inside the administration control panel, such that attackers either need to steal a valid account or they have to trick an administrator into visiting a malicious website that triggers one of the critical vulnerabilities. For example, a remote command execution vulnerability could be triggered by a less critical cross-site scripting vulnerability. By chaining both vulnerabilities, the severity is increased drastically and can lead to full server compromise.

In choosing which platforms to include today, we eliminated platforms which we considered too complicated for the average new user to configure. We also eliminated any platform that did not offer at least a free tier of service with a reasonably complete feature set as part of their offering. So here’s our Pick of the Litter.

We must confess that we are partial to the Incredible PBX offerings because they provide a turnkey GPL platform with minimal configuration required on your part. Regardless of platform, all come standard with a preconfigured firewall and about three dozen applications for Asterisk that will help you learn everything there is to know about VoIP telephony.

VoIP Platform Feature Summary

Aggregation: Incredible PBX 13-13 for CentOS/SL
License: Open Source GPL
VoIP Platform: Asterisk 13
GUI: FreePBX 13 GPL modules
O/S: CentOS/SL 6.9 or 7
Phone Provisioning: Open Source
Text-to-Speech/Voice Recognition: Yes/Yes
Software Updates: Automatic Update Utility included
Migration Tools: No
Security: Fail2Ban + Preconfigured Firewall Whitelist
Security Rating (as delivered): Secure
Comments: Lean & Mean or Whole Enchilada installers as well as ISO available

Aggregation: Incredible PBX 13-13 for Raspbian
License: Open Source GPL
VoIP Platform: Asterisk 13
GUI: FreePBX 13 GPL modules
O/S: Raspbian 7
Phone Provisioning: Open Source
Text-to-Speech/Voice Recognition: Yes/Yes
Software Updates: Automatic Update Utility included
Migration Tools: No
Security: Fail2Ban + Preconfigured Firewall Whitelist
Security Rating (as delivered): Secure

Aggregation: Incredible PBX 13-13 for Ubuntu
License: Open Source GPL
VoIP Platform: Asterisk 13
GUI: FreePBX 13 GPL modules
O/S: Ubuntu 18.04
Phone Provisioning: Open Source
Text-to-Speech/Voice Recognition: Yes/Yes
Software Updates: Automatic Update Utility included
Migration Tools: No
Security: Fail2Ban + Preconfigured Firewall Whitelist
Security Rating (as delivered): Secure
Comments: Lean & Mean or Whole Enchilada installers

Aggregation: VitalPBX
License: Closed Source
VoIP Platform: Asterisk 13
GUI: Free and Commercial modules
O/S: CentOS 7
Phone Provisioning: Free
Text-to-Speech/Voice Recognition: Optional/Optional
Software Updates: Automatic
Migration Tools: Yes
Security: Fail2Ban + User-Configurable Firewall
Security Rating (as delivered): Insecure
Comments: Incredible PBX add-on now available including TM3 firewall.

Aggregation: Incredible PBX for Issabel 4
License: Open Source GPL
VoIP Platform: Asterisk 13
GUI: FreePBX 11 GPL modules
O/S: CentOS 7
Phone Provisioning: Open Source
Text-to-Speech/Voice Recognition: No/No
Software Updates: Semi-Automatic
Migration Tools: No
Security: Fail2Ban + Unconfigured Firewall
Security Rating (as delivered): Secure with Incredible PBX add-on
Comments: Incredible PBX add-on provides secure platform

Aggregation: FusionPBX for FreeSWITCH
License: Open Source MPL 1.1
VoIP Platform: FreeSWITCH 1.6
GUI: FusionPBX
O/S: Debian 8
Phone Provisioning: Free
Text-to-Speech/Voice Recognition: Optional/Optional
Software Updates: Automatic
Security: Fail2Ban + User-Configurable Firewall
Security Rating (as delivered): Secure with mods below
Comments: Incredible PBX firewall add-on now available .

Aggregation: Incredible PBX for Wazo
License: GPL3 Open Source
VoIP Platform: Asterisk 15 RealTime
GUI: Wazo GPL3 modules
O/S: Debian 9
Phone Provisioning: Extensive Open Source
Text-to-Speech/Voice Recognition: Yes/Yes
Software Updates: Automatic or 2-minute Manual
Migration Tools: No
Security: Fail2Ban + Preconfigured Firewall
Security Rating (as delivered): Secure WhiteList with Incredible PBX add-on
Comments: High Availability & Call Center GPL3 Modules

Aggregation: FreePBX Distro a.k.a. AsteriskNOW
License: Closed Source
VoIP Platform: Asterisk 13/14/15
GUI: FreePBX GPL and Commercial modules
O/S: Closed-source CentOS fork
Phone Provisioning: Open Source (minimal) or Commercial
Text-to-Speech/Voice Recognition: Optional/No
Software Updates: Manual from Hidden Repo
Migration Tools: Yes
Security: Fail2Ban + User-Configurable Firewall
Security Rating (as delivered): Insecure
Comments: Extensive commercial NagWare preinstalled

 

Deploying a Local Server vs. Cloud Platform

We’ve always been big fans of local servers because you have almost total control of your own destiny. This was especially true when the Raspberry Pi came along to take the financial pain out of the server equation. But the price of Cloud-based servers has continued to plummet. For 2018, you can run any of our favorites on the least expensive platform at Vultr or Digital Ocean for $2.50 a month. And, if you hurry, your first 10 months are free at Vultr. Spending another 50 cents buys you automatic backups.1 And, for the Incredible PBX 13-13 build with CentOS 6.9 (64-bit), we’ve found a deal at HiFormance that offers a high-performance OpenVZ platform at an annual cost of just $10. The technical specs are impressive (even better if you sign up for 3 years), and we don’t think you’ll find a comparable deal with anything near comparable performance and specs anywhere, period. You get your choice of hosting sites including New York, Chicago, Los Angeles, Buffalo, Atlanta, and Dallas. Complete tutorial available here.

NOTE: OpenVZ/SolusVM platforms not suitable for CentOS 7, Debian 9, or Ubuntu 18 implementations, and some providers do not yet support Ubuntu 18.04 platform although Vultr and Digital Ocean both do.


Available Free Trunks for VoIP Servers

For many years, we’ve offered free Google Voice connectivity with our VoIP platforms. And that remains true at least for a few more weeks. On all of the Incredible PBX platforms, Google Voice trunks can be set up to make free calls in the U.S. and Canada provided you have a U.S. residence and a U.S. cellphone number to verify that you are who you say you are. There’s even a ray of hope that the Simonics gateway may allow you to continue using Google Voice after Google Voice’s mid-June drop-dead date for XMPP. Details here. But what about the rest of the world. For 2018, we solved the problem by offering free DID trunks for inbound calls and a collection of 300 wholesale VoIP carriers worldwide to make outbound calls at the same wholesale rates offered to the very largest resellers. Simply pay a 13% surcharge in lieu of the $650 annual fee, and TelecomsXchange (TCXC) will provide you access to their entire suite of wholesale carriers together with state-of-the-art tools to manage all of the services.2 The Nerd Vittles setup tutorial is available here. Enjoy!

Published: Monday, March 5, 2018  Updated: Sunday, May 27, 2018



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

  1. On the Vultr and Digital Ocean $2.50 platforms, be sure to (1) create a 1GB swapfile once you’ve chosen your operating system. (2) Then, for Vultr, issue the following command before beginning the Incredible PBX install: apt-get install cloud-init.
    (3) Now complete the steps outlined in your preferred Nerd Vittles tutorial, and you’ll be all set in about 15 minutes. []
  2. Our special thanks to TelecomsXchange. They have generously offered to contribute a portion of the wholesale surcharge to support the Incredible PBX open source project. []

Cloud 9: Free Incredible PBX in the Cloud Hosting until 2019




These deals don’t come along every day so we’re interrupting our regular programming to alert you to a terrific, limited time cloud hosting offer for first-time users of Vultr. If you hurry, you can take advantage of a $25 credit on Vultr which translates into 10 free months of cloud hosting service. We can’t say enough about Vultr. They’ve been one of our key resources for development and testing of new releases of Incredible PBX for many years. Historically, they’ve supported our open source projects through generous referral revenue although that does not apply with this special offer. If you’ve always wondered whether cloud hosting was a viable alternative to on-premise solutions, now’s your chance to kick the tires at zero cost. And the other good news is you have your choice of the following Incredible PBX offerings. Simply load the required OS or upload the ISO for the platform of your choice and follow the linked tutorials below. Enjoy!

Originally published: Friday, May 25, 2018


Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a terrible place to handle support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forums. It’s the best Asterisk tech support site in the business, and it’s all free! Please have a look and post your support questions there. Unlike some forums, ours is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of users just like you. You won’t have to wait long for an answer to your question.



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

Creating an OBi200 Google Voice Trunk to Use with Asterisk


Since Asterisk® will no longer be able to "talk" to Google Voice after June 17, we promised to hold our nose and document how to salvage your Google Voice trunks. Our exercise for today is to show you how to deploy an OBi 200-series device which can speak the new Google Voice language and use it as a traditional SIP bridge between Google Voice’s proprietary SIP platform and your Asterisk server. We will skip the editorializing on why Google is making a terrible mistake by discarding XMPP and forcing users to a proprietary solution necessitating a hardware purchase without first offering an open standards solution as Google’s Community Manager promised here. Promises, of course, don’t keep your phones ringing. For the whole story, see our article from last Saturday. For today, you’ll need to shell out $50 for an OBi 200 device. Once you have it in hand, feel free to read on and we’ll get you back in business. For security reasons, it should be noted that today’s setup assumes you are running an Incredible PBX® server and OBi device locally behind a NAT-based router. This will work equally well with the Incredible PBX-enhanced versions of Issabel and VitalPBX. We’ll leave it to the FreePBX® folks to figure out a solution for their proprietary distro.

Everything we’re covering below will work just as well using any of the OBi 200-series devices. We’ve simply chosen to use an OBi202 in our examples today because it supports an extra phone port. But an OBi200 works just as well if you will only be deploying Google Voice trunks (up to 3 and perhaps more) for your PBX. They retail for approximately $50 and are readily available at Amazon through the link in the right column which also provides a few shekels for Nerd Vittles to keep the lights on. As mentioned last week, Obihai crippled the OBi 110-series devices which will no longer work with the new Google Voice setup. Such a fine company that we once praised for producing our Device of the Year. And don’t worry. If you ever visit their forum, you can expect a cheery reception from the Obihai forum moderator. Here’s the response we got1 when raising concerns about the demise of Google Voice XMPP:



Registering Your OBi2x Device with OBiTALK

A Quick Start Guide accompanies your OBi hardware. Following along in the tutorial will get your OBi set up using a free (so far) OBiTALK account. When you get to Step 5, you’ll be ready to set up your Google Voice account by clicking the Google Voice Set-Up button.

Before you begin the Google Voice setup, we strongly recommend that you plug a POTS phone into your OBi device and dial ***6 to update your firmware to the latest release. Depending upon where you purchased your device, it may or may not have the latest firmware which is required to communicate with Google Voice on or after June 17.

We also recommend that you dial ***1 and obtain the DHCP-assigned IP address for your OBi. You’ll need this in a few minutes. And, while you’re at it, be sure to set the OBi up behind a NAT-based router to protect it from intrusion. Once someone gains access to your OBi, they’ve essentially got the keys to your telecom castle. So always deploy an OBi behind a hardware-based firewall that is on the same private LAN as your Asterisk PBX. Finally, on your router, be sure to reserve the DHCP-assigned IP address of your OBi for permanent use by the OBi hardware. Otherwise, the IP address of your OBi may change, and this will break the SIP gateway connection to your Asterisk server.

Finally, a word about the new OBi setup. All of your settings are now stored and managed in the OBiTALK cloud. Obihai then pushes the configuration to your OBi device. To put it charitably, this usually works but sometimes it doesn’t, and you end up with a quirky OBi setup that looks correct in the cloud but simply doesn’t work. We’ve found the simplest solution is to unplug the device and then restart it. Then check all of your cloud-based settings when the OBi device comes back to life to be sure none of your settings disappeared. Sometimes they do! In the old days, you had the option of configuring your OBi device locally; however, Obihai (now Polycom) has disabled that functionality with the new Google Voice setup presumably to disguise what they are doing under the covers to connect to Google.

Configuring a Google Voice Trunk on OBi200

To give credit where credit is due, configuring a Google Voice trunk on the OBi 200-series devices is dead simple. Login into your OBiTALK account, click on your OBi device, and then click the Google Voice Set-Up button.

Enter your Google Voice credentials when prompted, give Obihai permission to control your Google Voice account, and you’re done. Within a few seconds, the connections dialog box should show Google Voice connected on service provider SP1.

If you haven’t already done so, plug a POTS phone into your OBi device and place a call to somebody by dialing a 10-digit number. Then use another phone and call the Google Voice number you assigned to your OBi device. The POTS phone should ring. Don’t continue until you get these calls working in both directions. You’d be wasting your time.

Now we need to adjust the destination for incoming calls to your OBi device and redirect them from the POTS phone to the SP3 trunk we’ll be using to connect to your Asterisk server. We’ll leave SP2 unoccupied in case you wish to add another Google Voice trunk down the road.

To make this change, click the OBi Expert Configuration button at the bottom of the Device Configuration window. Then click OK to confirm that you know what you’re doing. Next click the Enter OBi Expert button at the top of the next form. In the left column, click Voice Services and then SP1 Service. The fifth parameter is called X_InboundCallRoute. Beside it, uncheck both the OBiTALK Settings and Device Default checkboxes. Now enter sp3(6781234567) in the Value field for X_InboundCallRoute where 6781234567 is your actual Google Voice phone number (DID). Scroll to the bottom and click the Submit button.

Finally, at the top of the left column of the form, click Return to OBi Dashboard.

Configuring OBi SIP Trunk for Asterisk

1. Login to your OBi Dashboard using a web browser . After signing up for an account and registering your OBi device, click on the OBi 200 device in the My OBi Devices list.

2. In the Device Configuration dialog, click OBi Expert Configuration button. When prompted whether you’re sure, click OK.

3. In the OBi Expert Configuration Menu, click Enter OBi Expert button.

4. In the Production Information (left) column, click Service Providers.

5. In the Service Providers listing, click ITSP Profile C General.

6. For each of these fields, uncheck OBiTALK Settings and then uncheck Device Default:

  • General:Name
  • Service Provider Info:Name
  • Service Provider Info:URL

7. Fill in the ! field Values as shown below using the private IP address of your PBX:



8. Click Submit button after checking your entries carefully.

9. In the Service Providers listing on the left, click ITSP Profile C SIP.

10. In the ITSP Profile, enter the private IP address of your PBX in the Proxy Server, Registrar Server, and Outbound Proxy fields after first unchecking both the OBiTALK Settings and Device Default checkboxes.

11. Scroll down the form to X_SpoofCallerID and uncheck both the OBiTALK Settings and Device Default checkboxes. Then check the Value field for X_SpoofCallerID.

12. Scroll down the form to X_DiscoverPublicAddress and uncheck both the OBiTALK Settings and Device Default checkboxes. Then uncheck the Value field for X_Discover PublicAddress.

13. Click Submit button after checking your entries beside the 5 red exclamation points.

14. In the Production Information (left) column, click Voice Services

15. In the Voice Services listing on the left, click SP3 Service.

16. In the SP3 Service Profile, fill in the 5 fields in which the OBiTALK Settings checkbox is unchecked. The AuthUsername and AuthPassword entries will be used to authenticate to your PBX so be sure to choose a very secure password. It’s your phone bill. The URI field actually makes the trunk connection to your PBX so replace the 192.168.0.82 entry shown with the actual IP address of your PBX.

17. In the SIP Credentials section of the form, make certain that X_EnforceRequestUserID is unchecked. If not, uncheck both the OBiTALK Settings and Device Default checkboxes and then uncheck X_EnforceRequestUserID.

18. If you do not want to pass the CallerID number with your calls, in the Calling Features section of the form, be sure to check AnonymousCallEnable after unchecking both the OBiTALK Settings and Device Default checkboxes.

19. In the Service Providers listing on the left, click ITSP Profile A SIP.

20. Be sure X_SpoofCallerID is checked.

21. Click Submit button after checking your entries carefully.

Configuring Incredible PBX GUI for an OBi200

On the Incredible PBX side, log into the GUI using a web browser. We’ll be adding a SIP trunk, an outbound route, and an inbound route to process calls to and from the OBi device.

Add a SIP Trunk with a Trunk Name matching whatever you used in your OBi SIP credentials, e.g. obi200 or obi202. Plug in your Outbound CallerID to match your Google Voice phone number. In the Dialed Number Manipulation Rules tab, add a Match Pattern of NXXNXXXXXX. In the SIP Settings tab for Outgoing, the Trunk Name should match whatever you used on the OBi side, e.g. obi200 or obi202. In the PEER DETAILS, enter the following using the default username and password you assigned on the OBi side. Normally, port 5061 is the default port assigned on the OBi side. If you get a failed registration, try 5060 and then 5062 and 5063. Click Submit and reload your dialplan when finished.

type=friend
defaultuser=obi200
secret=your-password
qualify=yes
port=5061
nat=yes
host=dynamic
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw
insecure=port,invite

For Outbound Call Routing, we recommend an Outbound Route using the 624 (OBI) prefix and 10-digit numbers. For example, if a user dials 624-888-1234567, your Incredible PBX server would place a call using the OBi’s Google Voice trunk to 1-888-1234567. When your Outbound Route setup looks like the following, click Submit and reload your dialplan.



For Inbound Call Routing, create an Inbound Route specifying a DID Number to match your Google Voice number. Choose a Call Destination to meet your own requirements, e.g. an extension, ring group, or IVR. Then click Submit and reload your dialplan.

Now you’re ready to test an outgoing call by dialing the OBi prefix (624) plus a 10-digit number. Then place a call to your Google Voice number using your cellphone and be sure Asterisk routes it to the destination you specified in your inbound route above.

Configuring VitalPBX to Use an OBi200

Truth be told, we weren’t bright enough to figure out how to configure the VitalPBX Trunk using credentials so we simply set up the SIP trunk using IP address authentication with the IP address of the OBi device. It works just as well and just goes to prove there’s always more than one way to skin a cat. So here’s the Trunk configuration on the VitalPBX side. The only entry you will need to change is the Host IP address for your OBi device. If you don’t know it, plug a phone into the OBi and dial ***1.

NOTE: For the Username and Description fields below, be sure to match what you used on the OBi side (above) for your SIP credentials, i.e. obi200 or obi202. If they don’t match on both devices, you won’t get a successful connection. Our apologies for mixing apples and oranges in the screenshots.



For Outbound Call Routing, we recommend an Outbound Route using the 624 (OBI) prefix and 10-digit numbers. For example, if a user dials 624-888-1234567, the VitalPBX server would place a call using the OBi’s Google Voice trunk to 1-888-1234567. Here’s the Outbound Route setup to make that happen:



For Inbound Call Routing, go to PBX:External:Inbound Routes and add an inbound route and destination for calls from your 10-digit Google Voice number. Or you can use the Default Inbound Route which we explained in our previous VitalPBX tutorial. Basically, you set up an Inbound Route with a Description and Routing Method of Default. All the other fields should be left as is except for the Inbound Destination. For the destination, you can choose an IVR, Extension, Ring Group, etc. to meet your own requirements.

Originally published: Monday, May 14, 2018


Support Issues. With any application as sophisticated as this one, you’re bound to have questions. Blog comments are a difficult place to address support issues although we welcome general comments about our articles and software. If you have particular support issues, we encourage you to get actively involved in the PBX in a Flash Forum. It’s the best Asterisk tech support site in the business, and it’s all free! Please have a look and post your support questions there. Unlike some forums, the PIAF Forum is extremely friendly and is supported by literally hundreds of Asterisk gurus and thousands of users just like you. You won’t have to wait long for an answer to your question.


SPECIAL TREAT: If you could use one or more free DIDs in the U.S. with unlimited inbound calls and unlimited simultaneous channels, then today’s your lucky day. TelecomsXChange and Bluebird Communications have a few hundred thousand DIDs to give away so you better hurry. You have your choice of DID locations including New York, New Jersey, California, Texas, and Iowa. The DIDs support Voice, Fax, Video, and even Text Messaging (by request). The only requirement at your end is a dedicated IP address for your VoIP server. Once you receive your welcome email with your number, be sure to whitelist the provider’s IP address in your firewall. For Incredible PBX servers, use add-ip to whitelist the UDP SIP port, 5060, using the IP address provided in your welcoming email.

Here’s the link to order your DIDs.

Your DID Trunk Setup in your favorite GUI should look like this:

Trunk Name: IPC
Peer Details:
type=friend
qualify=yes
host={IP address provided in welcome email}
context=from-trunk

Your Inbound Route should specify the 10-digit DID. Enjoy!



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



  1. You can always find a little humor in insults if you dig deep enough. Ironically and unbeknownst to our pal, Steve, it was Sherman Scholten and his OBi development team that were among the first Google Voice "freeloaders." Only years later after Google Voice was integrated into FreeSwitch did Josh Culp at Digium perfect a clean way to integrate Google Voice into the Asterisk platform. []

Introducing Digium’s Awesome SIP Phones for Asterisk



If you’ve been waiting for a low-cost, feature-rich SIP phone that meshes perfectly with your Asterisk® PBX, your prayers have been answered. Digium has just released not one, but four, new SIP phones with prices starting at $59. No, that’s not a typo. Digium gave us a couple of early models to play with, and today we’ll walk you through the incredibly simple setup. We would begin by noting that, despite the pricing, these phones are configured with nothing resembling a bargain basement feature set. All four models have color displays, HD Voice, POE for use without the $15 power adapter, and at least two lines. The phones can be configured using the phones themselves, or through a slick web interface, or with auto-provisioning by MAC address. Beginning with the $89 A22, the top three models support gigabit Ethernet. With the $119 A25, you get four line registrations as well as a second LCD supporting six Rapid Dial keys or up to 30 BLF entries. The top-of-the-line $169 A30 supports six line registrations and an LED setup that closely matches our previous VoIP Phone of the Year, Yealink’s T46G. While the phones were not designed for use with Switchvox®, we found them to be plug-and-play with 3CX® which is probably also true with Switchvox even though we have not tested them on that platform. We have been using our A22 phone with one line connected to Incredible PBX® for the Raspberry Pi and the second connected to VitalBox. We’ve had zero issues with the phone, and sound quality is excellent.



Connecting Digium’s A-Series IP Phone

To get started, you’ll need a power source for the phone which can be either a POE network connection or a power adapter. You’ll also need to connect to a network that can provide DHCP or VLAN configuration data. Once the phone boots up, press the checkmark button (✓) twice to display the IP address assigned to the phone. Using a desktop browser, navigate to that IP address and enter admin:789 as the default login credentials.

Configuring a SIP Extension on Your IP Phone

Once you’re logged in, click on the Line tab and fill in the blanks for the SIP1 account using the desired extension number, extension password, and IP address of your Asterisk server. Be sure Activate is checked. It should look something like the following. Then click Apply.

This one-minute setup is all that’s required to put your new phone into production with Asterisk. You’re ready to make and receive calls. The L1 button on the A20 or A22 phone (pictured above) should now be lit. To light up the L2 button, add a second SIP connection by repeating the drill after choosing the SIP2 Line from the pull-down menu. If you have redundant PBXs, fill in the IP address of the Backup server, and the phone will automatically failover when the primary PBX goes down. It doesn’t get any easier than that.

With 3CX extensions, the setup is virtually identical except the phone’s Authentication Name field should reflect the Authentication Name chosen when setting up the 3CX extension.

Customizing Your SIP Phone Settings

VoiceMail Setup. The voicemail button can be activated for one or both SIP lines in the Advanced Settings tab under each of the SIP connections. Check the Subscribe to Voice Message box and enter the Voice Message Number to retrieve your voicemails, e.g. *98701 for extension 701 on an Asterisk PBX or 999 for a 3CX extension’s voicemail.

Customizing Phone Display. If you’d like to customize the branding and background image on your phone, navigate to Phone Settings and click the Advanced tab. Here’s a link to download one of our favorite beach scenes (pictured above), or you can use your own 320×240 BMP image on the A20 and A22. The high end phones use a 480×272 BMP image. The Asterisk label at the top of the phone’s display can also be adjusted in the Greeting Words field. We’re Enchilada fans personally. 🙂

Changing Passwords and PINs. You also can adjust the passwords and PINs for the phone device itself under the Phone Settings:Advanced tab. The default is 789. To modify the admin credentials for the browser interface or to add new accounts, go to System and click on the Account tab. Because the phone can be configured using either the phone itself or the browser interface, you’ll need to change both sets of passwords to secure your phone.

Adjusting Codecs. Depending upon your PBX setup, you may need to adjust or reorder the codecs for one or both of your SIP lines. Simply navigate to Line:SIP1:Codec Settings and make any necessary changes. HINT: You’ll rarely have a problem if you make G.711U (U.S.) or G.711A (elsewhere) your primary codec although G.722 is what you’ll want for HD Voice. This is especially important if you’re using Google Voice trunks or 3CX client software.

Auto-Provisioning Your A20, A22, and A25 Phones

Let’s get to the fun stuff now. Everything we’ve covered (and much more) can be scripted with these new phones. You can read all about it here. For today, let’s get your Phonebook Contacts populated using your AsteriDex database entries. And then you can press the Down button on the phone to retrieve your Contacts.

Setting Up Phone Provisioning. Before you can auto-provision your phone, both your phone and your Asterisk server need a little navigation information. Let’s start with the phone so login as admin:789 to get started. Click on the System option and then the Auto Provision tab. Write down the last 12 digits of your phone’s MAC address (CPE Serial Number highlighted above). Check the DownloadDeviceConfig option (as shown). Disable the DHCP Option and the SIP Plug and Play options by clicking on the respective tabs. Then open the Static Provisioning Server option (as shown). Enter the local IP address of your server assuming your phone and server are both behind a firewall. For the Protocol Type, choose HTTP. For the Update Mode, choose Update After Reboot. Then click the Apply button.

Next, let’s configure the phone so that you can press the Down arrow button to access your Phonebook Contacts. Click on the Function Key option in the left margin. Then look in the Programmable Keys section and locate the row with the settings for the Down button. Change the entry in the Desktop column to Phonebook. Then click the Apply button.

Configuring Asterisk for Phone Provisioning. Now we need to get your server set up to support phone provisioning. The way provisioning works is we will set up a provisioning profile for each phone which will be processed by your web server whenever a phone is rebooted. This profile will also tell the phone where to find your Phonebook Contacts XML file. To get started, navigate to /var/www/html and create a new .cfg file for each of your phones using the 12-character MAC address of the phone, e.g. 000123456789.cfg. The file should look like the following with the exception of the Auto Pbook Url entry which should reflect the local IP address of your server:

<<VOIP CONFIG FILE>>Version:2.0.0.0

<PHONE CONFIG MODULE>
LCD Title          :IncredblePBX

<AUTOUPDATE CONFIG MODULE>
Download CommonConf:0
Download DeviceConf:1
Check FailTimes    :5
update PB Interval :720
Clr PB B4 Import   :1
Trust Certification:0
Enable Auto Upgrade:0
Upgrade Server 1   :
Upgrade Server 2   :
Auto Upgrade intval:24
Auto Pbook Url     :http://192.168.0.108/phonebook.xml

<<END OF FILE>>

Populating Phonebook Contacts with AsteriDex. Now we’re ready to build the Phonebook Contacts file (phonebook.xml) using the AsteriDex 4 database. Just issue the following commands and then reboot each of your phones (Menu+8+Yes):

cd /var/www/html/asteridex4
wget http://incrediblepbx.com/asterisk-phonebook.tar.gz
tar zxvf asterisk-phonebook.tar.gz
rm -f asterisk-phonebook.tar.gz
php asterisk-phonebook.php

Digium A-Series IP Phone User Guide

Last but not least, take a look at Digium’s A-Series IP Phone User Guide (PDF) for more tips.

Final Thoughts on A-Series IP Phones

If you couldn’t already tell, we’re quite impressed with the new A-Series phones from Digium. If you’re on a budget, the $59 model is one terrific bargain for home or SOHO use. The only thing you’re really forfeiting with this phone is the gigabit Ethernet port which will have zero impact on small and medium-sized network implementations of a VoIP server. Rather than buying power adapters for your phones, drop by your favorite WalMart and purchase a network switch that includes POE support. They start at about $30. Then pick one of these phones up from your favorite provider and let us know what you think. You’ll also be helping to fund Digium’s open source Asterisk project. Enjoy!

Originally published: Friday, April 13, 2018





Need help with VitalPBX? Visit the VitalPBX Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



300 New Wholesale Providers Make Asterisk Shine


For many years, we’ve offered Vitelity’s $3.99 Unlimited DID special with a DID, 4 channels, unlimited inbound calling, and free text messaging. It’s a deal no VoIP user should pass up. And today we have another revolutionary development for Asterisk® deployments. Once in a while we feature a carrier with great calling rates. Today we’re introducing a service providing access to 300+ wholesale carriers, all under one roof. Almost 30 BILLION billed minutes already have been logged through TCXC so you’re in good hands!1 You can choose from any or all of their 300 wholesale VoIP carriers worldwide to make outbound calls at the same wholesale rates offered to the very largest resellers. Simply pay a 13% surcharge in lieu of the $650 annual fee, and TelecomsXchange (TCXC) will provide you access to their entire suite of wholesale carriers together with state-of-the-art tools to manage all of the services.2 You’ll never have to haggle with individual carriers or provide funds on a piecemeal basis to use any of the services. TCXC already has done the negotiating for you and TCXC handles financial reimbursements to carriers based upon the services you use. There’s more good news. When compared to commercial providers, TCXC’s one-second billing increment on most routes will recoup a healthy portion of the 13% wholesale surcharge. Here are a few sample per minute wholesale rates (all with one-second billing) to whet your appetite:

  • $.0000 – U.S. TollFree
  • $.0009 – U.S.
  • $.0010 – Cyprus
  • $.0011 – Canada
  • $.0019 – Germany
  • $.0021 – U.K. (London)
  • $.0042 – China

What does a penny buy? 11-minute call to U.S., 10-minute call to Cyprus, 9-minute call to Canada, 5-minute call to Germany, 5 minute call to England, or 2½-minute call to China.

 
If you’re new to wholesale terminations, be advised that carriers change their rates regularly and, from time to time, every carrier experiences outages. Not to worry. For a modest additional charge, TelecomsXchange will manage rates and provide automatic failover for carrier outages. Simply choose TelecomsXchange as your preferred provider to the outbound destinations desired.

Before we get into the nuts and bolts of configuring Asterisk to use TCXC carriers for wholesale call terminations, let’s spend a minute discussing the architecture of the FreePBX® trunk and outbound routes model. In this design which you will find in most Incredible PBX® implementations including Issabel 4, Incredible PBX for CentOS and Ubuntu, and Incredible PBX for the Raspberry Pi as well as in other Asterisk distributions including AsteriskNOW® and the FreePBX Distro®, the administrator specifies Trunks for each provider and then assigns Outbound Routes for calls using those providers. When calls are placed, FreePBX chooses an Outbound Route based upon the dial string match specified in the route. If you have a dozen outbound routes, dialed numbers are analyzed against dial strings specified in each Outbound Route, and the routes are examined from the top to the bottom of the list. Once FreePBX chooses an Outbound Route to process a call, that ends the Outbound Route selection process. No other Outbound Route is ever considered whether it has a matching dial string or not. And it doesn’t matter whether the call fails or not, no other Outbound Route is attempted. The good news is that, within every Outbound Route, you can specify multiple Trunks which will be used in the order you’ve chosen to complete the call. If the ninth trunk happens to be the first trunk that doesn’t experience congestion, then the call will be routed to carrier #9. Keep in mind that calls to the previous eight carriers have to be attempted before we ever get to carrier #9. For this reason, it is important to create a Trunk for every carrier and specify multiple Trunks in every Outbound Route to avoid failed calls. Or, as noted above, you can specify TelecomsXchange as your final Trunk in every Outbound Route and leave it to TCXC to identify a working carrier to complete your call. In this way, you never have to worry about failed calls even though some may cost a little more depending upon carrier outages. So that’s how VoIP terminations work. You’re now an expert!

Getting Started with TelecomsXchange

The first step in your wholesale VoIP adventure is to sign up for an account with TelecomsXchange. Unless you’re chomping at the bit to pay the $650 annual fee, use our referral link. Your PBX will need a public IP address but, if it happens to be a dynamic IP address assigned by your provider, don’t worry. It’s easy to change it down the road, and we’ll show you how. Obviously, a cloud-based PBX makes this easier since you get a dedicated IP address, and this Nerd Vittles article provides several options.

Once you receive your credentials, simply login to the TelecomsXchange web site. Just a few words about how the site is organized. Dashboard is where you’ll land when you login. Accounts let you specify more than one account to be associated with your credentials. If you manage multiple PBXs, this is where you set things up. Each account must have a unique IP address. This is also where you can change the IP address associated with your primary account if the need ever arises. My Interconnections displays each of your accounts and all of the carriers you’ve chosen to associate with each account. Market View is where you search for prices and choose carriers to associate with your account(s). We’ll cover this one in more detail a little later. Payment History tracks all of your payments to TelecomsXchange by date. Call Statistics lets you download CDR and Stats data by the day, week, or month. CDR gives you an instant snapshot of your calling history and the price of the calls based upon criteria you specify. It’s very similar to the same feature in the Incredible PBX or FreePBX GUI. Preferences let you change settings for your account.

The item you’ll need to use first is the plus sign (+) at the top of the form. This is how you fund your account. As noted previously, there is a 13% wholesale surcharge and this will be deducted from whatever amount you choose to add to your account. For example, if you add $100 using PayPal, the PayPal fee plus 13% will be deducted from the $100. So your account would show an available balance of approximately $84. Cash or bank wires also are accepted.

Finally, here’s a link to the TelecomsXchange Knowledge Base and Help Center. There’s lot of helpful information there to get you started.

Choosing a Carrier with TelecomsXchange

Let’s walk through the procedure to add new carriers to your account. This is the first thing you’ll want to do after you get your credentials and fund your account. Begin by making yourself a list of the countries or dialing prefixes you’d like to call using TCXC wholesale carriers. The easiest way to perform searches and find carriers is to decipher the dialing prefix for the calls you wish to make. For example, to call London, the Prefix would be the U.K. country code (44) plus the London city code (20).

Now open the Market View tab to get started. Here’s how we’d fill in the form to find London carriers and to order the first hundred matches from least costly to most expensive: Prefix (4420), Results (100), Order By (PRICE), and Route Type (CLI) which means you can specify your own CallerID for the outgoing calls. Click Search to proceed. The results look like this:

To add a carrier to your account, simply click on the plus sign (+) on the right side of the Action column beside the carrier of your choice. You then can choose whether to add it to all of your accounts, or you specify the account to which the carrier should be added. If you want to review the carrier’s history and ratings with TCXC, click on the Information icon in the Action column beside the carrier of your choice.

For NANPA call destinations, specify 1 plus the area code in the Prefix field. You can add the first 3 digits of the exchange to drill down further. Be advised that adding the 3-digit exchange may eliminate a number of carriers that only specify rates for an entire area code. For example, if a carrier specifies an area code rate for 1212 and no exchange limitations, then searching for 1212652 would not return that carrier.

If you already know which carriers you’d like to add, just search for them by specifying the carrier name in the Seller field and leaving the Prefix field blank. To get started, here are a few favorites for U.S./Int’l routes: IDT, LEXICO, TATA, VOXBEAM, and TELECOMSXCHANGE.

Placing Carrier-Specific Calls with TelecomsXchange

To set up the FreePBX Trunks and Outbound Routes, you first need to understand how calls are placed through TelecomsXchange carriers. In lieu of traditional trunk registrations on your PBX, TelecomsXchange uses the IP address that you registered for your account to determine whether SIP calls arriving at TCXC for routing to a carrier are authorized. Thus, it’s important that you keep your IP addresses updated whenever they change. Assuming your call passes the IP address check, the next hurdle is for TCXC to decipher which carrier should be used to route the call to its destination. This is handled by dialing prefixes which are unique to each TCXC carrier. For example, TATA has a dialing prefix of 32270#. To dial a U.S. call using the TATA carrier, the dial string would look like this: 32270#16785551212. A carrier must be assigned to your account before you can place calls from your PBX using that carrier’s dialing prefix. So there are two layers of protection on the TCXC side to prevent fraudulent calls. There must be both an IP address match and a carrier prefix match on your account before a call will be forwarded to a carrier.

Before we begin setting up your Trunks and Outbound Routes for Incredible PBX or one of the other Asterisk platforms, write down the names of each of the carriers you have chosen as well as their Dialing Prefixes. You’ll need them in the next steps. You can decipher carrier’s dialing prefixes assigned to your account under the My Interconnections tab in your TCXC Dashboard.

Setting Up TCXC Carrier Trunks in FreePBX

To begin, make certain that chan_SIP is assigned to UDP 5060 on your PBX. Particularly for trunks, there were just too many issues with PJsip in some releases of Asterisk so steer clear. With every TCXC carrier, the good news is the chan_SIP Trunk setup is virtually identical except for the carrier name and the carrier’s dialing prefix. For each carrier, start by adding a new chan_SIP Trunk in the Incredible PBX or FreePBX GUI. In the General tab, insert the carrier name in the Trunk Name field, e.g. TCXC. Leave the other default settings as they are.

Switch to the Dialed Number Manipulation Rules tab. Leave the Dialing Rules empty and insert the carrier’s dialing prefix in the Outbound Dial Prefix field, e.g. 77379#.

Switch to the SIP Settings tab. In the Outgoing tab, insert the carrier name in the Trunk Name field. Insert the following in the PEER Details field:

type=peer
qualify=yes
progressinband=never
port=5060
nat=yes
insecure=port,invite
ignoresdpversion=yes
host=sip01.telecomsxchange.com
dtmfmode=rfc2833
disallow=all
context=from-trunk
allow=ulaw&alaw

 
While still in SIP Settings, switch to the Incoming tab, and clear out the default User Detail entries. Now click the Submit button and reload your dialplan when prompted.

Repeat this procedure for each of the carriers you set up in your TCXC profile.

Setting Up Outbound Routes for TCXC Calls

Our preferred Outbound Route setup for TCXC carriers is to create a new Outbound Route for each destination (typically a country) to which you wish to enable calling. Be advised that setting up a dialing prefix of just the number 1 authorizes considerably more calls than just those to destinations in the United States. For foreign countries, if all of your calls to the U.K are to destinations in London, then don’t authorize country-wide calling. Narrow it down to the country code and city code for London. Remember, it’s your phone bill.

For international calls, we prefer that callers enter a dialing prefix that specifies that it’s a long distance call plus a two-digit prefix representing the country abbreviation, not the dial code of the country. For example, for the U.K., we use 085 where 0 specifies long distance call and 85 is the phone representation for UK. We’ll then use the Outbound Route to strip off the caller’s dialed prefix and to insert the proper country code to complete the call.

Within each Outbound Route, we recommend you specify one or more low-cost carriers and a final TCXC carrier to catch calls that fail to all of your designated carriers. Otherwise, the caller will get a failed call. And you will get the next call. 🙂

So here’s what our Outbound Route setup for London, England looks like. You only need entries in the Route Settings and Dial Patterns tabs. Be sure to put your desired CallerID in the Route CID field and set the Override Extension option to YES. Then add your preferred Trunks in the order in which you want the calls attempted:

In the Dial Patterns tab, we specify a Prefix of 4420 to tell Asterisk to add a dialing prefix to the call to get it to London. Then we enter 085 in the Prefix field to tell Asterisk to strip off those digits entered by the caller before sending the call to the designated Trunk for processing. The Match Pattern is 8 X’s which represents an 8-digit London telephone number. To get a match on this Outbound Route, Asterisk will be searching for a dial string that looks like this: 085 + XXXXXXXX

Here’s an example of the Asterisk call flow using IDT as the primary trunk with this Outbound Route.

Caller Dials: 085-7499-0888
Outbound Route finds match on 085 Prefix + 8 X's and discards Prefix
Outbound Route sends 4420 (for London) + 74990888 to Trunk #1 (IDT)
IDT Trunk adds IDT Dialing Prefix 10729# before sending call to TCXC
TCXC receives: 10729#442074990888
TCXC strips IDT dialing prefix and sends call to IDT: 4420 + 74990888
IDT connects caller to Four Seasons Hotel in London

Adjustment with NAT-Based Implementations

Keep in mind that TCXC was designed primarily for commercial resellers, not for PBX-level implementations. If your PBX is sitting in the cloud or is directly connected to the Internet rather than sitting behind a NAT-based router, then you’re good to go now. If, on the other hand, your PBX is sitting on a private LAN behind a NAT-based router, make certain that your router forwards all UDP 5060 traffic to the private LAN address of your PBX. Otherwise, you may experience disconnect anomalies where the called party hangs up a call before your callers since there will be no call path for TCXC to return the disconnect alert (BYE) when the call is completed. For Incredible PBX servers, this isn’t really a problem because Incredible PBX will disconnect the call automatically after detecting 30 seconds of RTP traffic inactivity anyway. But we wanted to make you aware of the potential issue. The good news is you won’t be billed for the extra connection time since TCXC already has dropped the call with the carrier and turned off the billing meter.

Adding Trunk Information to Incredible PBX

Some may wish to include Trunk information in the CDR listings of Incredible PBX or FreePBX. This makes it much easier to spot problems when calls aren’t routed to the Trunk destinations you expect. It also makes it easy to generate trunk-specific reports within the GUI. In the FreePBX 12 and 13 implementations, the trunk information can be added painlessly by revising the [macro-dialout-trunk] context. However, you cannot make these changes directly in /etc/asterisk/extensions_additional.conf because your modifications will be overwritten the next time your dialplan is reloaded. Instead, the modified context must be added to extensions_override_freepbx.conf. Here’s how:

cd /tmp
wget http://incrediblepbx.com/cdr-trunk-info.tar.gz
tar zxvf cdr-trunk-info.tar.gz
rm -f cdr-trunk-info.tar.gz
cat cdr-trunk-info.txt >> /etc/asterisk/extensions_override_freepbx.conf
asterisk -rx "dialplan reload"

 
The modified CDR listing will look something like this:

We also developed a handy utility to make it easy to list out all of your trunks and their status. Here’s how:

cd /root
wget http://incrediblepbx.com/list-trunks.tar.gz
tar zxvf list-trunks.tar.gz
rm -f list-trunks.tar.gz
./list-trunks

 
The listing will look something like this:

Rate Queries Using the TCXC API

For those that want to query the TCXC rate tables locally, we’ve modified a TCXC sample JSON script slightly so that you can use Chrome (with JSONView) or FireFox (with JSON Lite viewer) to view JSON results. Using one of these browsers with the specified add-on, JSON results will be formatted automatically. The query results identity current providers and rates by entering a dialing prefix. The syntax for the web queries looks like the following where 192.168.0.224 is your server’s IP address and 357 is the dialing prefix rate table desired:


http://192.168.0.224/rates.php?prefix=357

 
The first 30 matching results will look something like this:


To use this script, you’ll need to insert your account name and API key (found in your TCXC Profile) into rates.php before first use. To install the script in the root folder of Apache, issue the following commands:


cd /var/www/html
wget http://incrediblepbx.com/TCXC-rates.tar.gz
tar zxvf TCXC-rates.tar.gz
rm -f TCXC-rates.tar.gz

 

Published: Monday, February 12, 2018



NEW YEAR’S TREAT: If you could use one or more free DIDs in the U.S. with unlimited inbound calls and unlimited simultaneous channels, then today’s your lucky day. TelecomsXChange and Bluebird Communications have a few hundred thousand DIDs to give away so you better hurry. You have your choice of DID locations including New York, New Jersey, California, Texas, and Iowa. The DIDs support Voice, Fax, Video, and even Text Messaging (by request). The only requirement at your end is a dedicated IP address for your VoIP server. Once you receive your welcome email with your number, be sure to whitelist the provider’s IP address in your firewall. For Incredible PBX servers, use add-ip to whitelist the UDP SIP port, 5060, using the IP address provided in your welcoming email.

Here’s the link to order your DIDs.

Your DID Trunk Setup in your favorite GUI should look like this:

Trunk Name: IPC
Peer Details:
type=friend
qualify=yes
host={IP address provided in welcome email}
context=from-trunk

Your Inbound Route should specify the 10-digit DID. Enjoy!



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

  1. We obviously have not verified TCXC’s billed minutes counter. Don’t rely upon it in deciding whether to use the service. As with all VoIP providers, what matters is the quality and cost of the calls. []
  2. Our special thanks to TelecomsXchange. They have generously offered to contribute a portion of the wholesale surcharge to support the Incredible PBX open source project. []

The New Hybrid PBX: Why Settle for a One Trick Pony?


Let’s face it. It’s hard not to like the application development flexibility that Asterisk® offers, especially if you’re part of an organization that has very specific telephony needs. But the price you pay for "free" and putting all of your eggs in the Asterisk basket is painful. Here are a few of the hurdles that come to mind: security, NAT, one-way audio, remote users, CRM support, conferencing, painful upgrades to address frequent bug fixes, and, more generally, telephone management and support. We love Asterisk, but…

Most folks don’t buy all of their cars or groceries or computer software from a single company. So why do it with your phone system when you can take advantage of the best of all worlds, open source and commercial? To us, that’s the compelling case for integrating a 3CX commercial PBX into your Asterisk infrastructure. It’s a new iteration of what we used to call a hybrid PBX. And you can do it without cost for a full year to kick the 3CX tires and provide your mobile users with transparent phone service regardless of where they are roaming. Using the special Nerd Vittles signup link, you get a custom version of 3CX that supports 4 simultaneous calls, 10-user web meetings, unlimited trunks, and 10 or more extensions. After the first year, you can either spring for less than $100 a year to maintain the 3CX free PBX platform and mobile clients with pain-free updates, or you can upgrade to a more robust 3CX Pro commercial offering with a much expanded feature set including call center technology and seamless CRM integration with MS Exchange, Salesforce, Microsoft Dynamics, Microsoft Outlook, Office 365, Google Contacts, Exact Online, Freshdesk, Datev, Zendesk, Nutshell, vtiger, EBP, Insightly, amoCRM, Bitrix24 and Act. What’s not to like?

If you’re a frequent Nerd Vittles visitor, you already know that the 3CX clients for iOS, Android, Windows, and Macs are one of our favorite telephony apps of all time. The ease with which the 3CX client can be configured with a single click on an email attachment is revolutionary. And, once configured, the fact that you never again experience a NAT problem with a SIP call is nothing short of miraculous. As we’ve previously mentioned, the 3CX Client provides a nearly perfect mobile client for those that rely upon Asterisk. Now 3CX is poised to release an even easier configuration procedure for their mobile clients in update 2 for version 15.5. Simply log into your 3CX web client on a PC or Mac and choose the Settings:QR Code option from the menu bar. 3CX will present a QR code to activate the 3CX Client for your smartphone. Scan it using the 3CX Client app on your smartphone and, presto, your phone is instantly provisioned. It doesn’t get any easier than this…



Let’s spend a little time reviewing our favorite Hybrid PBX setup. In this scenario which is perfect for small businesses with a mobile workforce, the setup looks like this. An Asterisk server is deployed to manage company trunks including Google Voice, voicemail, IVRs, custom apps, and extensions for every employee. Then we add a 3CX free PBX, interconnect it with the Asterisk PBX, and assign a 3CX extension for every employee. The 3CX extensions will all tie back to the employee extensions on the Asterisk PBX. It obviously simplifies things if you keep your number schemes consistent. For example, extension 7000 on the Asterisk PBX could be matched to extension 000 on the 3CX PBX. Then we set up outbound trunks on both the Asterisk PBX and 3CX to dial a 9 prefix to reach extensions on the other PBX. So dialing 9000 on the Asterisk PBX would connect the caller to extension 000 on the 3CX PBX. On the 3CX side, dialing 9000 would connect the caller to extension 7000 on the Asterisk PBX in our example. And, of course, 3CX Clients can reach any number worldwide using Asterisk outbound trunks by dialing a 9 prefix and then the long distance number. Our previous tutorials will walk you through setting this up with Incredible PBX® 13, Issabelâ„¢, any FreePBX®-based PBX, or even Wazo. Once you complete the 5-minute setup, mobile users can take advantage of all the powerful features on any 3CX Client platform while still receiving their incoming calls from the Asterisk-based office PBX by simply forwarding their extension to their matching 9XXX destination on the 3CX platform. This will ring their 3CX Client anywhere in the world with nothing but a Wi-Fi connection! And it’s a free call.



Published: Monday, October 16, 2017  



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…

The Ultimate Voice Dialer for Asterisk and Incredible PBX

Let’s face it. Voice recognition with Google has been hit and miss, and that’s on a good day. So we’re delighted to shift gears and introduce a new platform powered by IBM Watson’s Speech-to-Text (STT) engine. While it’s not free, that’s really theoretical for most of our readers. Your first month on the platform is entirely free. And, after that, you get 1,000 minutes a month of free voice recognition services. If you still want more, it’s 2¢ a minute.

We first introduced IBM’s STT platform back in March when we documented how to use the service to transcribe voicemails and deliver them via email. Today, we’re introducing the Incredible Voice Dialer for Asterisk. It runs on all of the major Incredible PBX platforms: CentOS, Wazo, and Issabel. It’s married to our AsteriDex phonebook application that is deployed with Incredible PBX using MySQL, MariaDB, or SQLite3 depending upon platform.

The way it works is a user picks up an extension on your PBX and dials 411. The caller will be prompted for the name of the person or company to call. Once the caller says the name, the Incredible Voice Dialer will send the recording to IBM’s Watson STT engine for transcription. The result is then passed to AsteriDex where the text will be matched against the phone number saved for that person or company. The number is then passed to your default outbound trunk to place the call. All of the magic happens in less than two seconds, and the call begins ringing at your destination. You can try it out for yourself on our demo server this week. Just dial: , choose option 1 when the IVR answers, and then say "Delta Airlines" or "American Airlines" when prompted for a name. The queries support wildcard matching. If you say "Delta", you’ll still be connected to Delta Airlines.

What About the Quality? Here’s the bottom line. Speech recognition isn’t all that useful if it fails miserably in recognizing everyday speech. The good news is that IBM Watson’s speech recognition engine is now the best in the business. If you want more details, read the article below which will walk you through IBM’s latest speech recognition breakthrough:


Creating an IBM Bluemix Speech to Text Account

NOV. 1 UPDATE: IBM has moved the goal posts effective December 1, 2018:

1. Create Bluemix account here.

2. Confirm your registration by replying to email from IBM.

3. Login to Bluemix using your new credentials.

4. Agree to terms and conditions, name your organization, and name your space (STT).

5. Choose Watson Speech to Text service and click Create.

6. When Speech to Text-kb opens, click Service Credentials tab (on the left).

7. In Actions column, click View Credentials. Write down your username and password.

8. Logout by clicking on image icon in upper right corner of dialog window.

 

Install Voice Dialer with Incredible PBX for Wazo

1. Login to your server as root using SSH/Putty and issue the following commands:

cd /
wget http://incrediblepbx.com/ibmstt-411-wazo.tar.gz
tar zxvf ibmstt-411-wazo.tar.gz
rm -f ibmstt-411-wazo.tar.gz
sed -i '\\:// BEGIN Call by Name:,\\:// END Call by Name:d' /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf
sed -i '/\\[xivo-extrafeatures\\]/r /tmp/411.txt' /etc/asterisk/extensions_extra.d/xivo-extrafeatures.conf
asterisk -rx "dialplan reload"

2. Edit /var/lib/asterisk/agi-bin/getnumber.sh and insert your IBM credentials from step #7 above into these variables:

API_USERNAME="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
API_PASSWORD="XXXXXXXXXXXX"

3. Save the file.

 

Install Voice Dialer on Other Incredible PBX Platforms

1. Login to your server as root using SSH/Putty and issue the following commands:

cd /
wget http://incrediblepbx.com/ibmstt-411.tar.gz
tar zxvf ibmstt-411.tar.gz
rm -f ibmstt-411.tar.gz
sed -i '\\:// BEGIN Call by Name:,\\:// END Call by Name:d' /etc/asterisk/extensions_custom.conf
sed -i '/\\[from-internal-custom\\]/r /tmp/411.txt' /etc/asterisk/extensions_custom.conf
asterisk -rx "dialplan reload"

2. Edit /var/lib/asterisk/agi-bin/getnumber.sh and insert your IBM credentials from step #7 above into these variables:

API_USERNAME="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
API_PASSWORD="XXXXXXXXXXXX"

3. Save the file.

 

Take Incredible Voice Dialer for a Test Drive

1. From an extension connected to your PBX, dial 411. When prompted for the name to call, say "Delta Airlines" or "American Airlines."

2. Quicker than you could actually dial the number, you’ll be connected.

 

Building Voice-Enabled Applications with Asterisk

All of our code is open source, GPL2 code so you’re more than welcome to use it, learn from it, and then build your own voice-enabled applications. Just abide by the terms of the license and share. When you review /var/lib/asterisk/agi-bin/getnumber.sh, you’ll see that it’s incredibly easy to change the backend database. Here’s the Wazo flavor of the script:

API_USERNAME="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
API_PASSWORD="XXXXXXXXXXXX"

thisfile="$1"

# sending the recording to IBM Watson for transcription
curl -k -u $API_USERNAME:$API_PASSWORD -X POST --limit-rate 40000 --header "Content-Type: audio/wav" --data-binary @/tmp/$thisfile.wav "https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?continuous=true&model=en-US_NarrowbandModel" 1>/tmp/$thisfile.txt

# grabbing the text out of the IBM Watson response
msg=`cat /tmp/$thisfile.txt | grep transcript | cut -f 2 -d ":" | cut -f 2 -d '"' | sed 's| *$||' | sed -e "s/\b\(.\)/\u\1/g"`%

# passing text to MySQL (1st line) or SQLite3 (2nd line) for name lookup. answer is num2call.
#num2call=$(mysql -uroot -ppassw0rd asteridex -ss -N -e "SELECT user1.out FROM user1 where name LIKE '$msg'");
num2call=`/usr/bin/sqlite3 /var/lib/asterisk/agi-bin/asteridex.sqlite "select out from user1 where name LIKE '$msg'"`

# clearing out our temporary files
rm -f /tmp/$thisfile.*

# passing the results to the Asterisk dialplan
echo "SET VARIABLE PTY2CALL "\""$msg"\"""
echo "SET VARIABLE NUM2CALL "\""$num2call"\"""

# we're done with the AGI bash script so let's exit gracefully
exit 0

The Asterisk dialplan code could be modified for any number of applications. Here’s what it looks like on the Incredible PBX 13 platform. It’s slightly different with Wazo to accomodate their dialplan syntax.

;# // BEGIN Call by Name        
exten => 411,1,Answer
exten => 411,n,Playback(custom/411)
exten => 411,n,Set(RANDFILE=${RAND(8000,8599)})
exten => 411,n,Record(/tmp/${RANDFILE}.wav,3,10)
exten => 411,n,Playback(/tmp/${RANDFILE})
exten => 411,n,AGI(getnumber.sh,${RANDFILE})
exten => 411,n,NoOp(Party to call : ${PTY2CALL})
exten => 411,n,NoOp(Number to call: ${NUM2CALL})
exten => 411,n,Goto(outbound-allroutes,${NUM2CALL},1)
exten => 411,n,Hangup()
;# // END Call by Name        

There’s nothing magical about it. (1) It answers the call to 411. (2) It plays back a recording that prompts the user to say the name of the person or company to call. (3) It generates a random number to use for the filenames associated with the STT process. (4) It records the caller’s speech and saves it to the random filename as a .wav file which IBM STT can understand. (5) It passes the call to the AGI bash script to send the recording to IBM Watson and obtain the transcription and to pass the text to MySQL or SQLite3 to lookup the text in the AsteriDex database. (6) We display the called party’s name on the Asterisk CLI. (7) We display the called party’s phone number on the Asterisk CLI. (8) We place the call using the PBX’s default outbound route. (9) We hangup the call when it’s completed.

Published: Monday, October 9, 2017  



Need help with Asterisk? Visit the PBX in a Flash Forum.


 

Special Thanks to Our Generous Sponsors


FULL DISCLOSURE: ClearlyIP, Skyetel, Vitelity, DigitalOcean, Vultr, VoIP.ms, 3CX, Sangoma, TelecomsXchange and VitalPBX have provided financial support to Nerd Vittles and our open source projects through advertising, referral revenue, and/or merchandise. As an Amazon Associate and Best Buy Affiliate, we also earn from qualifying purchases. We’ve chosen these providers not the other way around. Our decisions are based upon their corporate reputation and the quality of their offerings and pricing. Our recommendations regarding technology are reached without regard to financial compensation except in situations in which comparable products at comparable pricing are available from multiple sources. In this limited case, we support our sponsors because our sponsors support us.

BOGO Bonaza: Enjoy state-of-the-art VoIP service with a $10 credit and half-price SIP service on up to $500 of Skyetel trunking with free number porting when you fund your Skyetel account. No limits on number of simultaneous calls. Quadruple data center redundancy. $25 monthly minimum spend required. Tutorial and sign up details are here.

The lynchpin of Incredible PBX 2020 and beyond is ClearlyIP components which bring management of FreePBX modules and SIP phone integration to a level never before available with any other Asterisk distribution. And now you can configure and reconfigure your new Incredible PBX phones from the convenience of the Incredible PBX GUI.

VitalPBX is perhaps the fastest-growing PBX offering based upon Asterisk with an installed presence in more than 100 countries worldwide. VitalPBX has generously provided a customized White Label version of Incredible PBX tailored for use with all Incredible PBX and VitalPBX custom applications. Follow this link for a free test drive!
 

Special Thanks to Vitelity. Vitelity is now Voyant Communications and has halted new registrations for the time being. Our special thanks to Vitelity for their unwavering financial support over many years and to the many Nerd Vittles readers who continue to enjoy the benefits of their service offerings. We will keep everyone posted on further developments.
 



Some Recent Nerd Vittles Articles of Interest…