Home » Search results for 'allison ivr' (Page 3)

Search Results for: allison ivr

The Most Versatile VoIP Provider: FREE PORTING

Going Public with Incredible PBX 16 and VitalPBX 2.3.8



As part of our ongoing development efforts, we maintain about a dozen honeypot servers across the U.S. and Canada to monitor the latest adventures of the bad guys. Security becomes especially important for those wishing to live on the bleeding edge and deploy a cloud-based, public-facing VoIP server. Today we want to walk you through our latest suggestions to set up and secure a VitalPBX platform using just the built-in FirewallD, IPset, and Fail2Ban components. If you opt to deploy VitalPBX in the Cloud, a KVM-based VPS is absolutely essential in order to take advantage of the security mechanisms we will introduce today.

Here are 6 Key Security Features in today’s public design:

  • SIP Registration Lockdown by FQDN
  • Extension Lockdown by IP Address
  • Trunk Provider Lockdown by IP Address
  • Web Access Lockdown by WhiteList
  • Disguised Ports for SIP and SSH Access
  • 100,000+ VOIP Blacklist for FirewallD

Is it 100% safe? Nothing ever is. That’s what backups are for. 😉

FYI: The CentOS folks reintroduced a previous FirewallD bug on October 22 which (again) broke new VitalPBX installs. On October 23, the VitalPBX developers fixed the bug (again). There should be no problems with new installs. For previous installs, see this thread on the PIAF Forum for the fix.

Taking Incredible PBX with VitalPBX to the Cloud

Because Incredible PBX with VitalPBX 2.3.8 was originally distributed as an ISO, getting it installed in the cloud was a challenge. A few cloud providers let you bring your own ISO to install on their VPS platforms, but it was still a tedious process. So today we’re pleased to introduce a new install script that can be run on any CentOS 7 platform.

We have a few cloud providers that we recommend without reservation. Both Vultr and Digital Ocean provide referral credits to Nerd Vittles to support our VoIP project development efforts. We’ve used both of them for many years with no problems. Either of the platforms works well using the $5 a month option in your choice of cities. Just be sure to choose the CentOS 7 platform, not CentOS 8. For an extra buck, you can add automatic backups.

Our favorite bargain is now CrownCloud in Los Angeles. For $25 a year, they offer a KVM VPS that is ideal as a VoIP platform. And the offering includes a free snapshot image as well. As you might imagine, it’s very popular and goes Out of Stock from time to time so check back often. For our international friends, CrownCloud offers similar platforms at the same price point in both Germany and the Netherlands.

Installing Incredible PBX with VitalPBX on CentOS 7

Once your CentOS 7 platform is up and running, here’s how to install Incredible PBX for VitalPBX. Log into your server as root using SSH or Putty. Then issue these commands:

cd /root
passwd
yum -y install net-tools wget nano tar
wget http://incrediblepbx.com/incrediblepbx.sh
chmod +x incrediblepbx.sh
./incrediblepbx.sh

Incredible PBX Cloud Setup Recipe for VitalPBX

We think the easiest way to configure your new VitalPBX platform is to follow the simple steps outlined below. This will avoid your having to jump back and forth between tutorials to get all the pieces in place. When you’re finished, you’ll have a secure VitalPBX cloud platform. Don’t be intimidated by the number of steps. If you can handle slice-and-bake cookies, you can do this!

1. Point your browser to the IP address of your server. You’ll be prompted to set a password for admin access to the GUI. Fill in the blanks to proceed. Should you ever forget your admin password, here’s how as root user to force a reset on your next login from a browser:

mysql ombutel -e 'update ombu_settings set value = "yes" where name = "reset_pwd"'


2. Register your server when prompted. The VitalPBX Dashboard will appear.

3. Decipher the public IP address of your desktop machine and any other PCs that will be used to manage your server.

4. From the VitalPBX Dashboard, navigate to Admin:Security:Firewall:WhiteList. Enter each of your IP addresses from step #3 and click Save button.

5. From the VitalPBX Dashboard, navigate to Admin:Security:Intrusion Detection:WhiteList. Enter each of your IP addresses from step #3 and click Save button.

6. Modify the default SSH port by logging in to your server as root and issuing the following commands using the year you were born in the first line replacing 2000:

sed -i 's|#Port 22|Port 2000|' /etc/ssh/sshd_config
systemctl restart sshd

 
7. From the VitalPBX Dashboard, navigate to Admin:Security:Firewall:Services. Change the SIP port to 5080 or some other port number not in the 5060-5065 range. Change the SSH port to a 4-digit number matching the year you were born. Click Save button. Monitor your SSH log for attempted breaches and change your port if necessary:

cat /var/log/secure | grep password

 
8. Verify that you can log back into your server with SSH using the new SSH port number you assigned in step #6: ssh -p 2000 root@server-IP-address

9. From the VitalPBX Dashboard, navigate to Admin:Security:Firewall:Rules. Delete the HTTP and HTTPS items by clicking the Trash icon beside each entry. In the GENERAL tab, set Block ICMP Requests to YES. Click Save button. This blocks web access to everyone except those you’ve whitelisted in step #4 above. If you ever lock yourself out of web access, login to your server as shown in step #8 and temporarily whitelist the public IP address desired. This gets removed automatically the next time you save your Firewall settings from within the VitalPBX GUI.

iptables -A vpbx_white_list -s 12.34.56.78 -j ACCEPT

10. Before we get too far along, let’s put another layer of security in place for your new server. We’re going to add the VoIP Blacklist which blocks about 100,000 bad guys from around the globe. We’ll also add a cron job to update the blacklist every night. Log back into your server as root and issue these commands to put the pieces in place and enable the VoIP Blacklist.

TIP: The cron job below is scheduled to run at 20 minutes after 3 a.m. Change the time to something else so we don’t all bombard the VoIP Blacklist site for downloads at exactly the same time every night.

cd /etc
wget http://incrediblepbx.com/voipbl-firewalld.tar.gz
tar zxvf voipbl-firewalld.tar.gz
rm -f voipbl-firewalld.tar.gz
echo "20 3 * * * root /etc/update-voipbl.sh >/dev/null 2>&1" >> /etc/crontab
/etc/update-voipbl.sh

11. From the VitalPBX Dashboard, navigate to Admin:Add-Ons:Add-Ons. Click Check Online button. Click Install button beside Custom Contexts. Click Install button beside Phonebooks. Click Install button beside Domotic.

12. From the VitalPBX Dashboard, navigate to Settings:Tech Settings:SIP Settings.

  a. In the GENERAL tab, set the Bind Address port to 5080 or whatever port you chose in step #7 above. This is the port number together with the FQDN of your PBX (set in the next step) that any SIP phone will need to successfully register to an extension.

  b. In the SECURITY tab, set Allow Guest to NO, set Auto-Domain to NO, set Allow External Domains to NO, and enter a fully-qualified domain name (FQDN) pointing to the IP address of your server in the Domain field. We cannot stress enough how important this FQDN is to the security of your cloud-based server. It limits SIP registrations to this FQDN only, and all SIP registration attempts by IP address are automatically blocked. Don’t skip this step!

  c. In the NETWORK tab, enter the IP address of your server in External Address. Click the ADD button in the Local Networks section and enter the private IP addresses associated with your LAN and VPN, e.g. 192.168.0.0/255.255.0.0 and 10.0.0.0/255.240.0.0. Change NAT to Force,Comedia if your server is behind a NAT-based router.

  d. In the CODECS tab, enable ULAW, ALAW, G722, and G729.

  e. In the OTHERS tab, set SRV LOOKUPS to Yes. Click SAVE button.

13. From the VitalPBX Dashboard, navigate to Settings:Tech Settings:Profiles. Click Show All Profiles bar and choose Default PJSIP Profile. In the GENERAL tab, set the following entries to YES: Force rport, Rewrite Contact, Direct Media, RTP Symmetric, and Send Diversion Header. Click UPDATE button.

14. From the VitalPBX Dashboard, navigate to PBX:Applications:Parking. Click Show All Parking Profiles bar and choose Default. Change Code from 700 to 7000 and click Update button. This changes your Parking Lot extensions to the 7000 range so that 700 range can be used for Extensions, just like other versions of Incredible PBX.

15. Log out of your Dashboard and then log back in so that the menus get refreshed with the Custom Contexts addition.

16. From the VitalPBX Dashboard, navigate to PBX:Applications:Custom Contexts. Create the new sample IVR context with the following entries. Then click Save button.

  • Description: IncrediblePBX
  • Context: incrediblepbx
  • Extension: s
  • Priority: 1
  • Destination: Terminate Call -> Hangup

17. From the VitalPBX Dashboard, navigate to PBX:Applications:Custom Applications. Create the custom application for the sample IVR and Save it.

  • Code: 3366
  • Name: DEMO
  • Enabled: YES
  • Destination: Custom Contexts -> IncrediblePBX

18. From the VitalPBX Dashboard, navigate to PBX:Applications:Conferences. Create the new sample conference application and Save it.

  • Code: 2663
  • Description: CONF
  • Music on Hold When Empty: YES
  • User Count: YES
  • Announce Join/Leave: YES
  • Announce Only User: YES
  • User PIN: 1234
  • Leader PIN: 4321
  • Drop Silence: YES

19. If you didn’t read last week’s article on Custom Contexts, now would be a good time to do so. Here are the commands to put all those pieces in place on your new cloud-based server:

cd /
yum -y install dialog wget nano tar mailx
cp -p /etc/crontab /etc/crontab.bak
wget http://incrediblepbx.com/incrediblepbx-vitalpbx.tar.gz
tar zxvf incrediblepbx-vitalpbx.tar.gz
rm -f incrediblepbx-vitalpbx.tar.gz
chown asterisk:asterisk /var/lib/asterisk
cd /etc/asterisk/ombutel
echo "[cos-all-custom](+)" >> extensions__80-custom.conf
echo "exten => 412,1,NoOp(Voice Dialer)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,1,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 951,1,NoOp(News)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,5,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 947,1,NoOp(Weather by ZIP)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,6,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 3172,1,NoOp(DISA Voice Dialer)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,9,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 4747,1,NoOp(Wolfram Alpha)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,3,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 8463,1,NoOp(Time of Day)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,*,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 53669,1,NoOp(Lenny)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,53669,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
echo "exten => 86329,1,NoOp(Today in History)" >> extensions__80-custom.conf
echo " same => n,Answer" >> extensions__80-custom.conf
echo " same => n,Goto(incrediblepbx,7,1)" >> extensions__80-custom.conf
echo " same => n,Hangup()" >> extensions__80-custom.conf
echo "" >> extensions__80-custom.conf
systemctl restart asterisk
chown asterisk:asterisk /var/lib/asterisk
chown asterisk:apache /var/lib/asterisk/agi-bin

20. Create new Extensions for your PBX by navigating to PBX:Extensions:Extensions. You only need to fill in the Extension, Name, and Email Address fields. We recommend extension numbers beginning with 701. If the extension will be used from a phone behind a NAT-based router, change the NAT entry to Force,Comedia. If the phone associated with the extension has a static IP address, enter it in the Permit field for an extra layer of security. In the VOICEMAIL tab, you will note that voicemail is enabled by default with a password matching the extension number. This forces the user to set the voicemail password the first time they access voicemail with their phone. We recommend the YES setting for Attach Voicemail, Ask Password, Say CID, Say Duration, and Envelope. Then press SAVE.

21. Once you have created your extensions, you can create Ring Groups to assign multiple extensions and external numbers to a designated number which will ring all of the extensions and external numbers in the ring group either simultaneously or serially. Navigate to PBX:Call Center:Ring Groups to set this up.

22. Trunk Setup. While we don’t recommend it, if you just want to play around with some toll-free calls using option 1 in the DEMO IVR to see how everything works, here’s a simple trunk setup to get you started. First, navigate to Settings:Telephony:Channel Groups and save a group named Default with no entries. Then navigate to PBX:External:Trunks:CUSTOM. Create TollFree trunk with this Dial String: SIP/1${EXTEN}@ovh.starcompartners.com. No other entries are required. Click SAVE and reload your dialplan. Finally, create an Outbound Route for these calls in PBX:External:Outbound Routes like this:

  • Description: TollFree
  • Trunks: TollFree
  • Dial Pattern: Pattern=NXXNXXXXXX

Save your settings and reload the dialplan. You now can skip down to step #25. NOTE: You will not be able to receive outside calls or make calls to numbers other than toll-free ones.

Our preference is that you use our Platinum Provider, Skyetel, for your default trunk and DID because they offer quadruple redundancy so you never miss a call. Sign up for Skyetel service and take advantage of the Nerd Vittles specials which include a $10 credit to kick the tires. First, complete the Prequalification Form here. You then will be provided a link to the Skyetel site to complete your registration. Once you have registered on the Skyetel site and your account has been activated, open a support ticket and request the $10 credit for your account by referencing the Nerd Vittles special offer. Once you are satisfied with the service, fund your account as desired, and Skyetel will match your deposit of up to $250 simply by opening another ticket. That gets you up to $500 of half-price calling. You can also port in your DIDs at no cost for 60 days after funding your account. Credit is limited to one per person/company/address/location. Effective 10/1/2023, $25/month minimum spend required.

We don’t recommend trunk registrations with a publicly exposed server because it creates a potential attack vector for intruders and any intrusion would be undetectable from the PBX since the attacker could make unauthorized calls after registering directly with your SIP provider. For this reason, Skyetel does not use SIP registrations to make connections to your PBX. Instead, Skyetel utilizes Endpoint Groups to identify which servers can communicate with the Skyetel service. An Endpoint Group consists of a Name, an IP address, a UDP or TCP port for the connection, and a numerical Priority for the group. For incoming calls destined to your PBX, DIDs are associated with an Endpoint Group to route the calls to your PBX. For outgoing calls from your PBX, a matching Endpoint Group is required to authorize outbound calls through the Skyetel network. Thus, the first step in configuring the Skyetel side for use with your PBX is to set up an Endpoint Group. Here’s a typical setup for Incredible PBX 16 for VitalPBX:

  • Name: IncrediblePBX
  • Priority: 1
  • IP Address: IncrediblePBX-Public-IP-Address
  • Port: 5062
  • Protocol: UDP
  • Description: my.incrediblepbx.com

To receive incoming PSTN calls, you’ll need at least one DID. On the Skyetel site, you acquire DIDs under the Phone Numbers tab. You have the option of Porting in Existing Numbers (free for the first 60 days after you sign up for service and fund your account) or purchasing new ones under the Buy Phone Numbers menu option.

Once you have acquired one or more DIDs, navigate to the Local Numbers or Toll Free Numbers tab and specify the desired SIP Format and Endpoint Group for each DID. Add SMS/MMS and E911 support, if desired. Call Forwarding and Failover are also supported. That completes the VoIP setup on the Skyetel side. System Status is always available here.

If you’d like additional details on why we recommend Skyetel, see this Nerd Vittles article.

On the VitalPBX side, we need to add a new Skyetel trunk. Navigate to PBX:External:Trunks:PJSIP. The VitalPBX Trunk setup should look like the following for Skyetel. If you’d like to cut-and-paste the entries for the Match field, here you go:

52.41.52.34,52.8.201.128,52.60.138.31,50.17.48.216,35.156.192.164


[popup url="https://pbs.twimg.com/media/EGDhgsXWsAIbmw1?format=jpg&name=medium" width="1200″ height="700″][/popup]

In Admin:Security:Firewall:WHITELIST, you’ll need to individually Add the five Skyetel IP addresses used in the Match field above and then SAVE your firewall settings.

Finally in PBX:Incoming Calls:CID Modifiers, add a new entry for Skyetel with Skip/Length = 2/10 and Save your settings.

23. Before your PBX can receive calls, you’ll need at least one Inbound Route. This tells the PBX how to route calls from one or more phone numbers (DIDs) that you own to a destination on your PBX, e.g. an extension, a ring group, an IVR, or custom context. Navigate to PBX:External:Inbound Routes to get started. Let’s set up a default inbound route for all the DIDs you have acquired from Skyetel in step #22. Fill in the fields shown below. Then SAVE.

  • Routing Method: Default
  • Description: Default Skyetel
  • DID Pattern: [leave blank for ALL DIDs]
  • CallerID Modifier: Skyetel
  • Inbound Destination: Custom Contexts -> IncrediblePBX

24. Before you can make outbound calls from extensions on your PBX, you’ll need at least one Outbound Route. This tells the PBX which provider to use to complete calls dialed with a certain sequence of numbers. For example, you probably would want 10-digit numbers routed to Skyetel. And, if users dial 1 and then a 10-digit number, you’d probably want those calls routed to Skyetel as well. To create this outbound route, navigate to PBX:External:Outbound Routes. Fill in the fields shown below. Click ADD to add a second Dial Pattern. Click SAVE and Reload Dialplan when finished.

NOTE: While you can "spoof" any CallerID number here, it is only legal to assign CallerID numbers that you actually own. Most carriers do not forward CallerID names to destinations regardless of what you enter here. The CallerID name and number will be shown in your CDR logs: Reports:CDR Reports:CDR.

  • Description: Skyetel-OUT
  • Trunks: Skyetel
  • Outbound CID: [Your Name and CallerID Number]
  • Overwrite CID: YES
  • Dial Pattern: Prepend=1 Pattern=NXXNXXXXXX
  • Dial Pattern: Pattern=1NXXNXXXXXX

25. For the time being, we strongly recommend disabling IPv6 simply because we don’t have the necessary confidence that all of the security mechanisms are in place for IPv6. Here’s how on the CentOS 7 platform:

echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
sed -i 's|#AddressFamily any|AddressFamily inet|' /etc/ssh/sshd_config
systemctl restart sshd
sed -i 's|inet_protocols = all|inet_protocols = ipv4|' /etc/postfix/main.cf
systemctl restart postfix

 
26. Outbound email functionality is essential on your PBX. You’ll need it to be alerted to potential issues with VitalPBX, and you’ll need it for delivery of voicemail messages to users. There are a couple ways to implement it, and both are easy. If you want to use the native capabilities of Postfix to send the emails assuming your provider is not blocking outbound SMTP mail from downstream servers, then follow these steps:

  • Insert your FQDN from step #12b into /etc/hosts immediately after 127.0.0.1
  • Replace the contents of /etc/hostname with the same FQDN
  • Issue the following command using your actual FQDN: hostname FQDN
  • Sending yourself an email: echo "test" | mail -s test you@your-domain.com

If you don’t receive the test email message, then the easiest solution is to configure PostFix as an SMTP Relay using a Gmail account. You can do this easily from within the VitalPBX GUI. Navigate to Admin:System Settings:Email Settings and click the External Mail Server tab. Be sure that Gmail is selected and enter your Gmail name and password in the fields provided. Save your settings and send yourself an email using the field provided.

27. Once you get outbound email flowing, jump down to the next section and obtain IBM TTS and STT passwords. Now set up Voicemail Transcription with Email Message Delivery:

  a. After logging into your VitalPBX server as root using SSH/Putty:

cd /tmp
mkdir sendmail
cd sendmail
wget http://incrediblepbx.com/sendmailibm-vitalpbx.tar.gz
tar zxvf sendmailibm-vitalpbx.tar.gz
rm -f sendmailibm-vitalpbx.tar.gz
mv usr/sbin/sendmailibm /usr/sbin
cd /etc/asterisk/ombutel
echo "[general](+)" > voicemail__60-1-transcript.conf 
echo "; format=wav|wav49|gsm" >> voicemail__60-1-transcript.conf
echo "mailcmd=/usr/sbin/sendmailibm" >> voicemail__60-1-transcript.conf
chown apache:apache voicemail__60-1-transcript.conf
rm -rf /tmp/sendmail

 
  b. Restart Asterisk core services: asterisk -rx "core reload"

  c. Edit /usr/sbin/sendmailibm and insert your IBM Watson STT APIkey on line 23. Change the language on line 31 if you don’t want en-US. Then save the file.

  d. Log back into the VitalPBX GUI and configure the extensions desired for email delivery of voicemail. For each extension in PBX:Extensions:General, enter an Email Address for delivery of voicemails. In PBX:Extensions:Voicemail, verify the VM settings from step #20.

28. We hesitate to even mention (free) Festival TTS as a text-to-speech alternative because it is so bad compared to IBM TTS. But for those that like always free, here’s how to install it. Once installed, you can issue Festival commands in your dialplan using the keyword Festival followed by the text to be spoken in parentheses.

yum -y install festival
echo "[general]" > /etc/asterisk/festival.conf
asterisk -rx "dialplan reload"
festival_server &
systemctl restart asterisk
echo "/usr/bin/festival_server &" >> /etc/rc.d/rc.local

 

29. If you’d like to test the performance of your cloud-based server, here’s how to deploy and run SpeedTest:

cd /root
wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
chmod +x speedtest-cli
/root/speedtest-cli

 
30. Associating CallerID Names (CNAM) with inbound calls for display on SIP phones and in the CDR logs is an often-requested PBX feature. There are a few ways to do it. First, for less than a penny a call, you can activate the feature with your DIDs in the Skyetel Dashboard. Or, for about half the cost, you can acquire an OpenCNAM account and activate it in VitalPBX by navigating to PBX:Incoming Calls:CID Lookup. Choose OpenCNAM as the Source and enter your credentials. Then SAVE your settings and reload the dialplan. Then, for each of your Inbound Routes, add OpenCNAM as the CID Lookup source and Update your configuration.

31. Unless you want a full-time job monitoring the size of your logs, remove the fail2ban Asterisk log which grows every 5 seconds. Navigate to Settings:PBX Settings:Log Files and click the Trash icon beside fail2ban. It’s probably a good idea to turn OFF the Notice option for the full log while you’re at it. Then SAVE your changes.

32. Before you do anything else, navigate to Admin:Admin:Backup & Restore, configure and run a Full Backup, and then download the file and keep it in a safe place. Be advised that Backup/Restore doesn’t restore Add-Ons, /var/lib/asterisk/agi-bin, custom contexts (extensions__80*.conf) in /etc/asterisk/ombutel, custom MySQL databases (mysqldump -u root yourDB > yourDB.sql), custom and lenny sound directories in /var/lib/asterisk/sounds, phpMyAdmin, /usr/local/sbin, and /etc/crontab.

Obtaining IBM Watson TTS and STT Credentials

Incredible PBX uses IBM Watson® for TTS and STT support. This Nerd Vittles tutorial will walk you through getting your IBM account set up and obtaining both your TTS and STT credentials. Be sure to write down BOTH sets of credentials which you’ll need in a minute. For home and SOHO use, IBM access and services generally is FREE even though you must provide a credit card when signing up. Details are provided when you sign up. If you ever forget your passwords, you can retrieve them by navigating to Resource List:Services:TTS or STT:View Full Details:Show Credentials.

Obtaining Wolfram Alpha Credentials

When people ask what exactly Wolfram Alpha is, our favorite answer was provided by Ed Borasky.

It’s an almanac driven by a supercomputer.

That’s an understatement. It’s a bit like calling Google Search a topic index. Unlike Google which provides links to web sites that can provide answers to queries, Wolfram Alpha provides specific and detailed answers to almost any question. Here are a few examples (with descriptions of the functionality) to help you wrap your head around the breadth of information. For a complete list of what’s available, visit Wolfram Alpha’s Examples by Topic. Type a sample query here. Some of our favorites include:

Weather in Charleston South Carolina
Weather forecast for Washington D.C.
Next solar eclipse
Otis Redding
Define politician
Who won the 1969 Superbowl? (Broadway Joe)
What planes are flying overhead now? (flying over your server’s location)
Ham and cheese sandwich (nutritional information)
Holidays 2012 (summary of all holidays for 2012 with dates and DOW)
Medical University of South Carolina (history of MUSC)
Star Trek (show history, air dates, number of episodes, and more)
Apollo 11 (everything you ever wanted to know)
Cheapest Toaster (brand and price)
Battle of Gettysburg (sad day 🙂 )
Daylight Savings Time 2012 (date ranges and how to set your clocks)
Tablets by Motorola (pricing, models, and specs from Best Buy)
Doughnut (you don’t wanna know)
Snickers bar (ditto)
Weather (local weather at your server’s location)

Before you can actually use our TTS implementation of Wolfram Alpha, you’ll need to obtain a free Wolfram Alpha account. As you can imagine, there have to be some rules when you’re using someone else’s supercomputer for free. So here’s the deal. It’s free for non-commercial, personal use once you sign up for an account. But you’re limited to 2,000 queries a month which works out to almost 70 queries a day. Every query requires your personal application ID, and that’s how Wolfram Alpha keeps track of your queries. Considering the price, we think you’ll find the query limitation generous compared to other web resources.

To get started, sign up for a free Wolfram Alpha API account. Just provide your email address and set up a password. It takes less than a minute. Log into your account and click on Get An App ID. Make up a name for your application and write down (and keep secret) your APP-ID code. That’s all there is to getting set up with Wolfram Alpha. If you want to explore costs for commercial use, there are links to let you get more information.

Configuring Your Incredible PBX Credentials

In addition to your Wolfram Alpha APPID, there are two sets of IBM credentials to plug into the Asterisk AGI scripts. Keep in mind that there are different passwords for the IBM Watson TTS and STT services. The TTS credentials will look like the following: $IBM_password. The STT credentials look like this: $API_PASSWORD. Don’t mix them up. The username for both TTS and STT is now the single word: apikey

All of the scripts requiring credentials are located in /var/lib/asterisk/agi-bin so switch to that directory after logging into your server as root. Edit each of the following files and insert your TTS credentials in the variables already provided: nv-today2.php, ibmtts.php, and ibmtts2.php. Edit each of the following files and insert your STT credentials in the variables already provided: getquery.sh, getnumber.sh, and getnumber2.sh. Finally, edit 4747 and insert your Wolfram Alpha APPID.

If you ever want to learn how to develop applications for Asterisk, these scripts coupled with the dialplan code included in /etc/asterisk/ombutel/extensions__80-1-incrediblepbx.conf will point you in the right direction with easy to follow examples.

Managing the AsteriDex SQLite3 Database

We’ve alluded to the AsteriDex database in a couple of VitalPBX articles but never mentioned how to access it. Using a browser, point it to http://server-ip/asteridex4. You can add, edit, display, and delete entries from there. Before you can make changes in the database, issue the following command after logging into your server as root:

chown asterisk:apache /var/lib/asterisk/agi-bin

Taking Incredible PBX for a Test Drive

You can take Incredible PBX for VitalPBX on a test drive in two ways. You can call our server, and then you can try things out on your own server and compare the results. Call our IVR by dialing 1-843-606-0555. For our international friends, you can use the following SIP URI for a free call: 10159591015959@atlanta.voip.ms. For tips on setting up your own secure, hybrid SIP URI with VitalPBX, see our original tutorial. The FreePBX® setup is virtually identical except for the location of the custom SIP setting for match_auth_username=yes. On a VitalPBX server, you will enter it here: Settings:Technology Settings:SIP Settings:CUSTOM.

With Allison’s Demo IVR, you can choose from the following options:

  • 0. Chat with Operator — connects to extension 701
  • 1. AsteriDex Voice Dialer (412) – say "Delta Airlines" or "American Airlines" to connect
  • 2. Conferencing (2663) – log in using 1234 as the conference PIN
  • 3. Wolfram Alpha Almanac (4747) – say "What planes are flying overhead now?"
  • 4. Lenny (53669) – The Telemarketer’s Worst Nightmare
  • 5. Today’s News Headlines (951) — courtesy of Yahoo! News
  • 6. Weather by ZIP Code (947) – enter any 5-digit ZIP code for today’s weather
  • 7. Today in History (86329) — courtesy of OnThisDay.com
  • 8. Call Extension 701 — on your local PBX
  • 9. DISA Voice Dialer (3172) — say any 10-digit number to be connected
  • *. Current TIME and Date (8463) — courtesy of VitalPBX

CAUTION: We have intentionally disabled outbound calls using Option #9 and redirected callers to Lenny. The reason is that an unscrupulous caller could easily run up your phone bill by entering a number with expensive destination charges. If you wish to enable the feature, despite the risks, you can edit extensions__80-1-incrediblepbx.conf and make the change.

You can call your own IVR in a few ways. From an internal VitalPBX phone, dial D-E-M-O (2663) to be connected. Or simply dial the number of the DID you routed to the Incredible PBX Custom Context. Local users can also dial the individual feature codes shown in parentheses above. Be sure that you heed AND test the CAUTION documented above.

Originally published: Monday, October 21, 2019





Need help with Asterisk? Visit the VoIP-info 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.
 



Introducing Incredible PBX Custom Contexts for VitalPBX



Last week we introduced Incredible PBX for VitalPBX 2.3.8 to the Asterisk® community. And today we’re pleased to present the first of many Incredible PBX® add-ons, Allison’s DEMO IVR featuring text-to-speech and voice recognition utilities that take your Asterisk PBX to a whole new level. When we’re finished, you’ll have Headlines News, Weather Reports, Today in History, Wolfram Alpha, Voice Recognition apps to call people in your AsteriDex phonebook and to call anyone else by simply speaking the number to dial, and good ol’ Lenny, the Telemarketer’s Worst Nightmare. We’ll utilize a single custom context to harness the power of 11 Asterisk utilities using an easily configurable Interactive Voice Response (IVR) interface. Last week, VitalPBX released a new Custom Contexts module that has no limitations on the number of contexts you can create for free. But, for today, we’ll do it the old-fashioned way just to demonstrate what’s possible. And it’s pure GPL code.

Prerequisites. Before deploying the Incredible PBX components, you’ll need to install VitalPBX on a platform of your choice behind a hardware-based firewall. You’ll need to add an extension 701 where you can receive calls on a softphone or SIP phone, and you’ll need at least one SIP trunk to make and receive calls from those not connected to your PBX. The Outbound Route for this trunk must support 10 and 11-digit calls in the following formats: NXXNXXXXXX and 1NXXNXXXXXX. You’ll also need to install the Custom Contexts add-on to VitalPBX and then configure the (free) Custom Context for use by the Incredible PBX add-ons. The Inbound Route for at least one of your trunks must send calls to this new Incredible PBX Custom Context. Our previous tutorial will walk you through the setup steps for all of this.

In the VitalPBX GUI, navigate to PBX:Applications:Custom Applications and add a new 3366 (D-E-M-O) application for the Incredible PBX Demo IVR. Make it look like the following. Save your entries and Reload your dialplan when you’re finished.



In the VitalPBX GUI, navigate to PBX:Applications:Conference and add a 2663 (C-O-N-F) conference that looks like the following using PINs of your choice for participants and the conference leader. Save your entries and Reload your dialplan when you’re finished.



Finally, navigate to Settings:Technology Settings:SIP Settings:OTHERS and set SRV Lookups to YES. Save your settings and reload the dialplan.

Obtaining IBM Watson TTS and STT Credentials

Incredible PBX uses IBM Watson® for TTS and STT support. This Nerd Vittles tutorial will walk you through getting your IBM account set up and obtaining both your TTS and STT credentials. Be sure to write down BOTH sets of credentials which you’ll need in a minute. For home and SOHO use, IBM access and services generally is FREE even though you must provide a credit card when signing up. Details are provided when you sign up. If you ever forget your passwords, you can retrieve them by navigating to Watson:ExistingServices:TTS or STT:View Full Details:Show Credentials.

Obtaining Wolfram Alpha Credentials

When people ask what exactly Wolfram Alpha is, our favorite answer was provided by Ed Borasky.

It’s an almanac driven by a supercomputer.

That’s an understatement. It’s a bit like calling Google Search a topic index. Unlike Google which provides links to web sites that can provide answers to queries, Wolfram Alpha provides specific and detailed answers to almost any question. Here are a few examples (with descriptions of the functionality) to help you wrap your head around the breadth of information. For a complete list of what’s available, visit Wolfram Alpha’s Examples by Topic. Type a sample query here. Some of our favorites include:

Weather in Charleston South Carolina
Weather forecast for Washington D.C.
Next solar eclipse
Otis Redding
Define politician
Who won the 1969 Superbowl? (Broadway Joe)
What planes are flying overhead now? (flying over your server’s location)
Ham and cheese sandwich (nutritional information)
Holidays 2012 (summary of all holidays for 2012 with dates and DOW)
Medical University of South Carolina (history of MUSC)
Star Trek (show history, air dates, number of episodes, and more)
Apollo 11 (everything you ever wanted to know)
Cheapest Toaster (brand and price)
Battle of Gettysburg (sad day 🙂 )
Daylight Savings Time 2012 (date ranges and how to set your clocks)
Tablets by Motorola (pricing, models, and specs from Best Buy)
Doughnut (you don’t wanna know)
Snickers bar (ditto)
Weather (local weather at your server’s location)

Before you can actually use our TTS implementation of Wolfram Alpha, you’ll need to obtain a free Wolfram Alpha account. As you can imagine, there have to be some rules when you’re using someone else’s supercomputer for free. So here’s the deal. It’s free for non-commercial, personal use once you sign up for an account. But you’re limited to 2,000 queries a month which works out to almost 70 queries a day. Every query requires your personal application ID, and that’s how Wolfram Alpha keeps track of your queries. Considering the price, we think you’ll find the query limitation generous compared to other web resources.

To get started, sign up for a free Wolfram Alpha API account. Just provide your email address and set up a password. It takes less than a minute. Log into your account and click on Get An App ID. Make up a name for your application and write down (and keep secret) your APP-ID code. That’s all there is to getting set up with Wolfram Alpha. If you want to explore costs for commercial use, there are links to let you get more information.

Installing Incredible PBX Components

To install the Incredible PBX components on your VitalPBX server, login to your server as root and issue the following commands:

# on VitalPBX 3.x servers only, issue next 2 commands:
ln -s /etc/asterisk/vitalpbx /etc/asterisk/ombutel
ln -s /usr/share/vitalpbx /usr/share/ombutel

cd /
yum -y install dialog wget nano tar mailx
cp -p /etc/crontab /etc/crontab.bak
wget http://incrediblepbx.com/incrediblepbx-vitalpbx.tar.gz
tar zxvf incrediblepbx-vitalpbx.tar.gz
rm -f incrediblepbx-vitalpbx.tar.gz
chown asterisk:asterisk /var/lib/asterisk
chown asterisk:apache /var/lib/asterisk/agi-bin
/etc/init.d/asterisk restart

The GPL3 license for all of the Incredible PBX components is available for review in /root/COPYING.

Configuring Your Incredible PBX Credentials

In addition to your Wolfram Alpha APPID, there are two sets of IBM credentials to plug into the Asterisk AGI scripts. Keep in mind that there are different passwords for the IBM Watson TTS and STT services. The TTS credentials will look like the following: $IBM_password. The STT credentials look like this: $API_PASSWORD. Don’t mix them up. The username for both TTS and STT is now the single word: apikey

All of the scripts requiring credentials are located in /var/lib/asterisk/agi-bin so switch to that directory after logging into your server as root. Edit each of the following files and insert your TTS credentials in the variables already provided: nv-today2.php, ibmtts.php, and ibmtts2.php. Edit each of the following files and insert your STT credentials in the variables already provided: getquery.sh, getnumber.sh, and getnumber2.sh. Finally, edit 4747 and insert your Wolfram Alpha APPID.

If you ever want to learn how to develop applications for Asterisk, these scripts coupled with the dialplan code included in /etc/asterisk/ombutel/extensions__80-1-incrediblepbx.conf will point you in the right direction with easy to follow examples.

Using Asteridex with VitalPBX

AsteriDex is a web-based dialer and address book application for Asterisk and VitalPBX. It lets you store and manage phone numbers of all your friends and business associates in an easy-to-use SQLite3 database. You simply call up the application with your favorite web browser: http://vitalpbx-ip-address/asteridex4/. When you click on a contact that you wish to call, AsteriDex first calls you at extension 701, and then AsteriDex connects you to your contact through another outbound call made using your default outbound trunk that supports numbers in the 1NXXNXXXXXX format.

Before AsteriDex Click-to-Call will work, you must authorize AsteriDex to access Asterisk from your browser. After logging into your server as root, edit the following file in /etc/asterisk/ombutel: manager__50-ombutel-user.conf. For each browser IP address you wish to authorize, add an entry like the following immediately below the existing permit entry in the file. Then reload the Asterisk dialplan: asterisk -rx "dialplan reload"

permit=12.34.56.78
permit=192.168.0.0/255.255.255.0

Taking Incredible PBX for a Test Drive

You can take Incredible PBX for VitalPBX on a test drive in two ways. You can call our server, and then you can try things out on your own server and compare the results. Call our IVR by dialing 1-843-606-0555. For our international friends, you can use the following SIP URI for a free call: 10159591015959@atlanta.voip.ms. For tips on setting up your own secure, hybrid SIP URI with VitalPBX, see our original tutorial. The FreePBX® setup is virtually identical except for the location of the custom SIP setting for match_auth_username=yes. On a VitalPBX server, you will enter it here: Settings:Technology Settings:SIP Settings:CUSTOM.

With Allison’s Demo IVR, you can choose from the following options:

  • 0. Chat with Operator — connects to extension 701
  • 1. AsteriDex Voice Dialer – say "Delta Airlines" or "American Airlines" to connect
  • 2. Conferencing – log in using 1234 as the conference PIN
  • 3. Wolfram Alpha Almanac – say "What planes are flying overhead now?"
  • 4. Lenny – The Telemarketer’s Worst Nightmare
  • 5. Today’s News Headlines — courtesy of Yahoo! News
  • 6. Weather by ZIP Code – enter any 5-digit ZIP code for today’s weather
  • 7. Today in History — courtesy of OnThisDay.com
  • 8. Chat with Nerd Uno — courtesy of SIP URI connection to 3CX iPhone Client
  • 9. DISA Voice Dialer — say any 10-digit number to be connected
  • *. Current Date and Time — courtesy of VitalPBX

CAUTION: We have intentionally disabled outbound calls using Option #9 and redirected callers to Lenny. The reason is that an unscrupulous caller could easily run up your phone bill by entering a number with expensive destination charges. If you wish to enable the feature, despite the risks, you can edit extensions__80-1-incrediblepbx.conf and make the change.

You can call your own IVR in two ways. From an internal VitalPBX phone, dial D-E-M-O (2663) to be connected. Or simply dial the number of the DID you routed to the Incredible PBX Custom Context. Either way, you should be connected to the Incredible PBX IVR running on your VitalPBX server. Be sure that you heed AND test the CAUTION documented above.

Using Incredible PBX Features Independently of IVR

Now that we have some of the Incredible PBX applications in place using the IVR, there may be situations in which you want callers to be able to access the individual components without navigating through the IVR. For example, you may want to let users contact LENNY (53669) directly. There are three steps to do this: (1) add a new Custom Context for the feature desired, (2) add a new Custom Application with the number to associate with the application, and (3) add a snippet of dialplan code to extensions__80-custom.conf redirecting the Custom Context to the matching IVR priority. Then reload Asterisk dialplan.

For the new Lenny Custom Context, here are the entries:

Description: Lenny
Context: lenny
Extension: s
Priority: 1
Destination: Terminate Call -> Hangup

For the new Lenny Custom Application, here are the entries:

Code: 53669
Name: Lenny
Enabled: Yes
Destination:  Custom Contexts -> Lenny

In /etc/asterisk/ombutel/extensions__80-custom.conf, add the following dialplan code and reload the Asterisk dialplan: asterisk -rx "dialplan reload"

[lenny]
exten => s,1,NoOp(Lenny)
 same => n,Answer
 same => n,Goto(incrediblepbx,53669,1)

Let’s walk through one more example to be sure you get the hang of it. To mimic the News Headlines (951) setup on other Incredible PBX platforms, here are the steps:

For the News Custom Context, here are the entries:

Description: News
Context: news
Extension: s
Priority: 1
Destination: Terminate Call -> Hangup

For the News Custom Application, here are the entries:

Code: 951
Name: News
Enabled: Yes
Destination:  Custom Contexts -> News

In /etc/asterisk/ombutel/extensions__80-custom.conf, add the following dialplan code and reload the Asterisk dialplan: asterisk -rx "dialplan reload"

[news]
exten => s,1,NoOp(News)
 same => n,Answer
 same => n,Goto(incrediblepbx,5,1)

Coming Events. We still plan to address security for those that want to deploy this terrific platform in the cloud. And we’re already working on a new version of CallerID Superfecta for VitalPBX that will let you use OpenCNAM to associate names with CallerID numbers. You can follow our progress and offer suggestions on the PIAF Forum.

Originally published: Monday, October 14, 2019





Need help with Asterisk? Visit the VoIP-info 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 Tips & Tricks to Supercharge Incredible PBX 16-15



As September comes to a close, we wanted to offer up some simple tips and tricks to get the most out of Incredible PBX® 16-15. Many of these already have been covered on the PIAF Forum so, if you’re not already a subscriber, sign up to keep up with the latest information. Perhaps the most frequently asked question concerns the painfully slow restarts that some folks experience with SendMail and/or Fail2Ban. So let’s start there.

Assigning an FQDN to Your Server

Many system services depend upon identification of the fully-qualified domain name (FQDN) assigned to your server. If you don’t have one, services such as Fail2Ban and SendMail have a difficult time starting and restarting. This includes the iptables-restart script which includes a restart of the Fail2Ban service. With SendMail, you not only will have difficulty restarting the service, but outbound email delivery also will fail since SendMail always checks for a valid sender email address before sending out a message.

If you don’t have a domain that you control, you can always use a free dynamic DNS service such as No-IP which has the added advantage of managing changes in your host’s IP address if you don’t have a static IP address.

Once you have an FQDN for your server, here are the simple steps to assign it to your server. First, edit /etc/hosts, add the FQDN immediately after 127.0.0.1, and then save the file. Next, edit /etc/hostname and replace the default entry with your FQDN. Finally, issue the following command using your actual FQDN: hostname FQDN.

Now you can test restarting Fail2Ban and SendMail with the following commands:

systemctl restart sendmail
systemctl restart fail2ban

And you can check the status of the two services with the following commands:

systemctl status sendmail
systemctl status fail2ban

Configuring SendMail/Exim with Incredible PBX 16-15

You’re not out of the woods yet if you wish to use SendMail (CentOS) or Exim (Raspbian) to deliver email and voicemail messages. Unless your PBX is in the Cloud with a public IP address on the Internet, be advised that many hosting providers such as Comcast, Spectrum, and AT&T block downstream mail servers from sending email. If you’re using one of these services in your home or office, the solution is to use Gmail or your local ISP as a smart relay host to send mail from your server. Setup instructions for SendMail on the CentOS 7 platform are available here. Setup instructions for Exim on the Raspberry Pi are available here.

Blocking Call Scammers and Robocalls

As election season kicks into high gear, expect robocalls to go through the roof. Not that the diehard scammers care but Congress exempted all politicians from the rules pertaining to robocalls. And then there are those that spoof a phone number similar to yours in order to treat you to the latest car warranty deal or Caribbean vacation. So here’s a way to block 99% of these callers, almost all of whom depend upon autodialers and call center software to distribute calls to live operators once you answer the call.

The design is simple to implement with Incredible PBX. Instead of answering incoming calls with a standard AutoAttendant or IVR, we’ll play a brief announcement followed by a request that the caller "press 7″ or some other number to be connected. When the caller doesn’t press the requested number within a brief number of seconds, Incredible PBX will hangup the call.

Many SIP providers support the early media feature which lets two SIP user agents communicate before a call is actually answered. If your provider supports this and you pay by the minute for inbound call traffic, then we’ll show you how to use the early media feature to block these callers without ever answering the calls and incurring charges. The easiest way to determine whether your SIP provider supports early media is to implement the early media code below and try a test call. If you hear the greeting message after dialing your own number, then early media is supported. If not, use the other dialplan code.

Incredible PBX already includes all the tools you’ll need to implement this. We’ll use a little modified Announcement dialplan code to greet the caller with Allison’s Generic Welcome message: "Thank you for calling. Please hold a moment while we locate someone to take your call." Then we’ll tack on an extra message which says: "To continue in English, press 7." If you’d prefer a different number, you can modify the dialplan code below accordingly.

Add this early media dialplan code to the end of /etc/asterisk/extensions_custom.conf. If you prefer a number other than 7, then replace "7″ in both lines 4 and 6 below:

[hello-caller]
exten => s,1,Progress
exten => s,n(begin),Noop(Playing announcement Howdy as Early Media)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Playback(custom/nv-GenericWelcome&silence/1&continue-in-english&press-7,noanswer)
exten => s,n,WaitExten(,)
exten => 7,1,Goto(ivr-1,s,1)
exten => t,1,Hangup
exten => i,1,Hangup
exten => fax,1,Noop(Fax detected!)
exten => fax,2,Goto(custom-fax-iaxmodem,s,1)
;--== end of [hello-caller] ==--;

In the FreePBX GUI, add a new Custom Destination:

Target: hello-caller,s,1
Description: Scam Blocker

In the FreePBX GUI, modify the Inbound Route for each DID and set the Destination to Custom Destination: Scam Blocker. Save your settings and reload your dialplan.

Now place a test call to your DID and see if you hear the greeting message. If so, you’re done.

If not, edit /etc/asterisk/extensions_custom.conf and replace the [hello-caller] context at the bottom of the file with the following. You can replace "7″ on lines 6 and 8, if desired. Then reload your dialplan: asterisk -rx "dialplan reload". Then place another test call.

[hello-caller]
exten => s,1,GotoIf($["${CHANNEL(state)}" = "Up"]?begin)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n(begin),Noop(Playing announcement Howdy)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n(play),Background(custom/nv-GenericWelcome&silence/1&continue-in-english&press-7,nm)
exten => s,n,WaitExten(,)
exten => 7,1,Goto(ivr-1,s,1)
exten => t,1,Hangup
exten => i,1,Hangup
exten => fax,1,Noop(Fax detected!)
exten => fax,2,Goto(custom-fax-iaxmodem,s,1)
;--== end of [hello-caller] ==--;

Separating Friends from Foes with Fail2Ban

If you’ve ever locked yourself out of your server when Fail2Ban mistakenly believed you were one of the bad guys, welcome to the club. Here’s the simple way to make sure it never happens again. First, deploy a NeoRouter Server and activate the NeoRouter Client on both your PBX and desktop machines. Always login to your PBX using the 10.0.0.x NeoRouter Client IP address of your PBX. Next, edit /etc/fail2ban/jail.conf. Scroll down to the [DEFAULT] section and edit the line which begins with ignoreip. Make certain the line includes the following entries. Then save the file and restart Fail2Ban: systemctl restart fail2ban

ignoreip = 127.0.0.1/8 10.0.0.0/24

You can always check who is currently banned with the command: iptables -nL

And you can unban an IP address by logging in to SSH from a different IP address and using the chain name and banned IP address shown in iptables -nL with the following command:

fail2ban-client set apache-forbidden unbanip xx.xx.xx.xx

Adding Outbound CNAM Data to CDRs

In many implementations, it’s useful in Call Detail Records (CDRs) to be able to associate names (CNAM) with outbound calls just as we do with incoming calls. One of our earliest Asterisk applications, CallerID Superfecta, provides an easy way to do that with just a little tweaking in Incredible PBX 16-15.

1. Open the FreePBX GUI in a browser and go to Admin -> CID Superfecta. There should be one Default setup but it’ll show as disabled. For some quirky reason, you can’t make enabling it stick so click on the third (COPY) option under Actions to create a second setup. Then go down to that one and click the first button (Enable) under Actions. Make future setup changes to CallerID Superfecta by clicking on that setup.

2. Next, log into your server as root and issue the following commands:

cd /root
wget http://incrediblepbx.com/dialout-cnam.tar.gz
tar zxvf dialout-cnam.tar.gz
rm -f dialout-cnam.tar.gz

3. Run the script: /root/install-dialout-cnam.sh. Choose the number of the new CID Superfecta setup (probably will be a negative number which is fine). No idea why.

4. Once the script completes, make a call from extension 701 to an outside number. The new CNAM info should be shown in the ACCOUNT column of your CDR listing.

Originally published: Monday, September 30, 2019



Need help with Asterisk? Visit the VoIP-info 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.
 



Desktop Dream Machine: Incredible PBX 16-15 for VirtualBox




If you’re new to the VoIP world and want to kick the tires to see what you’re missing, then today’s one minute setup is for you. You’ll get a $10 credit to try out some penny-a-minute calls and to purchase a $1 a month phone number in your choice of area codes. If you decide VoIP is not for you, you don’t have to buy anything ever. And you can use almost any desktop computer you already own to bring up the VirtualBox® edition of Incredible PBX® 16-15.

If you’ve followed Nerd Vittles over the years, you already know that VirtualBox from Oracle® is one of our favorite platforms. Once VirtualBox is installed on your desktop computer, adding Incredible PBX is a snap. Download the latest Incredible PBX image from SourceForge, double-click on the downloaded image, check the initialize MAC address box, and boom. In less than a minute, your PBX is ready to use. There are no hidden fees or crippleware to hinder your use of Incredible PBX for as long as you like. Just set up an account with our Platinum provider, Skyetel, and you can start making calls in minutes. Of course, the Incredible PBX feature set is included as well which brings you nearly three dozen applications for Asterisk® that will revolutionize your communications platform. Speech-to-text, voice recognition, and a Siri-like telephony interface are as close as your SIP phone.

Installing Oracle VM VirtualBox

Oracle’s virtual machine platform inherited from Sun is amazing. It’s not only free, but it’s pure GPL2 code. VirtualBox gives you a virtual machine platform that runs on top of any desktop operating system. In terms of limitations, we haven’t found any. We even tested this on an Atom-based Windows 7 machine with 2GB of RAM, and it worked without a hiccup. So step #1 today is to download one or more of the VirtualBox installers from VirtualBox.org or Oracle.com. Our recommendation is to put all of the 100MB installers on a 4GB thumb drive.1 Then you’ll have everything in one place whenever and wherever you happen to need it. Once you’ve downloaded the software, simply install it onto your favorite desktop machine. Accept all of the default settings, and you’ll be good to go. For more details, here’s a link to the Oracle VM VirtualBox User Manual.

Installing the Incredible PBX 16-15 Image

To begin, download the Incredible PBX 16-15 image (3.2 GB) onto your desktop.

Next, double-click on the Incredible PBX .ova image on your desktop. Be sure to check the box to initialize the MAC address of the image and then click Import. Once the import is finished, you’ll see a new Incredible PBX virtual machine in the VM List of the VirtualBox Manager Window. Let’s make a couple of one-time adjustments to the Incredible PBX configuration to account for possible differences in sound and network cards on different host machines.

(1) Click once on the Incredible PBX virtual machine in the VM List. Then (2) click the Settings button. In the Audio tab, check the Enable Audio option and choose your sound card. In the Network tab for Adapter 1, check the Enable Network Adapter option. From the Attached to pull-down menu, choose Bridged Adapter. Then select your network card from the Name list. Then click OK. That’s all the configuration that is necessary for Incredible PBX.

Running Incredible PBX 16-15 in VirtualBox

Once you’ve imported and configured the Incredible PBX Virtual Machine, you’re ready to go. Highlight the Incredible PBX virtual machine in the VM List on the VirtualBox Manager Window and click the Start button. The standard Linux boot procedure will begin and, within a few seconds, you’ll get the familiar Linux login prompt. During the bootstrap procedure, you’ll see a couple of dialogue boxes pop up that explain the keystrokes to move back and forth between your host operating system desktop and your virtual machine. Remember, you still have full access to your desktop computer. Incredible PBX is merely running as a task in a VM window. Always gracefully halt Incredible PBX just as you would on any computer.

Here’s what you need to know. To work in the Incredible PBX virtual machine, just left-click your mouse while it is positioned inside the VM window. To return to your host operating system desktop, press the right Option key on Windows machines or the left Command key on any Mac. For other operating systems, read the dialogue boxes for instructions on moving around. To access the Linux CLI, login as root with the default password: password. Change your root password immediately by typing: passwd. Then update your admin password for web access by typing: ./admin-pw-change. You’ll need the admin password to access the web GUI and manage your PBX. You can update all of your other passwords using the scripts provided in /root.

Setting the Date and Time with VirtualBox

On some platforms, VirtualBox has a nasty habit of mangling the date and time of your virtual machine. Typing date will tell you whether your VM is affected. If it’s a problem, manually set the date and time and then update the hardware clock. Here’s how assuming 08130709 is the month, day, and correct time of your server:

date 08130709
clock -w

Configuring Skyetel for Incredible PBX 16-15

If you’d like to try out the Skyetel service at no charge, here’s the drill. Sign up for Skyetel service to take advantage of the Nerd Vittles specials. First, complete the Prequalification Form here. You then will be provided a link to the Skyetel site to complete your registration. Once you have registered on the Skyetel site and your account has been activated, open a support ticket and request the $10 credit for your account by referencing the Nerd Vittles special offer. Once you are satisfied with the service, fund your account as desired, and Skyetel will match your deposit of up to $250 simply by opening another ticket. That gets you up to $500 of half-price calling. Credit is limited to one per person, company, and address. Effective 10/1/2023, $25/month minimum spend required.

Skyetel does not use SIP registrations to make connections to your PBX. Instead, Skyetel utilizes Endpoint Groups to identify which servers can communicate with the Skyetel service. An Endpoint Group consists of a Name, an IP address, a UDP or TCP port for the connection, and a numerical Priority for the group. For incoming calls destined to your PBX, DIDs are associated with an Endpoint Group to route the calls to your PBX. For outgoing calls from your PBX, a matching Endpoint Group is required to authorize outbound calls through the Skyetel network. Thus, the first step in configuring the Skyetel side for use with your PBX is to set up an Endpoint Group. Here’s a typical setup for Incredible PBX 16-15:

  • Name: MyPBX
  • Priority: 1
  • IP Address: PBX-Public-IP-Address
  • Port: 5060
  • Protocol: UDP
  • Description: my.incrediblepbx.com

To receive incoming PSTN calls, you’ll need at least one DID. On the Skyetel site, you acquire DIDs under the Phone Numbers tab. You have the option of Porting in Existing Numbers (free for the first 60 days after you sign up for service) or purchasing new ones under the Buy Phone Numbers menu option.

Once you have acquired one or more DIDs, navigate to the Local Numbers or Toll Free Numbers tab and specify the desired SIP Format and Endpoint Group for each DID. Add SMS/MMS and E911 support, if desired. Call Forwarding and Failover are also supported. That completes the VoIP setup on the Skyetel side. System Status is always available here.

Configuring VoIP.ms for Incredible PBX 16-15

To sign up for VoIP.ms service, may we suggest you use our signup link so that Nerd Vittles gets a referral credit for your signup. Once your account is set up, you’ll need to set up a SIP SubAccount and, for Authentication Type, choose Static IP Authentication and enter your Incredible PBX 16-15 server’s public IP address. For Transport, choose UDP. For Device Type, choose Asterisk, IP PBX, Gateway or VoIP Switch. Order a DID in their web panel, and then point the DID to the SubAccount you just created. Be sure to specify atlanta1.voip.ms as the POP from which to receive incoming calls.

Configuring V1VoIP for Incredible PBX 16-15

To sign up for V1VoIP service, sign up on their web site. Then login to your account and order a DID under the DIDs tab. Once the DID has been assigned, choose View DIDs and click on the Forwarding button beside your DID. For Option #1, choose Forward to IP Address/PBX. For the Forwarding Address, enter the public IP address of your server. For the T/O (timeout) value, set it to 2o seconds. Then click the Update button. Under the Termination tab, create a new Endpoint with the public IP address of your server so that you can place outbound calls through V1VoIP.

Configuring Anveo Direct for Incredible PBX 16-15

To sign up for Anveo Direct service, sign up on their web site and then login. After adding funds to your account, purchase a DID under Inbound Service -> Order DID. Next, choose Configure Destination SIP Trunk. Give the Trunk a name. For the Primary SIP URI, enter $[E164]$@server-IP-address. For Call Options, select your new DID from the list. You also must whitelist your public IP address under Outbound Service -> Configure. Create a new Call Termination Trunk and name it to match your server. For Dialing Prefix, choose six alphanumeric characters beginning with a zero. In Authorized IP Addresses, enter the public IP address of your server. Set an appropriate rate cap. We like $0.01 per minute to be safe. Set a concurrent calls limit. We like 2. For the Call Routing Method, choose Least Cost unless you’re feeling extravagant. For Routes/Carriers, choose Standard Routes. Write down your Dialing Prefix and then click the Save button.

Before you can make outbound calls through Anveo Direct from your PBX, you first must configure the Dialing Prefix that you wrote down in the previous step. Log into the GUI as admin using a web browser and edit the Anveo-Out trunk in Connectivity -> Trunks. Click on the custom-Settings tab and replace anveo-pin with your actual Dialing Prefix. Click Submit and Apply Config to complete the setup.

By default, incoming Anveo Direct calls will be processed by the Default inbound route on your PBX. If you wish to redirect incoming Anveo Direct calls using DID-specific inbound routes, then you’ve got a bit more work to do. In addition to creating the inbound route using the 11-digit Anveo Direct DID, enter the following commands after logging into your server as root using SSH/Putty:

cd /etc/asterisk
echo "[from-anveo]" >> extensions_custom.conf
echo "exten => _.,1,Ringing" >> extensions_custom.conf
echo "exten => _.,n,Goto(from-trunk,\\${SIP_HEADER(X-anveo-e164)},1)" >> extensions_custom.conf
asterisk -rx "dialplan reload"

Configuring a Softphone for Incredible PBX 16-15

We’re in the home stretch now. You can connect virtually any kind of telephone to your new PBX. Plain Old Phones require an analog telephone adapter (ATA) which can be a separate board in your computer from a company such as Digium. Or it can be a standalone SIP device such as ObiHai’s OBi100 or OBi110 (if you have a phone line from Ma Bell to hook up as well). SIP phones can be connected directly so long as they have an IP address. These could be hardware devices or software devices such as the YateClient softphone. We’ll start with a free one today so you can begin making calls. You can find dozens of recommendations for hardware-based SIP phones both on Nerd Vittles and the PIAF Forum when you’re ready to get serious about VoIP telephony.

We recommend YateClient which is free. Download it from here. Run YateClient once you’ve installed it and enter the credentials for the 701 extension on Incredible PBX. You can find them by running /root/show-passwords. You’ll need the IP address of your server plus your extension 701 password. In the YateClient, fill in the blanks using the IP address of your Server, 701 for your Username, and whatever Password was assigned to the extension when you installed Incredible PBX. Click OK to save your entries.

Configuring Incredible PBX for VirtualBox

In order to take advantage of all the Incredible PBX applications, you’ll need to obtain IBM text-to-speech (TTS) and speech-to-text (STT) credentials as well as a (free) Application ID for Wolfram Alpha.

This Nerd Vittles tutorial will walk you through getting your IBM account set up and obtaining both your TTS and STT credentials. Be sure to write down BOTH sets of credentials which you’ll need in a minute. For home and SOHO use, IBM access and services are mostly FREE even though you must provide a credit card when signing up. The IBM signup process explains their pricing plans.

To use Wolfram Alpha, sign up for a free Wolfram Alpha API account. Just provide your email address and set up a password. It takes less than a minute. Log into your account and click on Get An App ID. Make up a name for your application and write down (and keep secret) your APP-ID code. That’s all there is to getting set up with Wolfram Alpha. If you want to explore costs for commercial use, there are links to let you get more information.

In addition to your Wolfram Alpha APPID, there are two sets of IBM credentials to plug into the Asterisk AGI scripts. Keep in mind that there are different usernames and passwords for the IBM Watson TTS and STT services. The TTS credentials will look like the following: $IBM_username and $IBM_password. The STT credentials look like this: $API_USERNAME and $API_PASSWORD. Don’t mix them up. 🙂

All of the scripts requiring credentials are located in /var/lib/asterisk/agi-bin so switch to that directory after logging into your server as root. Edit each of the following files and insert your TTS credentials in the variables already provided: nv-today2.php, ibmtts.php, and ibmtts2.php. Edit each of the following files and insert your STT credentials in the variables already provided: getquery.sh, getnumber.sh, and getnumber2.sh. Finally, edit 4747 and insert your Wolfram Alpha APPID.

Using Asteridex with Incredible PBX

AsteriDex is a web-based dialer and address book application for Asterisk and Incredible PBX. It lets you store and manage phone numbers of all your friends and business associates in an easy-to-use SQLite3 database. You simply call up the application with your favorite web browser: http://pbx-ip-address/asteridex4/. When you click on a contact that you wish to call, AsteriDex first calls you at extension 701, and then AsteriDex connects you to your contact through another outbound call made using your default outbound trunk that supports numbers in the 1NXXNXXXXXX format.

Taking Incredible PBX for a Test Drive

You can take Incredible PBX on a test drive by dialing D-E-M-O (3366) from any phone connected to your PBX.

With Allison’s Demo IVR, you can choose from the following options:

  • 0. Chat with Operator — connects to extension 701
  • 1. AsteriDex Voice Dialer – say "Delta Airlines" or "American Airlines" to connect
  • 2. Conferencing – log in using 1234 as the conference PIN
  • 3. Wolfram Alpha Almanac – say "What planes are flying overhead"
  • 4. Lenny – The Telemarketer’s Worst Nightmare
  • 5. Today’s News Headlines — courtesy of Yahoo! News
  • 6. Weather by ZIP Code – enter any 5-digit ZIP code for today’s weather
  • 7. Today in History — courtesy of OnThisDay.com
  • 8. Chat with Nerd Uno — courtesy of SIP URI connection to 3CX iPhone Client
  • 9. DISA Voice Dialer — say any 10-digit number to be connected
  • *. Current Date and Time — courtesy of Incredible PBX

Originally published: Monday, September 23, 2019



Need help with Asterisk? Visit the VoIP-info 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. Many of our purchase links refer users to Amazon when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from Amazon to help cover the costs of our blog. We never recommend particular products solely to generate Amazon commissions. However, when pricing is comparable or availability is favorable, we support Amazon because Amazon supports us. []

Mastering the Incredible PBX 16-15 Feature Set with Raspbian



This week we’ll finish up our introduction of Incredible PBX® 16-15 for the Raspberry Pi with a quick look at some of the additional features that are offered on this new platform and that were not covered in our first and second articles. These include text-to-speech apps for news, weather, and today in history as well as the sample ODBC apps for speed dialing and employee data base lookups. We’ll also walk you through the conferencing setup and document the easiest way to deploy an Interactive Voice Response (IVR) system or a Stealth AutoAttendant with or without Direct Inward System Access (DISA) which provides a way to call into your PBX from anywhere and obtain dial tone to make calls or access features just as if you were using a local phone connected to your PBX. We’ll finish up with a review of the Incredible PBX security model: Travelin’ Man 3 IPtables firewall, Fail2Ban, and PortKnocker.

Introduction to Incredible PBX TTS Apps

Text-to-Speech (TTS) applications are included in Incredible PBX for two reasons. First, they provide useful information by phone. Second, they document the procedure required to build your own TTS applications using Asterisk®. That process typically includes a dialplan code addition to /etc/asterisk/extensions_custom.conf plus a PHP/AGI script which must be stored in /var/lib/asterisk/agi-bin. The actual interaction with the caller is handled in the dialplan code using a TTS engine to convert the text results of the PHP/AGI query into audio suitable for playback over the telephone. The (free) PicoTTS engine is included in the Incredible PBX image for the Raspberry Pi. The commercial IBM TTS engine is also available.

The job of the dialplan code is to answer the incoming call and prompt the caller for any necessary information that needs to be passed to the PHP/AGI script to obtain the information sought by the caller. For example, with the Weather by ZIP code app, the caller dials Z-I-P (947) and the dial plan code prompts the caller for the ZIP code of the desired weather report. This ZIP code is then passed to the nv-weather-zip.php AGI script to retrieve the requested weather forecast. The text results of the query then are passed back to the dialplan code which plays back the results to the caller using the PicoTTS engine.

Three sample TTS applications are included. Dial 951 for the latest Yahoo News headlines. Dial 947 to obtain a weather report for any American city using its ZIP code. Dial T-O-D-A-Y to listen to Today in History events for the current day of the year.

Introduction to Incredible PBX ODBC Apps

As with TTS apps, sample ODBC apps are included in Incredible PBX to provide useful information to callers and to document the procedure required to build your own ODBC applications with Asterisk. For those unfamiliar with ODBC, it is a middleware component that lets you build generic database applications that will work with almost any data base management system. In our case, we are using the MySQL clone, MariDB, as the backend database. But the same ODBC API could be used with a database stored in SQLite, or SQL Server, or PostgreSQL. To interact with your own database, the first step is to install an ODBC connector for your particular database so that it can "talk" to Linux and to Asterisk. On the Linux side, take a look at /etc/odbc.ini for examples of how this is done for individual databases. If you’re using a backend database other than MySQL/MariaDB, then the driver must be installed and added to /etc/odbcinst.ini. On the Asterisk side, there are three pieces that need to be put in place in /etc/asterisk. res_odbc_custom.conf houses the actual linkages to the ODBC databases defined in /etc/odbc.ini. func_odbc.conf houses the actual ODBC queries that will be used to read and write information from and to your databases. Finally, odbc.conf contains the dialplan code that will be used to interact with the caller. It answers the incoming calls, prompts the caller for necessary data to complete the query, executes the query defined in func_odbc.conf, and then converts the text results to audio and passes the results back to the caller using the PicoTTS app.

Two sample ODBC applications are included. Dial 222 to obtain an employee name lookup from the employee timeclock database by entering the employee number, e.g. 12345. Dial 223 for a speed dial application using the AsteriDex dialcode (the first 3 letters of a name). For example, enter D-E-L to obtain phone number of Delta Airlines and optionally place the call.

Introduction to Incredible PBX Conference Bridge

The Incredible PBX platform includes a preconfigured conference application which makes it easy for two or more parties to confer regarding any subject matter of common interest. Those with a local extension on the PBX can join the conference by dialing C-O-N-F (2663). For callers outside the PBX to participate, you would need to add a DID that points to the conference number. We’ve made it easy by including this option in the sample IVR created by Allison Smith. Simply designate the IVR as the destination for a DID and tell users to choose option 2. Local users can call D-E-M-O (3366) and choose option 2.

Before using the conference application, you will want to reset the conference passwords. There’s one for users and a second one for the conference leader. After logging into your server as root, issue the command: ./reset-conference-pins. You can display most of the passwords on your PBX including the conference PINs: ./show-passwords.

The conference bridge setup is configured in the GUI: Applications -> Conferences. Here you can decide whether to require the conference administrator to be present before users can join the conference, you can force termination of the conference when the admin leaves, you can enable the menus for users and administrators by pressing *, you can choose whether to record the conference, you can set the maximum number of conference participants, and much more. Simply click on the ? icons for explanations of the various features. CAUTION: Be advised that saving new settings for the conference bridge will reset the conference PINs to the entries shown or entered into the template, e.g. 1234 and 4321 as shown above!

Configuring Incredible PBX IVRs and AutoAttendants

We’ve included a sample IVR and the Stealth AutoAttendant as part of the Incredible PBX install. The easiest way to master the process of building these is to examine the included samples and try them out: Applications -> IVR -> DemoIVR. The demo IVR comes with all the options preconfigured. Be very careful exposing this through a DID unless you have hardened the passwords, especially for the Telephone Reminders app since this application allows any caller to set up calls to external phone numbers which may cost you money!

The IVR options themselves are self-explanatory and well-documented under the ? icon. The IVR Entries at the bottom of the template define the destinations for caller button presses during a call. The Stealth AutoAttendant is worth examining further since it does not include predefined destinations. You would need to add these yourself. The idea behind a Stealth AutoAttendant is to provide options to a caller which are not explained when the AutoAttendant answers the call. In this way, it allows you to "hide" certain features of your PBX from the average caller. While standing alone, it’s obviously not secure since anyone can press a number on their phone after being connected, it does at least obscure the existence of the options. One good use for this is a DISA option which would let you call into your PBX to obtain dialtone to perform other functions on the PBX with an appropriate password, of course. This is documented in the next section and would need to be set up BEFORE adding the option as a choice on the AutoAttendant.

Configuring DISA with Incredible PBX

Before setting up a DISA option with Incredible PBX, be aware of the risks. Anyone that guesses your DISA password basically gets a blank check to perform any function that could be executed from any phone registered to your PBX. If you’ve decided to proceed anyway, access the GUI and choose Applications -> DISA -> Add DISA. Here’s what a typical DISA setup would look like. You’d obviously want a much more secure PIN!

Once you have saved the template and reloaded your dialplan, you then can add DISA as an option in your IVR or AutoAttendant. Be sure to test it carefully before exposing it for public access. You’ve been warned!

Incredible PBX Security Model Overview

Unlike most other free PBX offerings, Incredible PBX is always deployed as a secure platform. Attempts to access Incredible PBX from outside your local area network will fail unless the IP address has been whitelisted in the IPtables firewall using one of the Travelin’ Man 3 utilities: add-ip or add-fqdn. Repeated attempts to access the PBX will be blocked by Fail2Ban and subsequent attempts to whitelist a blocked IP address will not be successful until the Fail2Ban quarantine expires. Thus, it is important to set up Incredible PBX initially using a desktop PC from which you will subsequently manage the PBX. This assures that at least this desktop PC’s IP address is whitelisted.

To whitelist a static IP address, log into your server as root and issue the following command: ./add-ip my-log-cabin 12.34.56.78 where my-log-cabin is the descriptive name you wish to associate with the whitelisted IP address and 12.34.56.78 is the actual IP address.

Obviously, everyone doesn’t have a static IP address. That’s what the add-fqdn utility is for. It allows you to use a dynamic DNS service to assign an FQDN to a dynamic IP address and rely upon the dynamic IP address provider to keep the FQDN synchronized as the IP address changes. Search your favorite search engine, search for "free dynamic dns raspberry pi" to find available providers. On the Incredible PBX, the setup is much the same except you’ll use the FQDN assigned to the IP address: ./add-fqdn my-log-cabin logcabin.myip.com. Incredible PBX actually runs a script every 10 minutes to keep dynamic IP addresses synchronized. Don’t make any changes to /root/ipchecker. If you’d prefer to have the script run more frequently, adjust the 10 entry in the ipchecker line in /etc/crontab.

Last but not least, Incredible PBX includes the PortKnocker utility which provides an emergency "back door" into your PBX if you ever find yourself locked out by the firewall rules. The idea behind PortKnocker is that you send a packet to three random, pre-defined ports in a particular sequence and, if there’s a match, PortKnocker whitelists your IP address for further access to the server until the firewall is restarted or the server is rebooted. You’ll find your credentials and documentation in /root/knock.FAQ. If your PBX is sitting behind a hardware-based router or firewall, be sure to map the three TCP ports to the LAN IP address of your PBX. Enjoy!

Originally published: Wednesday, August 28, 2019



Need help with Asterisk? Visit the VoIP-info 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.
 



Icing on the Cake for Incredible PBX 16-15 and Raspberry Pi



In our last article, we introduced Incredible PBX® 16-15 featuring Asterisk® 16 and FreePBX® 15 on the new Raspberry Pi 4 with Raspbian 10. But we’re just getting started. Today we want to show off the real power of this $35 on-premise platform with the addition of IBM’s voice recognition software. Your first 500 minutes a month are free. In conjunction with Incredible PBX, you’ll get flawless transcription and email delivery of your voicemail messages plus a voice dialer that lets you call anyone in your AsteriDex phonebook by simply dialing 411 and saying the name of the person or company you wish to call. We’ve got a few more surprises plus some tips for the $5.95 Blinkt rainbow light show that will have your friends drooling with envy. If you haven’t yet installed Incredible PBX 16-15, start there.

Configuring Gmail as Exim Smart Relay Host

Before you can receive voicemail messages by email, your server needs to be able to successfully send email messages. Most Raspberry Pi implementations will be on networks managed by companies like Comcast, Spectrum, and AT&T that block downstream mail servers (that’s you) from sending email. The solution is to use Gmail or your local ISP as a smart relay host to send mail from your server. Here’s how to set it up using a Gmail account without two-step authentication. Log into your server as root and run ./configure-exim-email. Choose "mail sent by smarthost; received via SMTP or fetchmail." Accept all the defaults until you get to Outgoing Smarthost prompt. Enter: smtp.gmail.com::587. At the following prompts, choose NO, NO, mbox, and NO. When the setup completes, edit /etc/exim4/passwd.client and insert the following line using your Gmail AcctName and AcctPW. NOTE: If you are using a Gmail account with 2-step verification enabled, you MUST use a Gmail App Key instead of your Gmail account password.

*.google.com:AcctName@gmail.com:AcctPW
smtp.gmail.com:AcctName@gmail.com:AcctPW

Save the file and then issue the following commands to complete the setup:

update-exim4.conf
systemctl restart exim4
exim4 -qff

Now send yourself a test email message to make sure things are working properly:

echo "test" | mail -s testmessage yourname@yourmailprovider.com

Some prefer an email notification whenever your server is booted. Once you have configured a relay host above, you can add this feature by editing /etc/rc.local and adding the following lines just above the service knockd start line using your actual email address:

_PRIVATE="Private IP: `cat /etc/hostip | cut -f1-2 -d " "`"
_PUBLIC=" Public IP: `curl -s -S --user-agent \\
"Mozilla/4.0" http://myip.incrediblepbx.com | awk 'NR==2'`"
echo "$_PRIVATE\\n$_PUBLIC" | mail -s "RasPi 16-15 has booted" yourname@yourmailserver.com


Obtaining IBM Cloud Speech to Text Credentials

Follow this link to set up your IBM account and obtain credentials for both Speech to Text (STT) and Text to Speech (TTS) services. Please note that your STT and TTS API keys will NOT be the same. So don’t accidentally use the wrong one. For today, we’ll need your STT API Key.

Installing STT Engine for Voicemail Transcription

Now we’re ready to deploy IBM’s STT Engine to (1) transcribe your voicemails and (2) deliver them by email. To begin, open the Incredible PBX web GUI with your browser and edit extension 701 under Applications -> Extensions. Click on the Voicemail tab. Enter an Email Address for delivery of your voicemails. Set Email Attachment, Play CID, and Play Envelope to YES. After testing things out, you may want to actually Delete Voicemails after email delivery, but leave it set to NO for the time being. Click Submit and Apply Config to save your settings.

Next, log into the Linux CLI as root and change to the /usr/local/sbin directory. Then copy the sendmailmp3.ibm file to sendmailmp3: Then edit sendmailmp3.

cd /usr/local/sbin
cp -p sendmailmp3.ibm sendmailmp3
nano -w sendmailmp3

Scroll down to line #21 and enter your actual API_KEY replacing the X’s inside the quotes. Save the file: Ctrl-X, Y, then ENTER. Now call extension 701’s voicemail (*701) and leave yourself a short voicemail message. Within a minute or two, it should be delivered to your email address that you specified for extension 701 voicemails. It will include the voicemail recording as well as a transcription.

Deploying the AsteriDex Voice Dialer

AsteriDex is an open source database that is included in every Incredible PBX deployment. You can access it within the web GUI under the Third Party Addon tab. By default, it includes entries for some of the major airlines. You can create as many additional entries as you wish. Also included with Incredible PBX is a voice dialer that is accessed by dialing 411. You’ll be prompted for the name of the person or company to contact. Once you say the name, the voice dialer will place the call using your default outbound route for 10-digit calls. The missing piece is voice recognition software to transcribe what you say into text that can be looked up in AsteriDex to retrieve the number to call. That’s where IBM’s STT engine enters the picture. To deploy it, start by replacing the 411 context in your dialplan. Then we’ll edit the getnumber.sh shell script and insert your STT credentials.

cd /var/lib/asterisk/agi-bin
sed -i '\:// BEGIN Call by Name:,\:// END Call by Name:d' \\
 /etc/asterisk/extensions_custom.conf
sed -i '/\[from-internal-custom\]/r /var/lib/asterisk/agi-bin/ibm-411.txt' \\
 /etc/asterisk/extensions_custom.conf
asterisk -rx "dialplan reload"
nano -w getnumber.sh

Scroll down to line #13 and make it look like this: API_USERNAME="apikey"

On Line #14, enter your actual API_KEY between the quotation marks replacing the X’s. Then save the file: Ctrl-X, Y, then ENTER.

Now pick up a phone connected to your PBX and dial 411. When prompted for the person/company to call, say "American Airlines."

Move Over Siri. Here Comes Iris.

If the idea of instant access to all the world’s information is appealing but you’re not quite ready to invite Siri, Alexa, and Google into your bedroom, then IRIS may be your cup of tea. With the Incredible PBX implementation of Wolfram Alpha, you simply dial I-R-I-S (4747) from any phone, ask a question, and the world’s greatest almanac tied to a supercomputer will provide you an answer. So long as it’s for non-commercial use, you get 2,000 free queries a month just by signing up for a Wolfram Alpha account. Here’s a sample of what’s available:

Weather in Charleston South Carolina
Weather forecast for Washington D.C.
Next solar eclipse
Otis Redding
Define politician
Who won the 1969 Superbowl? (Broadway Joe)
What planes are flying overhead now? (flying over your server’s location)
Ham and cheese sandwich (nutritional information)
Holidays 2019 (summary of all holidays for 2019 with dates and DOW)
Medical University of South Carolina (history of MUSC)
Star Trek (show history, air dates, number of episodes, and more)
Apollo 11 (everything you ever wanted to know)
Cheapest Toaster (brand and price)
Battle of Gettysburg (sad day 🙂 )
Daylight Savings Time 2019 (date ranges and how to set your clocks)
Tablets by Motorola (pricing, models, and specs from Best Buy)
Doughnut (you don’t wanna know)
Snickers bar (ditto)
Weather (local weather at your server’s location)

Deploying IRIS is simple. Once you have your Wolfram Alpha APP-ID, edit the 4747 file in /var/lib/asterisk/agi-bin and insert your APP-ID in the first line of the file. Then save it. In the same directory, edit wolfram.sh and enter apikey for your API_USERNAME, your actual IBM STT API key as your API_PASSWORD, and reenter your Wolfram Alpha APPID. Then save the file. Now dial I-R-I-S (4747) from any phone and ask one of the sample questions above.

UPDATE: A bug crept into the Wolfram Alpha scripts somewhere along the way. Here’s the fix, but you don’t need to install it. Simply log out and back into your Raspberry Pi as root, and the Automatic Update Utility will install it for you.

cd /var/lib/asterisk/agi-bin
sed -i 's|results.chr(13).chr(10);|results.chr(13).chr(10).chr(34);|' 4747.php

Using Allison’s Demo IVR for Feature Set Access

Rather than remembering all of the dial codes we’ve documented above, the easiest way to get instant access to all the features we’ve discussed plus more is to dial D-E-M-O (3366) from any phone connected to your PBX. Better yet, you can share the feature set with your friends by configuring the Demo IVR as the Inbound Route Destination for one of your DIDs. Be careful sharing your password for Telephone Reminders to avoid having some creep schedule multiple reminders to make expensive calls to some ship in the middle of nowhere.

Updating pbxstatus to Support NeoRouter

If you have deployed the NeoRouter VPN on your server, you’ve probably noticed that the pbxstatus display looks a bit awkward now since there are multiple local IP addresses. Here’s the fix. Edit /usr/local/sbin/pbxstatus. Scroll down to line #6 and replace it with the following. Then save the file.

_IP=" Private IP: `cat /etc/hostip | cut -f1-2 -d " "`"

Adding Blinkt for Non-Blacklisted Incoming Calls

If you deployed the Blinkt hardware addition following our last tutorial, we wanted to add an additional feature that will provide visual alerts when incoming calls arrive. Here’s how:

cp -p /root/rainbow.py /usr/local/sbin/.
echo "asterisk ALL = NOPASSWD: /usr/local/sbin/rainbow.py" >> /etc/sudoers
echo '[app-blacklist-check]
include => app-blacklist-check-custom
exten => s,1(check),GotoIf($["${BLACKLIST()}"="1"]?blacklisted)
exten => s,n,Set(CALLED_BLACKLIST=1)
exten => s,n,System(/usr/bin/sudo /usr/local/sbin/rainbow.py &)
exten => s,n,Return()
exten => s,n(blacklisted),Answer
exten => s,n,Set(BLDEST=${DB(blacklist/dest)})
exten => s,n,ExecIf($["${BLDEST}"=""]?Set(BLDEST=app-blackhole,hangup,1))
exten => s,n,GotoIf($["${returnhere}"="1"]?returnto)
exten => s,n,GotoIf(${LEN(${BLDEST})}?${BLDEST}:app-blackhole,zapateller,1)
exten => s,n(returnto),Return()
;--== end of [app-blacklist-check] ==--;
' >> /etc/asterisk/extensions_override_freepbx.conf
asterisk -rx "dialplan reload"




 

Originally published: Monday, August 19, 2019



Need help with Asterisk? Visit the VoIP-info 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.
 



Back to School: It’s Incredible PBX 16-15 for the Raspberry Pi

It’s Back to School Time in the U.S.A., and we have a terrific new August project for you and your shiny new Raspberry Pi 4. It features Asterisk® 16 with all the latest FreePBX® 15 GPL modules plus the feature sets of Incredible PBX® and RasPBX and RonR’s latest build. And it’s all rolled into one terrific (free) bundle. It’s literally the best of all worlds. Finally, a word of caution. This is a work in progress. If you’re looking for instant perfection, come back after Labor Day. But, if you want to roll up your sleeves and participate in an open source project, you’ve come to the right place. We welcome your comments AND contributions. After all, that’s what open source development is all about. Participate!

This is the first of several articles on Incredible PBX 16-15. Today, we’ll get your platform built and walk you through what’s included in the new build. You can expect a new release regularly until we work through all of the kinks and some of the missing pieces. If you’ve been following our articles this past month, you already know that restoring backups from Incredible PBX 13-13 into Incredible 16-15 was one of the primary development goals of FreePBX 15. It remains a little rough around the edges, but we’re close on the CentOS platform. And, in coming weeks, we’ll integrate what we’ve learned on the CentOS 7 platform into the Raspbian 10 Buster image for the Raspberry Pi. In the meantime, come enjoy and explore the powerful, new feature set that comes with Incredible PBX 16-15 out of the box. Unlike RonR’s build, there’s nothing to compile with Incredible PBX 16-15 for Raspbian 10 even though all of the components are there to let you do so whenever the mood strikes. And, unlike the FreePBX Distro, we don’t rely on static packages which make it difficult to make future modifications on your own. Instead, Incredible PBX 16-15 offers a snapshot image with a complete toolkit to make future modifications as desired.

What’s Included? Incredible PBX 16-15 for Raspbian 10 serves up a VoIP powerhouse featuring Asterisk 16 and all FreePBX 15 GPL modules, an Apache web server, the latest MariaDB SQL server (formerly MySQL), Exim4 mail server, and most of the Incredible PBX feature set including SIP, SMS, voice recognition, AsteriDex, PicoTTS Text-to-Speech VoIP applications plus fax support, Click-to-Dial, News, Weather, Telephone Reminders, and hundreds of features that typically are found in commercial PBXs: Conferencing, IVRs and AutoAttendants, Email Delivery of Voicemail, Voicemail Blasting, and more. We’ve also incorporated the Zero Trunk Configuration feature from the LITE build which lets you sign up with one of four VoIP providers and start making and receiving calls instantly.

Choosing a SIP Provider. As we mentioned, Incredible PBX 16-15 comes preconfigured to support four of the major SIP providers: Skyetel, VoIP.ms, V1VoIP, and Anveo Direct. We obviously hope you’ll choose Skyetel not only because they financially support Nerd Vittles and our open source projects, but also because it is a clearly superior platform offering crystal-clear communications and quadruple-redundancy so you never miss a call. Skyetel also sets itself apart from the other providers in the support department. They actually respond to issues, and there’s never a charge. As the old saying goes, they may not be the cheapest, but you get what you pay for. Even without taking advantage of Nerd Vittles free $10 credit plus a half-price offer on up to $500 of Skyetel services, they’re still dirt cheap compared to the Bell Sisters and cable companies. Traditional DIDs are $1 per month. Outbound conversational calls are $0.012 per minute. Incoming conversational calls are a penny a minute, and CallerID lookups are $0.004. With all four providers, you only pay for minutes you use. Using more than one is a good idea. With your Skyetel $10 credit, there’s ample funding to order a phone number and make hundreds of calls at zero cost. Once you’re satisfied with the service (and you will be), you can fund your account with up to $250, and Skyetel will match your deposit plus give you free number porting for any existing numbers you want to add to your account. Quite literally, you have nothing to lose. Effective 10/1/2023, $25/month minimum spend required.


Assembling the Required Raspberry Pi Components

Before you can deploy Incredible PBX 16-15, you’ll first need the necessary Raspberry Pi hardware. Here’s the short list and, if you’re in a hurry, the $35 Raspberry Pi 3B+ will cost you less than $3 extra to get it quickly from Amazon using our referral link. If you prefer to wait for a Raspberry Pi 4, read on. Either way, the RasPi remains one of the world’s best bargains! Assuming you already own an HDMI-compatible monitor and a USB keyboard

  • Raspberry Pi 4B from a Raspberry Pi reseller
  • $8 USB-C RasPi 4 (only) Power Supply
  • $10 32GB microSDHC Class 10 card (strongly recommended!)
  • $5 Official RasPi 4 Case
  • Getting Started with Incredible PBX 16-15

    Here’s our 10-Step Guide to installation and setup. "Automatic" means just watch. Steps #1 and #2: follow the links. For the remaining steps, we’ll further document the procedures.

    1. Download and unzip Incredible PBX 16-15 image from SourceForge
    2. Transfer Incredible PBX 16-15 image to microSD card
    3. Boot Raspberry Pi from new microSD card (16GB minimum)
    4. Login to RasPi console as root:password to initialize your server (Automatic)
    5. In raspi-config Advanced Options, Expand FileSystem to fill your SD card
    6. In Localization Options, set Locale, TimeZone, Keyboard, & WiFi Country
    7. Reboot after writing down your server IP address (Automatic)
    8. Login via SSH or Putty as root:password to set passwords & setup firewall (Automatic)
    9. Run admin-pw-change to set the admin password for access to the web GUI
    10. Register for and configure at least one trunk provider for Incredible PBX 16-15
    11. Enjoy!

    First Boot of Incredible PBX 16-15 with Wi-Fi

    Incredible PBX 16-15 requires Internet connectivity to complete its automated install. If you’re using a wired network connection, you can skip to the next section. With the Raspberry Pi 3B and 4B, WiFi is built into the hardware. But you still have to insert your SSID name and SSID password to make a connection to your WiFi network. To do so, follow these next steps carefully. Insert the Incredible PBX 16-15 microSD card into your Raspberry Pi 3 or 4 and apply power to the hardware. When the bootup procedure finishes, login as root with the default password: password. At the first prompt, DO NOT PRESS THE ENTER KEY! Instead, press Ctrl-C to break out of the setup script. At the command prompt, issue the following commands to bring up the WiFi config file:

    cd /etc/wpa_supplicant
    nano -w wpa_supplicant.conf
    

    If your WiFi network does not require a password, uncomment or insert the four lines below and save the file: Ctrl-X, Y, then Enter. Now restart your server: reboot. When the reboot finishes, you now should have network connectivity.

    network={
     key_mgmt=NONE
     priority=1
    }
    

    If your WiFi network requires a password, uncomment or insert the following into wpa_supplicant.conf:

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    
    network={
     ssid="YourSSID"
     psk="YourSSIDpassword"
     key_mgmt=WPA-PSK
     scan_ssid=1
     priority=7
    }
    

    Then scroll down to the SSID entry and replace YourSSID with the actual SSID of your WiFi network. Make sure you preserve the entry with the quotes as shown. Next, replace YourSSIDpassword with the SSID password of your WiFi network. Save the file: Ctrl-X, Y, then Enter. Now restart your server: reboot. When the reboot finishes, you now should have network connectivity.

    Once the reboot process finishes, you should see an entry on about the middle line displayed on your monitor which reads: "My IP address is…". Write down the IP address shown. You’ll need it in a minute. Skip the next section since you are using a WiFi connection.

    If you don’t see an IP address assigned to your server, then correct the network deficiency (invalid WiFi credentials, DHCP not working, Internet down), and reboot until you see an IP address assigned to your server. DO NOT PROCEED WITHOUT AN ASSIGNED IP ADDRESS.

    First Boot of Incredible PBX Using Wired Connection

    Incredible PBX 16-15 requires Internet connectivity to complete its automated install. After connecting your server to your local network with a network cable, insert the Incredible PBX 16-15 microSD card into your Raspberry Pi and apply power to the hardware. When the bootup procedure finishes, you should see an entry on about the middle line displayed on your monitor which reads: "My IP address is…". Write down the IP address shown. You’ll need it in the next step.

    If you don’t see an IP address assigned to your server, then correct the network deficiency (cable not connected, DHCP not working, Internet down), and reboot until you see an IP address assigned to your server. DO NOT PROCEED WITHOUT AN ASSIGNED IP ADDRESS.

    Completing the Incredible PBX Initialization Procedure

    Unless your desktop PC and RasPi are both on the same private LAN, the remainder of the install procedure should be completed from a desktop PC using SSH or Putty. This will assure that your desktop PC is also whitelisted in the Incredible PBX firewall. Using the console to complete the install is NOT recommended as your desktop PC will not be whitelisted in the firewall. This may result in your not being able to log in to your server. Once you have network connectivity, log in to your server as root from a desktop PC using the default password: password. Accept the license agreement by pressing ENTER. You then will be redirected to raspi-config. This is the utility used to expand your Incredible PBX 16-15 image to use your entire microSD card. If you fail to complete this step, your microSD card will be restricted to 16GB. In the raspi-config utility, choose Localization Options and set Locale, TimeZone, Keyboard, & WiFi Country. Then choose Advanced Options. All of the defaults should be satisfactory with the exception of the first item: Expand Filesystem. Choose this option and activate the resizing directive. Review the other items and then exit and reboot.

    Once your server reboots and you log back in as root, all of your passwords will be randomly assigned with the exception of the root user Linux password and your admin password for access to the web GUI. You can set the root password by issuing the command: passwd. Set the admin password for access to the web GUI with this command: /root/admin-pw-change. With the exception of these two passwords, the remaining passwords can be displayed using the command: /root/show-passwords.

    Finally, if your PBX is sitting behind a NAT-based router, you’ll need to redirect incoming UDP 5060-5061 and UDP 10000-20000 traffic to the private IP address of your PBX. This is required for all of the SIP providers included in the Incredible PBX 16-15 build. Otherwise, all inbound calls will fail.

    Configuring Skyetel for Incredible PBX 16-15

    If you’ve decided to go with Skyetel, here’s the drill. Sign up for Skyetel service and take advantage of the Nerd Vittles Free $10 credit and BOGO special. First, complete the Prequalification Form here. You then will be provided a link to the Skyetel site to complete your registration. Once you have registered on the Skyetel site and your account has been activated, open a support ticket and request the $10 credit for your account by referencing the Nerd Vittles special offer. Once you are happy with the service, open another ticket after funding your account and request that Skyetel match your deposit of up to $250. That gets you up to $500 of helf-price calling. Credit is limited to one per person/company/address/location. If you have numbers to port in, you can do it at no cost after funding your account.

    Skyetel does not use SIP registrations to make connections to your PBX. Instead, Skyetel utilizes Endpoint Groups to identify which servers can communicate with the Skyetel service. An Endpoint Group consists of a Name, an IP address, a UDP or TCP port for the connection, and a numerical Priority for the group. For incoming calls destined to your PBX, DIDs are associated with an Endpoint Group to route the calls to your PBX. For outgoing calls from your PBX, a matching Endpoint Group is required to authorize outbound calls through the Skyetel network. Thus, the first step in configuring the Skyetel side for use with your PBX is to set up an Endpoint Group. Here’s a typical setup for Incredible PBX 16-15:

    • Name: MyPBX
    • Priority: 1
    • IP Address: PBX-Public-IP-Address
    • Port: 5060
    • Protocol: UDP
    • Description: 16-15.incrediblepbx.com

    To receive incoming PSTN calls, you’ll need at least one DID. On the Skyetel site, you acquire DIDs under the Phone Numbers tab. You have the option of Porting in Existing Numbers (free for the first 60 days after you fund your account) or purchasing new ones under the Buy Phone Numbers menu option.

    Once you have acquired one or more DIDs, navigate to the Local Numbers or Toll Free Numbers tab and specify the desired SIP Format and Endpoint Group for each DID. Add SMS/MMS and E911 support, if desired. Call Forwarding and Failover are also supported. That completes the VoIP setup on the Skyetel side. System Status is always available here.

    Configuring VoIP.ms for Incredible PBX 16-15

    To sign up for VoIP.ms service, may we suggest you use our signup link so that Nerd Vittles gets a referral credit for your signup. Once your account is set up, you’ll need to set up a SIP SubAccount and, for Authentication Type, choose Static IP Authentication and enter your Incredible PBX 16-15 server’s public IP address. For Transport, choose UDP. For Device Type, choose Asterisk, IP PBX, Gateway or VoIP Switch. Order a DID in their web panel, and then point the DID to the SubAccount you just created. Be sure to specify atlanta1.voip.ms as the POP from which to receive incoming calls.

    Configuring V1VoIP for Incredible PBX 16-15

    To sign up for V1VoIP service, sign up on their web site. Then login to your account and order a DID under the DIDs tab. Once the DID has been assigned, choose View DIDs and click on the Forwarding button beside your DID. For Option #1, choose Forward to IP Address/PBX. For the Fowarding Address, enter the public IP address of your server. For the T/O (timeout) value, set it to 2o seconds. Then click the Update button. Under the Termination tab, create a new Endpoint with the public IP address of your server so that you can place outbound calls through V1VoIP.

    Configuring Anveo Direct for Incredible PBX 16-15

    To sign up for Anveo Direct service, sign up on their web site and then login. After adding funds to your account, purchase a DID under Inbound Service -> Order DID. Next, choose Configure Destination SIP Trunk. Give the Trunk a name. For the Primary SIP URI, enter $[E164]$@server-IP-address. For Call Options, select your new DID from the list. You also must whitelist your public IP address under Outbound Service -> Configure. Create a new Call Termination Trunk and name it to match your server. For Dialing Prefix, choose six alphanumeric characters beginning with a zero. In Authorized IP Addresses, enter the public IP address of your server. Set an appropriate rate cap. We like $0.01 per minute to be safe. Set a concurrent calls limit. We like 2. For the Call Routing Method, choose Least Cost unless you’re feeling extravagant. For Routes/Carriers, choose Standard Routes. Write down your Dialing Prefix and then click the Save button.

    Before you can make outbound calls through Anveo Direct from your PBX, you first must configure the Dialing Prefix that you wrote down in the previous step. Using a browser, login to the GUI as admin. Navigate to Connectivity -> Trunks -> Anveo-Out. Click the Pencil icon to edit the trunk settings. Then click the Custom Settings tab. Replace anveo-pin with your actual Anveo PIN. Click Submit and Apply Settings to save your changes.

    By default, incoming Anveo Direct calls will be processed by the Default inbound route on your PBX. If you wish to redirect incoming Anveo Direct calls using DID-specific inbound routes, then you’ve got a bit more work to do. In addition to creating the inbound route using the 11-digit Anveo Direct DID, enter the following commands after logging into your server as root using SSH/Putty:

    cd /etc/asterisk
    echo "[from-anveo]" >> extensions_custom.conf
    echo "exten => _.,1,Ringing" >> extensions_custom.conf
    echo "exten => _.,n,Goto(from-trunk,\\${SIP_HEADER(X-anveo-e164)},1)" >> extensions_custom.conf
    asterisk -rx "dialplan reload"
    

    Configuring a Softphone for Incredible PBX 16-15

    We’re in the home stretch now. You can connect virtually any kind of telephone to your new PBX. Plain Old Phones require an analog telephone adapter (ATA) which can be a separate board in your computer from a company such as Digium. Or it can be a standalone SIP device such as ObiHai’s OBi100 or OBi110 (if you have a phone line from Ma Bell to hook up as well). SIP phones can be connected directly so long as they have an IP address. These could be hardware devices or software devices such as the YateClient softphone. We’ll start with a free one today so you can begin making calls. You can find dozens of recommendations for hardware-based SIP phones both on Nerd Vittles and the PIAF Forum when you’re ready to get serious about VoIP telephony.

    We recommend YateClient which is free. Download it from here. Run YateClient once you’ve installed it and enter the credentials for the 701 extension on Incredible PBX. You can find them by running /root/show-passwords. You’ll need the IP address of your server plus your extension 701 password. In the YateClient, fill in the blanks using the IP address of your Server, 701 for your Username, and whatever Password was assigned to the extension when you installed Incredible PBX. Click OK to save your entries.

    Once you are registered to extension 701, close the Account window. Then click on YATE’s Telephony Tab and place some test calls to the numerous apps that are preconfigured on Incredible PBX. Dial a few of these to get started:

    DEMO - Apps Demo
    123 - Reminders
    947 - Weather by ZIP Code
    951 - Yahoo News
    TODAY - Today in History
    LENNY - The Telemarketer's Worst Nightmare
    

    If you are a Mac user, another great no-frills softphone is Telephone. Just download and install it from the Mac App Store.

    Audio Issues with Incredible PBX 16-15

    Only if you experience one-way or no audio on some calls, add your external IP address and LAN subnet in the GUI by navigating to Settings -> Asterisk SIP Settings. In the NAT Settings section, click Detect Network Settings. Click Submit and Apply Settings to save your changes.

    Configuring Gmail as Exim Smart Relay Host

    Most Raspberry Pi implementations will be on networks managed by companies like Comcast, Spectrum, and AT&T that block downstream mail servers (that’s you) from sending email. The solution is to use Gmail or your local ISP as a smart relay host to send mail from your server. You’ll need this to deliver voicemails via email. Here’s how to set it up using a Gmail account without two-step authentication. Log into your server as root and run configure-exim-email. Choose "mail sent by smarthost; received via SMTP or fetchmail." Accept all the defaults until you get to Outgoing Smarthost prompt. Enter: smtp.gmail.com::587. At the following prompts, choose NO, NO, mbox, and NO. When the setup completes, edit /etc/exim4/passwd.client and insert the following line using your Gmail AcctName and AcctPW:

    *.google.com:AcctName@gmail.com:AcctPW
    smtp.gmail.com:AcctName@gmail.com:AcctPW
    

    Save the file and then issue the following commands to complete the setup:

    update-exim4.conf
    systemctl restart exim4
    exim4 -qff
    

    Now send yourself a test email message to make sure things are working properly:

    echo "test" | mail -s testmessage yourname@yourmailprovider.com
    

    Some prefer an email notification whenever your server is booted. Once you have configured a relay host above, you can add the feature by editing /etc/rc.local and adding the following lines with your actual email address just above the service knockd start line:

    _PRIVATE="Private IP: `cat /etc/hostip | cut -f1-2 -d " "`"
    _PUBLIC=" Public IP: `curl -s -S --user-agent \\
    "Mozilla/4.0" http://myip.incrediblepbx.com | awk 'NR==2'`"
    echo "$_PRIVATE\\n$_PUBLIC" | mail -s "RasPi 16-15 has booted" yourname@yourmailserver.com
    

    Incredible PBX 16-15 Administration

    We’ve eased the pain of administering your new PBX with a collection of scripts which you will find in the /root folder after logging in with SSH or Putty. Here’s a quick summary of what each of the scripts does.

    admin-pw-change lets you update the admin password for web browser access to the Incredible PBX GUI.

    apache-pw-change lets you update the admin password for Apache applications such as AsteriDex and Reminders.

    avantfax-pw-change lets you update the root password for AvantFax access (coming soon!).

    add-fqdn is used to whitelist a fully-qualified domain name in the firewall. Because Incredible PBX 16-15 blocks all traffic from IP addresses that are not whitelisted, this is what you use to authorize an external user for your PBX. The advantage of an FQDN is that you can use a dynamic DNS service to automatically update the IP address associated with an FQDN so that you never lose connectivity.

    add-ip is used to whitelist a public IP address in the firewall. See the add-fqdn explanation as to why this matters.

    del-acct is used to remove an IP address or FQDN from the firewall’s whitelist.

    configure-exim-email lets you reconfigure the email server if you need to use an SMTP relay such as Google to get outbound email flowing. Tutorial here.

    iptables-restart is the ONLY command you should ever use to restart the IPtables firewall and Fail2Ban.

    knock.FAQ contains your PortKnocker credentials for emergency access to your server if the firewall locks you out. Tutorial here.

    proximity (once configured) will automatically forward calls to your cellphone when you are out of BlueTooth range from your RasPi. Also must enable running of script in /etc/crontab.

    reset-conference-pins is a script that automatically and randomly resets the user and admin pins for access to the preconfigured conferencing application. Dial C-O-N-F from any registered SIP phone to connect to the conference.

    reset-extension-passwords is a script that automatically and randomly resets ALL of the SIP passwords for extensions 701-705. Be careful using this one, or you may disable existing registered phones and cause Fail2Ban to blacklist the IP addresses of those users. HINT: You can place a call to the Ring Group associated with all five extensions by dialing 777.

    reset-reminders-pin is a script that automatically and randomly resets the pin required to access the Telephone Reminders application by dialing 123. It’s important to protect this application because a nefarious user could set up a reminder to call a number anywhere in the world assuming your SIP provider’s account was configured to allow such calls.

    show-feature-codes is a cheat sheet for all of the feature codes which can be dialed from any registered SIP phone. It documents how powerful a platform Incredible PBX 16-15 actually is. A similar listing is available in the GUI at Admin -> Feature Codes.

    show-passwords is a script that displays ALL of the passwords associated with Incredible PBX 16-15. This includes SIP extension passwords, voicemail pins, conference pins, telephone reminders pin, and your Anveo Direct outbound calling pin (if configured). Note that voicemail pins are configured by the user of a SIP extension the first time the user accesses the voicemail system by dialing *97.

    timezone-setup lets you reconfigure the correct time zone for your server.

    purge-cdr-cel-records cleans out all existing entries in both the CDR and CEL tables of the Asterisk CDR database.

    log-cleanup removes all entries from most of the logs in /var/log.

    sig-fix disables module signature checking in FreePBX. It is automatically disabled upon installation.

    readme-RonR.txt documents the scripts provided from RonR build. We do NOT recommend using the FCC Blacklist because of its current size.

    update-IncrediblePBX is the Automatic Update Utility which checks for server updates from incrediblepbx.com every time you log into your server as root using SSH or Putty. Do NOT disable it as it is used to load important fixes and security updates when necessary. We recommend logging into your server at least once a week.

    pbxstatus (shown above) displays status of all major components of Incredible PBX 16-15.

    Forwarding Calls to Your Cellphone. Keep in mind that inbound calls to your DIDs automatically ring all five SIP extensions, 701-705. The easiest way to also ring your cellphone is to set one of these five extensions to forward incoming calls to your cellphone. After logging into your PBX as root, issue the following command to forward calls from extension 705 to your cellphone: asterisk -rx "database put CF 705 6781234567"

    To remove call forwarding: asterisk -rx "database del CF 705"

    Incredible PBX 16-15 Last-Minute Fixes

    For each release, we will post fixes for Incredible PBX 16-15 here. If you download a newer release, previous fixes have already been addressed and should not be applied. If you’re still using an earlier release, be sure to apply all patches for your release plus all patches for subsequent releases.

    Release 1 Fixes:

    Login to your server as root and issue the following commands to update your server. A reboot is not required unless noted.

    service knockd start
    sed -i 's|exit 0"|exit zero"|' /etc/rc.local
    sed -i 's|exit 0|service knockd start\\nexit 0|' /etc/rc.local
    /root/reset-extension-passwords
    

    A glitch in the admin-pw-change utility used to set the password for web access to the GUI has also been fixed. Simply log out of your server and log back in as root, and the Automatic Update Utility will fix the problem. You then can successfully set your admin password.

    Release 2 Fixes:

    # failed exim messages from Fail2Ban
    sed -i 's|/dev/null|:blackhole:|' /etc/aliases
    systemctl restart exim4
    exim -bp | exiqgrep -i | xargs exim -Mrm
    systemctl restart fail2ban
    # missing AGI files
    cd /var/lib/asterisk/agi-bin
    wget http://incrediblepbx.com/raspi1615-agibin.tar.gz
    tar zxvf raspi1615-agibin.tar.gz
    rm -f raspi1615-agibin.tar.gz
    

    Release 3 Updates/Fixes:

    Release 3 adds dozens of Incredible PBX applications. See the Application User’s Guide for tutorials. In addition, release 3 adds MySQL ODBC support (special thanks to @jerrm for sorting this out) with demo Asterisk applications for customer lookups (dial 222 and enter 12345) and AsteriDex speed dials (dial 223 and enter 335 (D-E-L) for Delta Airlines.

    Release 4 Updates/Fixes:

    Release 4 adds Allison’s Demo IVR and Stealth AutoAttendant as well as support for Blinkt!. It provides hourly alerts during the workday as well as whenever pbxstatus is run. You can order one here. This brings us to functional equivalence with the CentOS 7 release of Incredible PBX 16-15.

    Release 5 Updates/Fixes:

    Release 5 sets NAT default setting for all extensions to YES. This reduces the likelihood that callers will experience one-way audio on calls. The size of the swap file also was double to eliminate dashboard warning messages when some larger microSD cards were deployed.

    Continue Reading: Icing on the Cake for Incredible PBX 16-15 and Raspberry Pi

    Originally published: Wednesday, August 7, 2019



    Need help with Asterisk? Visit the VoIP-info 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.
     



    Now Serving: The Incredible PBX 13-13 Whole Enchilada

    We’re delighted to introduce the bells and whistles for Incredible PBX® 13-13. We’ve taken a slightly different approach with this release. Instead of getting the Whole Enchilada out of the box, you now have a choice. You start with Incredible PBX 13-13 LEAN on the recommended CentOS® 6.10 platform. This gets you a fully-functioning PBX with the latest Asterisk® 13 and most of the FreePBX® 13 GPL modules. This release includes support for Skyetel SIP trunking from our Platinum Sponsor together with $50 in free service to get you started. You still can customize your PBX in any way you like. Or just upgrade to the Whole Enchilada and take advantage of the entire feature set that Incredible PBX has traditionally offered. Last but not least, you can add Incredible Fax for flawless faxing with HylaFax® and AvantFax® including fax detection on specified inbound routes. So the choice is totally up to you. We have a lot to cover. For today, we’ll get all the Incredible PBX pieces installed.

    Just Released: Incredible PBX 16-15 for CentOS 7. Take it for a test drive.

    Here’s a sneak peek at what’s included in Incredible PBX 13-13 Whole Enchilada: dozens of preconfigured SIP Trunks from our favorite providers, Voice Dialing (411) with IBM STT or Google, Headline News (951), Weather by ZIP Code (947), Today in History (86329), IBM TTS, ODBC Lookups (222), ODBC Calling with AsteriDex (223), Telephone Reminders (123), AsteriDex (Web GUI), Reminders (Web GUI), PortKnocker, Travelin’ Man 4, Time of Day (*61), SMS Dictator (767), Wolfram Alpha (4747), Hotel-Style Wakeup Calls (*68), Allison’s Demo IVR (3366), Lenny (53669), Call Parking (**70), Call Pickup (71), Blacklist Add (*30), Blacklist Remove (*31), Blacklist Last Caller (*32), Call Forward Activate (*72), Call Forward DeActivate (*73), Conferencing (C-O-N-F), Call Pickup (*8), Dictation (*34), Email Dictation (*35), DND Activate (*78), DND DeActivate (*79), SpeedDial with AsteriDex (000NNN), Email Delivery of Voicemails, NeoRouter VPN, and more. With a little luck, this will light a fire under some of you to roll up your sleeves and participate in the open source development community.

    Installing a Base CentOS Operating System

    You can install Incredible PBX 13-13 Lean on a dedicated server, on a virtual machine platform such as VirtualBox, or a Cloud-based server. We recommend a minimum 1GB of RAM with a swapfile unless installing on OpenVZ platforms. We’ve provided a script to do it for you. Depending upon the number of users your server will be supporting, we recommend a disk capacity of 10-30 GB. Last but not least, you need a reliable Internet connection.

    Before you can install Incredible PBX 13-13 Lean, you’ll need a basic Linux platform. For this build, you can start by deploying a minimal install of CentOS 6. The Incredible PBX installer will load all of the necessary components to support Asterisk and FreePBX as well as upgrading CentOS to 6.10. Better yet, use the new Incredible PBX 13-13 ISO which bundles both the operating system packages and all of the Incredible PBX goodies. Complete Incredible PBX 13-13 ISO tutorial available here.

    Begin by installing 64-bit CentOS 6 on your favorite hardware or Desktop. Or you may prefer to use a Cloud provider1 that already offers a preconfigured CentOS or Incredible PBX 13-13 image in the case of HiFormance. If you’re using a Cloud platform, you can skip the rest of this section. Just choose CentOS 6 or Incredible PBX 13-13 on HiFormance as the default operating system for your cloud-based server.

    For those using a dedicated hardware platform or wishing to install CentOS as a virtual machine, the drill is the same. Start by downloading the 64-bit CentOS 6.10 minimal ISO. Burn the ISO to a DVD unless you’ll be booting from the ISO on a virtual machine platform such as VirtualBox. On virtual platforms, we recommend at least 1GB RAM and a 20GB dedicated drive. For VirtualBox, we’ve provided a one-minute installer. Here are the settings:

    Type: Linux
    Version: RedHat 64-bit
    RAM: 1024MB
    Default Drive Options with 20GB space
    Create
    Settings->System: Enable IO APIC and Disable HW Clock (leave rest alone)
    Settings->Audio: Enable
    Settings->Network: Enable, Bridged
    Settings->Storage: Far right CD icon (choose your ISO)
    Start

    If you’re booting your server with the CentOS ISO to start the CentOS install, here are the simplest installation steps:

    Choose Language and Click Continue
    Click: Install Destination (do not change anything!)
    Click: Done
    Click: Network & Hostname
    Click: ON
    Click: Done
    Click: Begin Installation
    Click: Root Password: password, password, Click Done twice
    Wait for Minimal Software Install and Setup to finish
    Click: Reboot

    Installing Incredible PBX 13-13 LEAN

    Unless you’re using a virtual machine Incredible PBX image or the Incredible PBX 13-13 image on HiFormance, you’ll need to run the Incredible PBX installer. Once you have CentOS up and running, log into your server as root and issue the following commands to kick off the Incredible PBX install.

    passwd
    yum -y update
    yum -y install net-tools nano wget tar
    wget http://incrediblepbx.com/incrediblepbx-13-13-LEAN.tar.gz
    tar zxvf incrediblepbx-13-13-LEAN.tar.gz
    rm -f incrediblepbx-13-13-LEAN.tar.gz
    # to add swap file on non-OpenVZ cloud platforms
    ./create-swapfile-DO
    # kick off Phase I install
    ./IncrediblePBX-13-13.sh
    # after reboot, kick off Phase II install
    ./IncrediblePBX-13-13.sh
    # add Full Enchilada apps, if desired
    ./Enchilada-upgrade.sh
    # add HylaFax/AvantFax, if desired
    ./incrediblefax13.sh
    # set passwords
    ./update-passwords
    # set desired timezone
    ./timezone-setup
    # remember to enable TUN/TAP if using VPS Control Panel
    # reconfigure PortKnocker if installing on an OpenVZ platform
    echo 'OPTIONS="-i venet0:0"' >> /etc/sysconfig/knockd
    service knockd restart
    # fix pbxstatus for NeoRouter VPN support, if desired
    cd /usr/local/sbin
    sed -i "s|cat /etc/hostip|cat /etc/hostip \\| cut -f 3 -d ' ' |" pbxstatus
    # set up NeoRouter client, if desired
    nrclientcmd
    

    WebMin is also installed and configured as part of the base install. The root password for access is the same as your Linux root password. We strongly recommend that you not use WebMin to make configuration changes to your server. You may inadvertently damage the operation of your PBX beyond repair. WebMin is an excellent tool to LOOK at how your server is configured. When used for that purpose, we highly recommend WebMin as a way to become familiar with your Linux configuration.

    Using the Incredible PBX 13-13 Web GUI

    NOTE: If you plan to upgrade to the Whole Enchilada, you can skip this section. It’s for those that wish to roll their own PBX from the ground up.

    Most of the configuration of your PBX will be performed using the web-based Incredible PBX GUI with its FreePBX 13 GPL modules. Use a browser pointed to the IP address of your server and choose Incredible PBX Admin. Log in as admin with the password you configured in the previous step. HINT: You can always change it if you happen to forget it.

    To get a basic system set up so that you can make and receive calls, you’ll need to add a VoIP trunk, create one or more extensions, set up an inbound route to send incoming calls to an extension, and set up an outbound route to send calls placed from your extension to a VoIP trunk that connects to telephones in the real world. You’ll also need a SIP phone or softphone to use as an extension on your PBX. Our previous tutorial will walk you through this setup procedure. Over the years, we’ve built a number of command line utilities including a script to preconfigure SIP trunks for more than a dozen providers in seconds. You’ll find links to all of them here.

    Continue Reading: Configuring Extensions, Trunks & Routes

    Upgrading to Incredible PBX Whole Enchilada

    There now are two more pieces to put in place. The sequence matters! Be sure to upgrade to the Whole Enchilada before you install Incredible Fax. If you perform the steps backwards, you may irreparably damage your fax setup by overwriting parts of it.

    The Whole Enchilada upgrade script now is included in the Incredible PBX LEAN tarball. If you have an earlier release, you may need to download the Whole Enchilada tarball as documented below. Upgrading to the Whole Enchilada is simple. Log into your server as root and issue the following commands. Try issuing just the last command first to see if the enchilada upgrade script already is in place. Otherwise, execute all of the commands below. Be advised that the upgrade will overwrite all of your existing Incredible PBX setup including any extensions, trunks, and routes you may have created previously. You also will be prompted to reset all of your passwords as part of the upgrade.

    cd /root
    ./Enchilada*
    

    If you accidentally installed Incredible Fax before upgrading to the Whole Enchilada, you may be able to recover your Incredible Fax setup by executing the following commands. It’s worth a try anyway.

    amportal a ma install avantfax
    amportal a r
    

    Installing Incredible Fax with HylaFax/AvantFax

    You don’t need to upgrade to the Whole Enchilada in order to use Incredible Fax; however, you may forfeit the opportunity to later upgrade to the Whole Enchilada if you install Incredible Fax first. But the choice is completely up to you. To install Incredible Fax, log into your server as root and issue the following commands:

    cd /root
    ./incrediblefax13.sh
    

    After entering your email address to receive incoming faxes, you’ll be prompted about two dozen times to choose options as part of the install. Simple press the ENTER key at each prompt and accept all of the defaults. When the install finishes, make certain that you reboot your server to bring Incredible Fax on line. There will be a new AvantFax option in the Incredible PBX GUI. The default credentials for AvantFax GUI are admin:password; however, you first will be prompted for your Apache admin credentials which were set when you installed Incredible PBX 13-13 LEAN or the Whole Enchilada. Then you’ll be asked to change your AvantFax password.

    Upgrading to IBM Speech Engines

    If you’ve endured Google’s Death by a Thousand Cuts with text-to-speech (TTS) and voice recognition (STT) over the years, then we don’t have to tell you what a welcome addition IBM’s new speech utilities are. We can’t say enough good things about the new IBM Watson TTS and STT offerings. With IBM’s services, you have a choice of free or commercial tiers. Let’s put the pieces in place so you’ll be ready to play with the Whole Enchilada.

    Getting Started with IBM Watson TTS Service

    We’ve created a separate tutorial to walk you through obtaining and configuring your IBM Watson credentials. Start there.

    Next, login to your Incredible PBX server and issue these commands to update your Asterisk dialplan and edit ibmtts.php:

    cd /var/lib/asterisk/agi-bin
    ./install-ibmtts-dialplan.sh
    nano -w ibmtts.php
    

    Insert your credentials in $IBM_username and $IBM_password. For new users, your $IBM_username will be apikey. Your $IBM_password will be the TTS APIkey you obtained from IBM. Next, verify that $IBM_url matches the entry provided when you registered with IBM. Then save the file: Ctrl-X, Y, then ENTER. Now reload the Asterisk dialplan: asterisk -rx "dialplan reload". Try things out by dialing 951 (news) or 947 (Weather) from an extension registered on your PBX.

    Getting Started with IBM Watson STT Service

    Now let’s get IBM’s Speech to Text service activated. Log back in to the IBM Cloud. Click on the Speech to Text app. Choose a Region to deploy in, choose your Organization from the pull-down menu, and select STT as your Space. Choose the Standard Pricing Plan. Then click Create. When Speech to Text Portal opens, click the Service Credentials tab. In the Actions column, click View Credentials and copy down your STT username and password.

    Finally, login to your Incredible PBX server and issue these commands to edit getnumber.sh:

    cd /var/lib/asterisk/agi-bin
    nano -w getnumber.sh
    

    Insert apikey as your API_USERNAME and your actual STT APIkey API_PASSWORD in the fields provided. Then save the file: Ctrl-X, Y, then ENTER. Update your Voice Dialer (411) to use the new IBM STT service:

    sed -i '\\:// BEGIN Call by Name:,\\:// END Call by Name:d' /etc/asterisk/extensions_custom.conf
    sed -i '/\\[from-internal-custom\]/r ibm-411.txt' /etc/asterisk/extensions_custom.conf
    asterisk -rx "dialplan reload"
    

    Now try out the Incredible PBX Voice Dialer with AsteriDex by dialing 411 and saying "Delta Airlines." Check back next week for the Whole Enchilada apps tutorial.

    Adding Skyetel Trunks to Incredible PBX

    Now that you have your Incredible PBX platform in place, it’s time to set up your Skyetel trunks to take advantage of the BOGO calling credit (up to $250). The trunks themselves are added by logging into your server with SSH/Putty as root and issuing the following commands if the trunks aren’t already installed on your server. HINT: Check first!

    cd /root
    wget http://incrediblepbx.com/add-skyetel
    chmod +x add-skyetel
    # uncomment next line if your incoming calls all have 10-digit numbers
    # sed -i 's|from-trunk|from-pstn-e164-us|' add-skyetel
    ./add-skyetel
    chmod -x add-skyetel
    

    Next, sign up for Skyetel service and take advantage of the exclusive Nerd Vittles BOGO offer. First, complete the Prequalification Form here. You then will be provided a link to the Skyetel site to complete your registration. Skyetel will match your original deposit up to $250 which means you could enjoy as much as $500 of SIP trunking service for half price. Effective 10/1/2023, $25/month minimum spend required. Once you have registered on the Skyetel site and your account has been activated, open a support ticket and request your BOGO credit by referencing this Nerd Vittles special offer. Greed will get you nowhere. Credit is limited to one per person/company/address/location. If you want to take advantage of the 10% discount on your current service, open another ticket and attach a copy of your last month’s bill. See footnote 1 for the fine print.2 If you have high call volume requirements, document these in your Prequalification Form, and we will be in touch. Easy Peasy!

    Unlike many VoIP providers, Skyetel does not use SIP registrations to make connections to your PBX. Instead, Skyetel utilizes Endpoint Groups to identify which servers can communicate with the Skyetel service. An Endpoint Group consists of a Name, an IP address, a UDP or TCP port for the connection, and a numerical Priority for the group. For incoming calls destined to your PBX, DIDs are associated with an Endpoint Group to route the calls to your PBX. For outgoing calls from your PBX, a matching Endpoint Group is required to authorize outbound calls through the Skyetel network. Thus, the first step in configuring the Skyetel side for use with your PBX is to set up an Endpoint Group. A typical setup for use with Incredible PBX®, Asterisk®, or FreePBX® would look like the following:

    • Name: MyPBX
    • Priority: 1
    • IP Address: PBX-Public-IP-Address
    • Port: 5060
    • Protocol: UDP
    • Description: server1.incrediblepbx.com

    To receive incoming PSTN calls, you’ll need at least one DID. On the Skyetel site, you acquire DIDs under the Phone Numbers tab. You have the option of Porting in Existing Numbers (free for the first 60 days after you sign up for service) or purchasing new ones under the Buy Phone Numbers menu option.

    Once you have acquired one or more DIDs, navigate to the Local Numbers or Toll Free Numbers tab and specify the desired SIP Format and Endpoint Group for each DID. Add SMS/MMS and E911 support, if desired. Call Forwarding and Failover are also supported. That completes the VoIP setup on the Skyetel side. System Status is always available here.

    Configuring a Skyetel Inbound Route

    Because there is no SIP registration with Skyetel, incoming calls to Skyetel trunks will NOT be sent to the Default Inbound Route configured on your PBX because FreePBX treats the calls as blocked anonymous calls without an Inbound Route pointing to the 11-digit number of each Skyetel DID. From the GUI, choose Connectivity -> Inbound Routes -> Add Inbound Route. For both the Description and DID fields, enter the 11-digit phone number beginning with a 1. Set the Destination for the incoming DID as desired and click Submit. Reload the Dialplan when prompted. Place a test call to each of your DIDs after configuring the Inbound Routes.

    If you have installed the Incredible Fax add-on, you can enable Fax Detection under the Fax tab. And, if you’d like CallerID Name lookups using CallerID Superfecta, you can enable it under the Other tab before saving your setup and reloading your dialplan.

    Configuring a Skyetel Outbound Route

    If Skyetel will be your primary provider, you can use both 10-digit and 11-digit dialing to process outbound calls through your Skyetel account. From the GUI, choose Connectivity -> Outbound Routes -> Add Outbound Route. For the setup, we recommend the following using the CallerID Number you wish to associate with your outbound calls through Skyetel:

    Enter the Dial Patterns under the Dial Patterns tab before saving your outbound route. Here’s what you would enter for 10-digit and 11-digit dialing. If you want to require a dialing prefix to use the Skyetel Outbound Route, enter it in the Prefix field for both dial strings.

    There are a million ways to design outbound calling schemes on PBXs with multiple trunks. One of the simplest ways is to use no dial prefix for the primary trunk and then use dialing prefixes for the remaining trunks.

    Another outbound calling scheme would be to assign specific DIDs to individual extensions on your PBX. Here you could use NXXNXXXXXX with the 1 Prepend as the Dial Pattern with every Outbound Route and change the Extension Number in the CallerID field of the Dial Pattern. With this setup, you’d need a separate Outbound Route for each group of extensions using a specific trunk on your PBX. Additional dial patterns can be added for each extension designated for a particular trunk. A lower priority Outbound Route then could be added without a CallerID entry to cover extensions that weren’t restricted or specified.

    HINT: Keep in mind that Outbound Routes are processed by FreePBX in top-down order. The first route with a matching dial pattern is the trunk that is selected to place the outbound call. No other outbound routes are ever used even if the call fails or the trunk is unavailable. To avoid failed calls, consider adding additional trunks to the Trunk Sequence in every outbound route. In summary, if you have multiple routes with the exact same dial pattern, then the match nearest to the top of the Outbound Route list wins. You can rearrange the order of the outbound routes by dragging them into any sequence desired.

    Audio Issues with Skyetel

    If you experience one-way or no audio on some calls, make sure you have filled in the NAT Settings section in the GUI under Settings -> Asterisk SIP Settings -> General. In addition to adding your external and internal IP addresses there, be sure to add your external IP address in /etc/asterisk/sip_general_custom.conf like the following example and restart Asterisk:

    externip=xxx.xxx.xxx.xxx
    

    If you’re using PJSIP trunks or extensions on your PBX, implement this fix as well.

    Receiving SMS Messages Through Skyetel

    Most Skyetel DIDs support SMS messaging. Once you have purchased one or more DIDs, you can edit each number and, under the SMS & MMS tab, you can redirect incoming SMS messages to an email or SMS destination of your choice using the following example:



    Sending SMS Messages Through Skyetel

    We’ve created a simple script that will let you send SMS messages from the Linux CLI using your Skyetel DIDs. In order to send SMS messages, you first will need to create an SID key and password in the Skyetel portal. From the Settings icon, choose API Keys -> Create. Once the credentials appear, copy both your SID and Password. Then click SAVE.

    Next, from the Linux CLI, issue the following commands to download the sms-skyetel script into your /root folder. Then edit the file and insert your SID, secret, and DID credentials in the fields at the top of the script. Save the file, and you’re all set.

    cd /root
    wget http://incrediblepbx.com/sms-skyetel
    chmod +x sms-skyetel
    nano -w sms-skyetel
    

    To send an SMS message, use the following syntax where 18005551212 is the 11-digit SMS destination: sms-skyetel 18005551212 "Some message"

    Using Gmail as a SmartHost for SendMail

    Many Internet service providers block email transmissions from downstream servers (that’s you) to reduce spam. The simple solution is to use your Gmail account as a smarthost for SendMail. Here’s how. Log into your server as root and issue the following commands:

    yum -y install sendmail-cf
    cd /etc/mail
    hostname -f > genericsdomain
    touch genericstable
    makemap -r hash genericstable.db < genericstable
    mv sendmail.mc sendmail.mc.original
    wget http://incrediblepbx.com/sendmail.mc.gmail
    cp sendmail.mc.gmail sendmail.mc
    mkdir -p auth
    chmod 700 auth
    cd auth
    echo AuthInfo:smtp.gmail.com \\"U:smmsp\\" \\"I:user_id\\" \\"P:password\\" \\"M:PLAIN\\" > client-info
    echo AuthInfo:smtp.gmail.com:587 \\"U:smmsp\\" \\"I:user_id\\" \\"P:password\\" \\"M:PLAIN\\" >> client-info
    echo AuthInfo:smtp.gmail.com:465 \\"U:smmsp\\" \\"I:user_id\\" \\"P:password\\" \\"M:PLAIN\\" >> client-info
    nano -w client-info
    

    When the nano editor opens the client-info file, change the 3 user_id entries to your Gmail account name without @gmail.com and change the 3 password entries to your actual Gmail password. Save the file: Ctrl-X, Y, then ENTER.

    Now issue the following commands:

    chmod 600 client-info
    makemap -r hash client-info.db < client-info
    cd ..
    make
    service sendmail restart
    

    Finally, send yourself a test message. Be sure to check your spam folder!

     echo "test" | mail -s testmessage yourname@yourdomain.com
    

    Check mail success with: tail /var/log/maillog. If you have trouble getting a successful Gmail registration (especially if you have previously used this Google account from a different IP address), try this Google Voice Reset Procedure. It usually fixes connectivity problems. If it still doesn’t work, enable Less Secure Apps using this Google tool.

    Originally published: Monday, November 13, 2017  Updated: Saturday, March 23, 2019


    News Flash: Turn Incredible PBX into a Fault-Tolerant HA Platform for $1/Month

    Continue Reading: Configuring Extensions, Trunks & Routes

    Don't Miss: Incredible PBX Application User's Guide covering the 31 Whole Enchilada apps

    Check out the new Incredible PBX 13-13 ISO. Complete tutorial available here.


    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.



    Need help with Asterisk? Visit the VoIP-info 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. Some of our links refer users to Amazon or other service providers when we find their prices are competitive for the recommended products. Nerd Vittles receives a small referral fee from these providers to help cover the costs of our blog. We never recommend particular products solely to generate commissions. However, when pricing is comparable or availability is favorable, we support these providers because they support us. []
    2. In the unlikely event that Skyetel cannot provide a 10% reduction in your current origination rate and/or DID costs, Skyetel will give you an additional $50 credit to use with the Skyetel service. []