Home » Posts tagged 'trunking'

Tag Archives: trunking

The Most Versatile VoIP Provider: FREE PORTING

5 Minute Wonder: Incredible PBX 2022 in Cloud for $25/Yr.



We’ve been building turnkey Incredible PBX® servers for virtual machine platforms for many years. Because the servers are built from images, typical install times have been 5 minutes or less with Proxmox, VirtualBox, and VMware ESXi. But the missing piece has been a similar image install on a true cloud-based platform. This limitation was primarily due to the fact that we don’t own or control the available cloud platforms which typically limit image installs to operating systems such as CentOS, Debian, Ubuntu, and Windows. However, CrownCloud was good enough to add our Incredible PBX 2021 Debian image and the Incredible PBX 2020 CentOS 7 image to their portfolio. And, today, we have more good news. CrownCloud has now added the Incredible PBX 2022 image for Rocky 8 as well.

These 5-minute turnkey installs of Incredible PBX 2020 for CentOS 7, Incredible PBX 2021 for Debian 10, and now Incredible PBX 2022 for Rocky 8 are being offered at the jaw-dropping price of $25 a year. The monthly cost is cheaper than a cup of coffee at Starbucks, and you’ll have a fully-functioning, production-ready KVM platform including a free snapshot with 1GB RAM, 20GB SSD storage, and 1TB of monthly bandwidth in your choice of server locations including Los Angeles and Atlanta in the United States as well as Germany and the Netherlands in Europe. And, unlike all of the other Asterisk® aggregations, Incredible PBX still provides a source code-based platform that can be tailored to meet any special requirements your organization may need.

We don’t make a nickel on these offerings so consider this our special thanks to all of our loyal fans.

Here are the links to sign up for the service and take advantage of these Incredible PBX deals:

When you sign up for the service, choose any traditional OS for the base install. Once it’s on line, go into CrownPanel and choose Reinstall. Then select Incredible PBX 2022 for Rocky from the Application Images pulldown as your new install. In less than 5 minutes, your server will be ready for you to login. Be sure to use SSH and NOT the VNC utility included in CrownPanel. This will assure that your desktop machine’s IP address gets whitelisted in the Incredible PBX firewall. Otherwise, you won’t be able to SSH into your server from your desktop. Once you login, the Incredible PBX configurator will prompt you to set passwords for root login, admin login to FreePBX, and admin login credentials for Apache to access AsteriDex and Reminders. Add a trunk provider (Skyetel is preconfigured and enabled by default) and a softphone or Incredible PBX SIP phone, and your PBX is fully operational. Check out the CrownCloud Wiki.


Planning Ahead for That Rainy Day

One of our favorite features of Crown Cloud is the free snapshot (a.k.a. backup) at no additional charge. We recommend you take snapshots regularly as you make major changes in your server’s configuration. In this way, if something comes unglued, you can easily restore the snapshot and never miss a beat. You’ll find the Remote Snapshot option in your CrownPanel menu.

Configuring Skyetel for Incredible PBX

If you’ve decided to go with Skyetel, here’s the drill. Sign up for Skyetel service and 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/address/location. Effective 10/1/2023, $25/month minimum spend required.

Skyetel does not require SIP registrations to make connections to your PBX. Instead, Skyetel can use 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:

  • 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. Everything is already in place on the Incredible PBX 2022 side of the house so you can start making and receiving calls immediately.

Configuring ClearlyIP SIP Trunking

For the tightest integration with FreePBX, no SIP provider holds a candle to Incredible PBX SIP Trunking with ClearlyIP. The reason is fairly obvious. The ClearlyIP folks were the original developers of FreePBX. In addition to all of the traditional SIP trunking services, you also get CNAM support and state-of-the-art E911 service which can be deployed in full compliance with Kari’s Law and the Ray Baum Act. If you’re a system integrator and don’t know about your financial liability for failure to comply with the new rules, it’s time to do some reading.

Configuring VoIP.ms for Incredible PBX

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 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. In the Incredible PBX GUI, be sure to enable the VoIP.ms trunk.

Configuring Anveo Direct for Incredible PBX

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. Enable the Trunk. Then click on the custom-Settings tab and replace anveo-pin with your actual Dialing Prefix. Click Submit and Apply Config to complete the setup. In the Incredible PBX GUI, be sure to enable all of the remaining Anveo trunks.

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 SIP Phone for Incredible PBX 2022

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 is 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. We obviously recommend the Incredible PBX IP phones from ClearlyIP which are the most versatile.

If you’ve been keeping up with recent Nerd Vittles developments, then you already know that we have just introduced a new Cellular Phone which connects directly to your PBX and serves as a perfect remote extension and traveling companion. You can read all about it here.

Software devices such as the YateClient softphone are another option for desktop machines. 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 VoIP-Info.org Forum when you’re ready to get serious about VoIP telephony.

We recommend YateClient for Windows 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 plus :5061 for the PJsip 701 extension, 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. For Android users, check out the terrific new VitalPBX Communicator. Works flawlessly with Incredible PBX.

For smartphone solutions, visit the Incredible PBX Wiki for our softphone recommendations.

Configuring SendMail with Incredible PBX

In order to receive voicemails by email delivery, outbound mail functionality from your server obviously is required. We strongly recommend configuring SendMail using either your ISP or Gmail as an SMTP Relay Host. 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. You also must enable Less Secure Apps access to the Gmail account.

Configuring a Gmail account with Incredible PBX 2022 is as simple as entering your Gmail credentials. Just run this script: /root/enable-gmail-smarthost-for-sendmail.

Here are the steps using a Gmail account with Incredible PBX 2020:

cd /etc/mail
yum -y install sendmail-cf
hostname -f > genericsdomain
touch genericstable
cd /usr/bin
rm -f makemap
ln -s ../sbin/makemap.sendmail makemap
cd /etc/mail
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
# Stop here and edit client-info (nano -w client-info) in all three lines.
# Replace  user_id with your gMail account name without @gmail.com
# Replace password with your real gMail password OR
#  use your Gmail App Key if 2-step verification is enabled
# Be sure to replace the double-quotes shown above if they don't appear in the file!!!
# Save your changes (Ctrl-X, Y, then Enter)
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd ..
make
systemctl restart sendmail

Even though these servers are hosted in the cloud, we still recommend using a SmartHost to minimize email delivery problems.

Test outbound mail using this command with your actual email address:

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

On some implementations, you may notice in the FreePBX GUI that the mail queue has failed. Here's the fix:

chmod 777 /var/spool/mqueue
service sendmail restart

Once you are sure your emails are being delivered reliably, here's a sample GUI voicemail configuration for an extension:



Be advised that Google has hinted that the Gmail Smarthost landscape may be changing. See our recent article for a simple SmartHost alternative.

Incredible PBX 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.

add-fqdn is used to whitelist a fully-qualified domain name in the firewall. Because Incredible PBX 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.

admin-pw-change is used to set the admin password for access to the FreePBX/Incredible PBX web GUI using a browser pointed to the local IP address of your server.

apache-pw-change is used to set the admin password for access to Apache/Incredible PBX apps including AsteriDex and Reminders. This provides a password layer of protection for access to these applications.

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 702-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 actually is. A similar listing is available in the GUI at Admin -> Feature Codes.

show-passwords is a script that displays most of the passwords associated with Incredible PBX. 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.

ssh-regen.sh allows you to reset the SSH keys for your server for added security.

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.

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"

Keeping FreePBX 15 Modules Current

We strongly recommend that you periodically update all of your FreePBX modules to eliminate bugs and to reduce security vulnerabilities. From the Linux CLI, log into your server as root and issue the following commands:

rm -f /tmp/*
fwconsole ma upgradeall
fwconsole reload
/root/sig-fix
/root/sig-fix

Where To Go From Here

Complete documentation on the ClearlyIP Devices Module is available here.

Complete documentation on the FreePBX GPL Modules is available here.

Complete documentation on the Incredible PBX additions is available here.

An introduction to configuring extensions, trunks, and routes is available here.

Free voicemail transcription with email delivery. Tutorial available here.

Setting Up a VPN for Your PBX: OpenVPN or NeoRouter
 

Originally published: Monday, March 28, 2022



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.
 



A New Day: Introducing Incredible PBX 2021 for Ubuntu 20.04

We’ve completed the rollout of Incredible PBX 2021 for Debian 10 and, thanks to the terrific work of @jaminmc, today we’re pleased to introduce Incredible PBX 2021 for Ubuntu 20.04 LTS with its ten-year life cycle.

In addition to @jaminmc, we also want to offer our special thanks to the many talented individuals on the VoIP-Info.org Forum who work through the growing pains of these new releases to bring you open source products at zero cost. Come join the party!

If you’re using on-premise hardware, begin by downloading the ISO image of Ubuntu 20.04 for amd64. Follow our previous tutorials for tips on installation with VirtualBox or VMware ESXi. If you’d prefer to experiment in the cloud for about a penny an hour, open an account at Vultr or Digital Ocean using our referral links that support the Nerd Vittles project. You’ll also get some free credit to try out the service. Then create a new $5/month Ubuntu 20.04, 64-bit instance in your favorite city. Want some cheaper KVM cloud alternatives? Visit the Incredible PBX Wiki.

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 server. This is required for all of the SIP providers included in the Incredible PBX 2021 build. Otherwise, all inbound calls will fail.

Installing Incredible PBX 2021 on Ubuntu 20.04 Server

Once your Ubuntu 20.04 platform is up and running, login as root using SSH or Putty. If you wish to use the default Asterisk 18 platform, issue the commands below to kick off the install. If you’d prefer to stick with Asterisk 16 for the time being and perhaps upgrade to Asterisk 18 later with the included upgrade script, then edit the script once you download it and change 18 to 16 in line 34 of the script before executing it.

wget http://incrediblepbx.com/IncrediblePBX2021-U.sh
chmod +x IncrediblePBX2021-U.sh
./IncrediblePBX2021-U.sh

At about 5 minutes into the install procedure, you’ll be prompted for your telephone country code. It’s 1 for Canada and the United States. Once the installation completes, reboot and you should be good to go.

Next Steps with Incredible PBX 2021

Before you can manage your PBX through a web browser, you first will need to set the admin passwords for FreePBX, Apache web apps such as Reminders and AsteriDex, and AvantFax (if you are using Incredible Fax). These all can be set by logging into your server as root and issuing the following commands: admin-pw-change, apache-pw-change, and avantfax-pw-change. The AvantFax password can also be reset with a browser by first logging in as admin with a password of password.

Outbound mail functionality needs to be working so that you can receive voicemail messages and faxes by email. To prevent SPAM, most ISPs and ITSPs block messages from downstream mail servers. That would be you. The easiest way to resolve this is to configure SendMail using Gmail as an SMTP Smarthost. You obviously need a Gmail account to implement this and, if you have turned on two-factor authentication for your Gmail account, you also will need to obtain an App password for your Gmail account, and use that in lieu of your regular Gmail password when configuring SendMail. With your Gmail username and password in hand, log into your server as root and run: /root/enable-gmail-smarthost-for-sendmail.

If your Incredible PBX 2021 is hosted with a cloud provider, be advised that many providers do not include a swap file as part of their offering. FreePBX requires a swap file. To add one, issue this command after logging into your server as root: /root/create-swapfile-DO.

To correctly set the time on your PBX, run: /root/timezone-setup.

By default, the voicemail password for each of the configured extensions (701-705) is set to the extension number. This means the user will be prompted to set a voicemail password on the first login to voicemail for each extension. A phone must be registered to the actual extension to access its voicemail account. For example, once a phone is registered to extension 701, the voicemail setup can be accessed by dialing *98701.

If you want to send and receive faxes with Incredible PBX 2021, download the new Incredible Fax 2021 for Ubuntu script, make it executable (chmod +x incred*), and then run the following script while logged into your server as root: /root/incrediblefax2021-ubuntu20.04.sh. When prompted, accept all the defaults. Once the HylaFax and AvantFax components are installed, reboot your server. To send faxes, click on the AvantFax tab in the FreePBX GUI and enter your login credentials (default: admin/password). To receive incoming faxes once you have configured a trunk and DID for your PBX, login to the FreePBX GUI as admin. Navigate to Connectivity -> Inbound Routes. For each of your DIDs on which you wish to receive faxes, select the inbound route and click the Fax tab. Review the Default Inbound Route Fax settings for proper setup.

Overview of the Initial Asterisk Setup Process

For those new to PBXs, here’s a two paragraph summary of how Voice over IP (VoIP) works. Phones connected to your PBX are registered with Extensions so that they can make and receive calls. When a PBX user picks up a phone and dials a number, an Outbound Route tells the PBX which Trunk to use to place the call based upon established dialing rules. Unless the dialed number is a local extension, a Trunk registered with some service provider accepts the call, and the PBX sends the call to that provider. The provider then routes the call to its destination where the recipient’s phone rings to announce the incoming call. When the recipient picks up the phone, the conversation begins.

Looking at things from the other end, when a caller somewhere in the world wishes to reach you, the caller picks up a telephone and dials a number known as a DID that is assigned to you by a provider with whom you have established service. When the provider receives the call to your DID, it routes the call to your PBX based upon destination information you established with the provider. Your PBX receives the call with information identifying the DID of the call as well as the CallerID name and number of the caller. An Inbound Route on your PBX then determines where to send the call based upon that DID and CallerID information. Typically, a call is routed to an Extension, a group of Extensions known as a Ring Group, or an IVR or AutoAttendant giving the caller choices on routing the call to the desired destination. Once the call is routed to an Extension, the PBX rings the phone registered to that Extension. When you pick up the phone, the conversation begins.

Configuring Trunks with Incredible PBX GUI

Perhaps the most difficult component to configure in the PBX is the Trunk. Almost every provider has a different way of doing things. We’ve taken some of the torture out of the exercise by providing a script which will configure settings for dozens of providers in seconds. Once installed, all you need to do is edit the desired Trunk (Connectivity:Trunks), change the Disable Trunk entry to No, and insert your credentials in both the PEER Details and Registration string of the SIP Settings Outgoing and Incoming tabs. Skyetel is enabled by default and needs no setup on the PBX side.

Configuring Skyetel for Incredible PBX 2021

If you’ve decided to go with Skyetel, here’s the drill. Sign up for Skyetel service and 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/address/location. 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 2021:

  • 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 2021

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 2021 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. In the Incredible PBX GUI, be sure to enable the VoIP.ms trunk.

Configuring V1VoIP for Incredible PBX 2021

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. In the Incredible PBX GUI, be sure to enable all of the V1VoIP trunks.

Configuring Anveo Direct for Incredible PBX 2021

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. Enable the Trunk. Then click on the custom-Settings tab and replace anveo-pin with your actual Dialing Prefix. Click Submit and Apply Config to complete the setup. In the Incredible PBX GUI, be sure to enable all of the remaining Anveo trunks.

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 Extensions with Incredible PBX GUI

Extensions are created using the Incredible PBX GUI: Applications:Extensions. Many SIP phones expect extensions to communicate on UDP port 5060. If this is the case with your SIP phone or softphone, then always create Chan_SIP extensions which communicate on UDP 5060. If your SIP phone or softphone provide port flexibility, then you have a choice in the type of SIP extension to create: Chan_SIP or the more versatile PJSIP (UDP 5061). Just remember to always configure SIP extensions with NAT Mode=YES in the Advanced tab. If your VoIP phones or softphones support IAX connectivity, you may wish to consider IAX extensions which avoid NAT problems.

When you create a new Extension, a new entry is automatically created in the PBX Internal Directory. If you wish to allow individual users to manage their extensions or use the WebRTC softphone, then you will also have to create a (very) secure password for User Control Panel (UCP) access. Choose Admin:User Management and click on the key icon of the desired extension to assign a password for UCP and WebRTC access.

Configuring a Desktop Softphone for Incredible PBX

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 for Windows 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. For Android users, check out the terrific new VitalPBX Communicator. Works flawlessly with Incredible PBX.

Configuring a Softphone Extension on a Smartphone

Adding an Incredible PBX extension to your smartphone gets a little trickier. Whether you’re an iPhone or Android lover, all smartphones use batteries, and you don’t want to drain your battery by running a softphone as a foreground app all the time. Fortunately, you now have some choices in softphones engineered to work without draining your battery. While they all cost money, it’s not much money. We’ve written about all the choices, and you’ll find the links in our Softphone Provider Recommendations on the new Incredible PBX Wiki.

With PJsip extensions, you’re not limited to a single phone connection at a time, and we’ve preconfigured extension 701 to support five simultaneous connections. The setup on the softphone side is simple. For the server, enter the actual IP address of your PBX in the following format: 22.33.44.55:5061. Then enter 701 for the username and enter the password assigned to the 701 extension on your PBX. When an incoming call arrives, all the phones registered to extension 701 will ring simultaneously. Simply answer the call on the phone that is most convenient.

Configuring Outbound Routes in Incredible PBX GUI

Outbound Routes serve a couple of purposes. First, they assure that calls placed by users of your PBX are routed out through an appropriate trunk to reach their destination in the least costly manner. Second, they serve as a security mechanism by either blocking or restricting certain calls by requiring a PIN to complete the calls. Never authorize recurring charges on credit cards registered with your VoIP providers and, if possible, place pricing limits on calls with your providers. If a bad guy were to break into your PBX, you don’t want to give the intruder a blank check to make unauthorized calls. And you certainly don’t want to join the $100,000 Phone Bill Club.

To create outbound routes in the Incredible PBX GUI, navigate to Connectivity:Outbound Routes and click Add Outbound Route. In the Route Settings tab, give the Outbound Route a name and choose one or more trunks to use for the outbound calls. In the Dial Patterns tab, specify the dial strings that must be matched to use this Outbound Route. NXXNXXXXXX would require only 10-digit numbers with the first and fourth digits being a number between 2 and 9. Note that Outbound Routes are searched from the top entry to the bottom until there is a match. Make certain that you order your routes correctly and then place test calls watching the Asterisk CLI to make sure the calls are routed as you intended.

Configuring Inbound Routes in Incredible PBX GUI

Inbound Routes, as the name implies, are used to direct incoming calls to a specific destination. That destination could be an extension, a ring group, an IVR or AutoAttendant, or even a conference or DISA extension to place outbound calls (hopefully with a very secure password). Inbound Routes can be identified by DID, CallerID number, or both. To create Inbound Routes, choose Connectivity:Inbound Routes and then click Add Inbound Route. Provide at least a Description for the route, a DID to be matched, and the Destination for the incoming calls that match. If you only want certain callers to be able to reach certain extensions, add a CallerID number to your matching criteria. You can add Call Recording and CallerID CNAM Lookups under the Other tab.

Audio Issues with Incredible PBX 2021

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.

Security Considerations with Incredible PBX 2021

Incredible PBX 2021 includes a rock-solid firewall that limits access to preferred providers and individuals whose IP addresses you have whitelisted. Unfortunately, this may not insulate your server from FreePBX 15 irregularities if, in fact, Sangoma’s signing key was compromised in the October 2020 Ransomware Attack. Sangoma either doesn’t know or isn’t telling. Keep in mind that Sangoma didn’t mention the October breach either until someone else exposed it. Sangoma’s latest press release is available here.

The good news is Incredible PBX 2020 and 2021 platforms include a unique ClearlyIP feature that lets us manage which modules and versions can be installed. It works exactly like what ClearlyIP has documented in their must-read blog post, and we’ve built a locked version that rolls back all of the modules to dates before the Sangoma breach. The good news is, with Incredible PBX, you don’t have to jump through all the hoops covered in the ClearlyIP article to fully insulate your server from the Ransomware breach. We’ve done the work for you.

For those with mission-critical platforms, we’d recommend immediate implementation of what follows. For everyone else, it’s your choice whether to wait and see if there is a breach of the signing certificate with malicious modules. If you opt to wait and see, MAKE FREQUENT BACKUPS.

Here’s how to roll back all of your modules to dates before the breach. Login to the FreePBX GUI as admin and navigate to Settings > Advanced Settings. Drop down to the Lock Version field and change 15.19.11.001 to 15.19.11.003. Save your changes and reload your dialplan. Then use Module Admin to roll back any installed modules that are newer than the safe versions shown.

Our extra special thanks goes to Tony Lewis and the ClearlyIP team for providing this invaluable resource. Somehow we knew it would come in handy sooner or later. Unfortunately, that day has come.

Adding Incredible PBX 2021 to an OpenVPN Network

We previously have documented the procedure for creating an OpenVPN server as well as OpenVPN client templates (.ovpn). If you need a refresher, the tutorial is here. To add your Incredible PBX 2021 server to an existing OpenVPN network, begin by creating an incrediblepbx2021.ovpn template on your OpenVPN server. Be sure to comment out or delete the setenv line in the template. Then copy this template to /etc on your Incredible PBX 2021 server. Next, issue the following commands to put the remaining pieces in place:

cp -p /root/openvpn-start /etc/.
echo "[Unit]
Description=openvpn2021
ConditionPathExists=/etc/openvpn-start
After=rclocal.service
[Service]
Type=forking
ExecStart=/etc/openvpn-start /etc/incrediblepbx2021.ovpn
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
PermissionsStartOnly=true
SysVStartPriority=99
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/openvpn2021.service

Finally, enable the new openvpn2021.service and reboot your server. The OpenVPN IP address should now appear on the LAN line in pbxstatus:

systemctl enable openvpn2021.service
reboot

Incredible PBX 2021 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.

add-fqdn is used to whitelist a fully-qualified domain name in the firewall. Because Incredible PBX 2021 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.

admin-pw-change is used to set the admin password for access to the FreePBX/Incredible PBX web GUI using a browser pointed to the local IP address of your server.

apache-pw-change is used to set the admin password for access to Apache/Incredible PBX apps including AsteriDex and Reminders. This provides a password layer of protection for access to these applications.

avantfax-email-change is used to change the destination email address for incoming faxes.

avantfax-pw-change is used to change your admin password for the AvantFax web console.

iaxmodem-restart is used to restart the modems used to send and deliver faxes. The pbxstatus display will tell you whether the IAXmodems are down.

incrediblebackup2021 makes a backup of critical components on your PBX to a tarball saved in /backup. This should be copied to safe location off-site for a rainy day.

incrediblerestore2021 restores a backup file which has been copied to the /backup folder.

ipchecker is a script which deciphers the public IP addresses associated with whitelisted FQDNs created with add-fqdn on your server. If any of the addresses have changed, the firewall is restarted after updating the IP addresses. By default, it is executed every 10 minutes by /etc/crontab.

licenses.sh displays the license associated with each of the FreePBX modules on your server.

logos-b-gone removes proprietary artwork from your PBX and is no longer necessary with the included IncrediblePBX FreePBX module.

mime-construct is a command-line utility to send emails with attachments.

neorouter-login is a script to add your PBX to a NeoRouter VPN. Tutorial here.

odbc-gen.sh is a script that was run to generate the ODBC settings for Asterisk. Do NOT use it.

openvpn-start is a script to add your PBX to an existing OpenVPN network using an .ovpn config file. Tutorial here.

pbxstatus displays status of all major components of Incredible PBX 2021.

pptp-install is a script to create a PPTP network connection for your PBX. Tutorial here.

purge-cdr-cel-records removes all CDR and CEL records from the MySQL database.

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 2021 actually is. A similar listing is available in the GUI at Admin -> Feature Codes.

show-passwords is a script that displays most of the passwords associated with Incredible PBX 2021. 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.

sig-fix disables Module Signature Checking in the FreePBX GUI. This should not be necessary unless you have added or edited FreePBX Modules with missing module signatures.

sms-skyetel is a script to send SMS messages using a Skyetel trunk.

sms-voip.ms is a script to send SMS messages using a VoIP.ms trunk.

sms-blast, sms-blaster, and sms-dictator are scripts for message blasting. Tutorial here.

switch-to-php5.6 is a script to disable PHP 7.3 and set PHP 5.6 as the default version for your PBX. PHP 5.6 is required to use AvantFax. It is the default configuration for Incredible PBX 2021. The current default PHP version is displayed in the Apache listing of pbxstatus.

switch-to-php7.3 is a script to disable PHP 5.6 and set PHP 7.3 as the default version for your PBX. You cannot use AvantFax when PHP 7.3 is the default.

timezone-setup is a script to set the timezone for your PBX.

update-IncrediblePBX is a script that runs the Automatic Update Utility whenever you login to your server as root. These updates typically resolve bugs and security issues with your PBX. Do NOT remove it.

upgrade-asterisk16 is a script that runs on Asterisk 16 platforms to upgrade your PBX to the latest release of Asterisk 16.

upgrade-asterisk18 is a script that runs on both Asterisk 16 and 18 platforms to upgrade your PBX to the latest release of Asterisk 18.

wolfram is a script to deploy Wolfram Alpha on your PBX. Tutorial here.

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"

Keeping FreePBX 15 Modules Current

We strongly recommend that you periodically update all of your FreePBX modules to eliminate bugs and to reduce security vulnerabilities. From the Linux CLI, log into your server as root and issue the following commands:

rm -f /tmp/*
fwconsole ma upgradeall
fwconsole reload
/root/sig-fix
systemctl restart apache2
/root/sig-fix

 

Originally published: Tuesday, January 26, 2021



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.
 



5 Minutes to Paradise: Incredible PBX in the Cloud for $25/Yr.



We’ve been building turnkey Incredible PBX® servers for virtual machine platforms for many years. Because the servers are built from images, typical install times have been 5 minutes or less with Proxmox, VirtualBox, and VMware ESXi. But the missing piece has always been a similar image install on a true cloud-based platform. This limitation was primarily due to the fact that we don’t own or control the available cloud platforms which typically limit image installs to operating systems such as CentOS, Debian, Ubuntu, and Windows.

Today we have more very good news. Our favorite low-cost hosting provider, Crown Cloud,1 has agreed to offer 5-minute turnkey installs of Incredible PBX 2020 for CentOS and Incredible PBX 2021 for Debian at a jaw-dropping $25 a year. You’ll have a fully-functioning, production-ready KVM platform including a free snapshot with 1GB RAM, 20GB SSD storage, and 1TB of monthly bandwidth in your choice of server locations including Los Angeles and Atlanta in the United States as well as Germany and the Netherlands in Europe. And, unlike all of the other Asterisk® aggregations, Incredible PBX still provides a source code-based platform that can be tailored to meet any special requirements you may need.

We don’t make a nickel on this deal so consider this our special thanks to all of our loyal fans.

Here are the links to sign up for the service and take advantage of these Incredible PBX deals:

UPDATE: 2GB/40GB KVM plans have now been released.

When you sign up for the service, choose any operating system as your default install. Then open a support ticket and request either the Incredible PBX 2020 for CentOS image or the Incredible PBX 2021 for Debian image be added into your template list of available operating systems. Once your server comes on line, open your CrownPanel and choose Reinstall and select Incredible PBX from either the available CentOS or Debian options. In less than 5 minutes, your server will be ready for you to login. Be sure to use SSH and NOT the VNC utility included in CrownPanel. This will assure that your desktop machine’s IP address gets whitelisted in the Incredible PBX firewall. Once you login, the Incredible PBX configurator will prompt you to set passwords for root login, admin login to FreePBX, and admin login credentials for Apache to access AsteriDex and Reminders. After a reboot to initialize your SSH keys, you’ll be ready to go. Add a trunk provider and a softphone, or Incredible PBX SIP phone, or GTI cell phone, and your PBX is fully operational. Check out the CrownCloud Wiki.


Planning Ahead for That Rainy Day

One of our favorite features of Crown Cloud is the free snapshot (a.k.a. backup) at no additional charge. We recommend you take snapshots regularly as you make major changes in your server’s configuration. In this way, if something comes unglued, you can easily restore the snapshot and never miss a beat. You’ll find the Remote Snapshot option in your CrownPanel menu.

Configuring Skyetel for Incredible PBX

If you’ve decided to go with Skyetel, here’s the drill. Sign up for Skyetel service and 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/address/location. Effective 10/1/2023, $25/month minimum spend required.

Skyetel does not require SIP registrations to make connections to your PBX. Instead, Skyetel can use 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:

  • 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 ClearlyIP SIP Trunking

For the tightest integration with FreePBX, no SIP provider holds a candle to Incredible PBX SIP Trunking with ClearlyIP. The reason is fairly obvious. The ClearlyIP folks were the original developers of FreePBX. In addition to all of the traditional SIP trunking services, you also get CNAM support and state-of-the-art E911 service which can be deployed in full compliance with Kari’s Law and the Ray Baum Act. If you’re a system integrator and don’t know about your financial liability for failure to comply with the new rules, it’s time to do some reading.

Configuring VoIP.ms for Incredible PBX

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 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. In the Incredible PBX GUI, be sure to enable the VoIP.ms trunk.

Configuring V1VoIP for Incredible PBX

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. In the Incredible PBX GUI, be sure to enable all of the V1VoIP trunks.

Configuring Anveo Direct for Incredible PBX

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. Enable the Trunk. Then click on the custom-Settings tab and replace anveo-pin with your actual Dialing Prefix. Click Submit and Apply Config to complete the setup. In the Incredible PBX GUI, be sure to enable all of the remaining Anveo trunks.

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 SIP Phone for Incredible PBX

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 is 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. We obviously recommend the Incredible PBX IP phones from ClearlyIP which are the most versatile.

If you’ve been keeping up with recent Nerd Vittles developments, then you already know that we have just introduced a new Cellular Phone which connects directly to your PBX and serves as a perfect remote extension and traveling companion. You can read all about it here.

Software devices such as the YateClient softphone are another option for desktop machines. 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 VoIP-Info.org Forum when you’re ready to get serious about VoIP telephony.

We recommend YateClient for Windows 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. For Android users, check out the terrific new VitalPBX Communicator. Works flawlessly with Incredible PBX.

For smartphone solutions, visit the Incredible PBX Wiki for our softphone recommendations.

Configuring SendMail with Incredible PBX

In order to receive voicemails by email delivery, outbound mail functionality from your server obviously is required. We strongly recommend configuring SendMail using either your ISP or Gmail as an SMTP Relay Host. 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. You also must enable Less Secure Apps access to the Gmail account.

Configuring a Gmail account with Incredible PBX 2021 is as simple as entering your Gmail credentials. Just run this script: /root/enable-gmail-smarthost-for-sendmail.

Here are the steps using a Gmail account with Incredible PBX 2020:

cd /etc/mail
yum -y install sendmail-cf
hostname -f > genericsdomain
touch genericstable
cd /usr/bin
rm -f makemap
ln -s ../sbin/makemap.sendmail makemap
cd /etc/mail
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
# Stop here and edit client-info (nano -w client-info) in all three lines.
# Replace  user_id with your gMail account name without @gmail.com
# Replace password with your real gMail password OR
#  use your Gmail App Key if 2-step verification is enabled
# Be sure to replace the double-quotes shown above if they don't appear in the file!!!
# Save your changes (Ctrl-X, Y, then Enter)
chmod 600 client-info
makemap -r hash client-info.db < client-info
cd ..
make
systemctl restart sendmail

Even though these servers are hosted in the cloud, we still recommend using a SmartHost to minimize email delivery problems.

Test outbound mail using this command with your actual email address:

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

On some implementations, you may notice in the FreePBX GUI that the mail queue has failed. Here's the fix:

chmod 777 /var/spool/mqueue
service sendmail restart

Once you are sure your emails are being delivered reliably, here's a sample GUI voicemail configuration for an extension:



Incredible PBX 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.

add-fqdn is used to whitelist a fully-qualified domain name in the firewall. Because Incredible PBX 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.

admin-pw-change is used to set the admin password for access to the FreePBX/Incredible PBX web GUI using a browser pointed to the local IP address of your server.

apache-pw-change is used to set the admin password for access to Apache/Incredible PBX apps including AsteriDex and Reminders. This provides a password layer of protection for access to these applications.

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 actually is. A similar listing is available in the GUI at Admin -> Feature Codes.

show-passwords is a script that displays most of the passwords associated with Incredible PBX. 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.

update-asterisk16 is a script that updates your server to the very latest release of Asterisk 16. You can run it periodically to keep your server up to date with the latest and greatest features.

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.

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"

Getting Started with Incredible Fax

Believe it or not, there still are lots of folks that use faxes in their everyday lives. If you're one of them, Incredible PBX has your back. With Incredible PBX 2021, Incredible Fax is already installed. Simply set your email address for delivery of your faxes in PDF format, and you're all set: /root/avantfax-email-change. With Incredible PBX 2020, begin by logging into your server as root and running incrediblefax2020.sh to install HylaFax and AvantFax on your server. You'll be prompted a dozen or more times for information. Answer no to the secure fax question. For the rest of the prompts, just press ENTER to accept the default entries. Rebooting your server is required when the install finishes.

Once your server is back on line, there will be a new AvantFax tab in the GUI. The default credentials are admin:password. After you enter the username and password, you will be prompted to change your admin password. The old password is still password. Then enter your desired password twice and save the setting. The AvantFax dashboard then will display. If nothing has come unglued, you should see four green Idle icons:



You can Send Faxes from within AvantFax by choosing the Send Fax tab, or you can use one of many HylaFax clients. Google is your friend.

Keeping FreePBX 15 Modules Current

We strongly recommend that you periodically update all of your FreePBX modules to eliminate bugs and to reduce security vulnerabilities. From the Linux CLI, log into your server as root and issue the following commands:

rm -f /tmp/*
fwconsole ma upgradeall
fwconsole reload
/root/sig-fix
systemctl restart apache2
/root/sig-fix

Where To Go From Here

For a limited time, check out Lenny on our Atlanta demo server by dialing 404-999-0010.

Complete documentation on the ClearlyIP Devices Module is available here.

Complete documentation on the FreePBX GPL Modules is available here.

Complete documentation on the Incredible PBX additions is available here.

An introduction to configuring extensions, trunks, and routes is available here.

Free voicemail transcription with email delivery. Tutorial available here.

Setting Up a VPN for Your PBX: OpenVPN or NeoRouter
 

Originally published: Monday, July 6, 2020  Updated: Saturday, January 16, 2021



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. It has been reported that Norton AntiVirus currently gives a security alert on the Crown Cloud web site. Don't be alarmed. It's a false positive. []

Revolutionary: Incredible PBX & Fax 2020 for Raspberry Pi



Enhancements to the Raspberry Pi 4 platform have been fast and furious this fall. Last week we introduced a $45 bootable SSD for the Raspberry Pi. And this week we’re showcasing the $70 Raspberry Pi 400 keyboard PC and a new release of the Incredible PBX 2020 image supporting both of these additions with all the latest Raspberry Pi firmware.

As we’re all hunkered down hiding from the Coronavirus, it seemed a perfect time to finally tackle the project we’ve been putting off for longer than we care to publish, integrating Incredible Fax with HylaFax and Avantfax into the base image of Incredible PBX® 2020 on the Raspberry Pi 4 platform. This build also features Asterisk® 16 with the latest FreePBX® 15 GPL modules plus the feature sets of Incredible PBX® and RasPBX and RonR’s latest build. It includes support for plug-and-play Incredible IP Phones and a new trunking platform that integrates SMS messaging into your Asterisk platform. And it’s all rolled into one terrific bundle that can be installed in about a minute after you burn the image to a microSD card.

Unlike other aggregations, there’s nothing to compile with Incredible PBX/FAX 2020 for Raspbian 10. And, unlike the FreePBX Distro, we don’t rely on static packages which make it difficult to add future modifications on your own. Instead, Incredible PBX/Fax 2020 offers a snapshot image with a complete toolkit to make future modifications as desired. Last, but not least, Incredible PBX/Fax 2020 features the new ClearlyIP module repository which protects you from proprietary modifications that limit or cripple your PBX moving forward.

What’s Included? Incredible PBX/Fax 2020 for Raspbian 10 serves up a never before available 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, Incredible Fax with turnkey Hylafax and AvantFax, and most of the Incredible PBX feature set including SIP, SMS, voice recognition, AsteriDex, PicoTTS Text-to-Speech VoIP applications plus email delivery of faxes in PDF format, 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 transcribed voicemails, 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. Or you can use the new ClearlyIP trunking module included in the GUI for seamless integration of SMS messaging into FreePBX and its User Control Panel.

Choosing a SIP Provider. As we mentioned, Incredible PBX/Fax 2020 comes preconfigured to support five of the major SIP providers: ClearlyIP, Skyetel, VoIP.ms, V1VoIP, and Anveo Direct. We obviously hope you’ll choose ClearlyIP, Skyetel, or VoIP.ms trunking because they financially support Nerd Vittles and our open source projects. As the old saying goes, they may not be the cheapest, but you get what you pay for. With all five providers, you only pay for minutes you use so signing up with more than one provider is a smart idea.

>

Assembling the Required Raspberry Pi Components

Before you can deploy Incredible PBX 2020, you’ll first need the necessary Raspberry Pi hardware. To support the enhanced Incredible PBX/Fax platform, we strongly recommend either the Raspberry Pi 400 or the Raspberry Pi 4B with at least 2GB RAM for under $42. You can choose a reseller below for quicker delivery. Assuming you already own an HDMI-compatible monitor and a USB keyboard (only required if you don’t buy a RasPi 400)…

  • Raspberry Pi 4B or Raspberry Pi 400
  • $8 USB-C RasPi 4 (only) Power Supply
  • $8 32GB microSDHC Class 10 card (strongly recommended!)
  • $5 Official RasPi 4B Case or see above for our favorite
  • Getting Started with Incredible PBX 2020

    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 latest Incredible PBX/FAX 2020.3 image from SourceForge
    2. Transfer Incredible PBX/FAX 2020 image to microSD card and Boot server
    3. Login to RasPi console as root:password to initialize your server (Automatic)
    4. In Localization Options, set Locale, TimeZone, Keyboard, & WiFi Country
    5. Reboot after writing down your server IP address (Automatic)
    6. Login via SSH or Putty as root:password to set passwords & setup firewall (Automatic)
    7. Enter an email address for receipt of incoming faxes in PDF format
    8. Run admin-pw-change to set the admin password for access to the web GUI
    9. Register for and configure at least one trunk provider for Incredible PBX 2020
    10. Set up and test your Exim mail server as documented below

    ALERT: Reportedly, the latest Raspberry Pi 4 board will not boot with the image above. We will post an updated image as soon as we can get our hands on a new Raspberry Pi. In the meantime, there’s a workaround if you have an older (working) Raspberry Pi. Begin by installing the Incredible PBX image above onto a new microSD card and boot the older RasPi 4 with that card. Login as root and immediately press Ctrl-C. Then issue the following commands and, following shutdown, insert the new microSD card into your new RasPi 4.

    apt update
    apt dist-upgrade
    halt
    

    First Boot of Incredible PBX 2020 with Wi-Fi

    Incredible PBX 2020 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, 4B and 400, 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 2020 microSD card into your Raspberry Pi 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
     country=US
    }
    

    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
    country=US
    
    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. NOTE: The Raspberry Pi 400 requires the latest Incredible PBX image for Wi-Fi connectivity.

    You’ll also need to change the default PortKnocker setting to your wireless LAN connection:

    sed -i 's|eth0|wlan0|' /etc/default/knockd
    service knockd restart
    

     

    First Boot of Incredible PBX Using Wired Connection

    Incredible PBX 2020 requires Internet connectivity to complete its automated install. After connecting your server to your local network with a network cable, insert the Incredible PBX 2020 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 2020 image to use your entire microSD card; however, this new build does this for you so you can skip this step. Next, choose Localization Options and set Locale, TimeZone, Keyboard, & WiFi Country. Review the other items and then exit and reboot.

    Once your server reboots and you log back in as root, you’ll first be prompted to enter an email address for delivery of incoming faxes in PDF format. All of your passwords then will be randomly assigned with the exception of the root user Linux password and your admin passwords for access to the web GUI and AvantFax. 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. Set the admin password for access to AvantFax with this command: /root/avantfax-pw-change. With the exception of these 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 RasPi. This is required for all of the SIP providers included in the Incredible PBX 2020 build. Otherwise, all inbound calls will fail.

    Configuring Skyetel for Incredible PBX 2020

    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. 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 2020:

    • Name: MyPBX
    • Priority: 1
    • IP Address: PBX-Public-IP-Address
    • Port: 5060
    • Protocol: UDP
    • Description: 2020.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 2020

    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 2020 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. On the Incredible PBX side, simply Enable the VoIPms trunk and save your update.

    Configuring V1VoIP for Incredible PBX 2020

    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. On the Incredible PBX side, simply Enable the V1VoIP trunks and save your updates.

    Configuring Anveo Direct for Incredible PBX 2020

    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. On the Incredible PBX side, simply Enable the AnveoDirect trunks and save your updates.

    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"
    

    Adding a Bootable SSD to Raspberry Pi

    Shown below are the two components that make up the 256GB storage solution for the Raspberry Pi. These include the M.2 SSD SATA drive and the M.2 enclosure which provides a USB connector that’s compatible with your RasPi. Assembly of the components takes less than a minute as shown in the steps below:




    You can order the M.2 SSD SATA drive and the UGREEN M.2 enclosure using our Amazon referral links which help support Nerd Vittles and the Incredible PBX open source project.

    Once you have assembled your SSD in the sleeve, log back in as root using SSH or Putty. For best performance, insert the SSD drive into one of the blue USB 3.0 ports and verify that /dev/sda device is shown when you issue the command: fdisk -l

    Now proceed with the following steps to copy the image from your microSD card to the new SSD SATA drive:

    rpi-clone -l -e sda -f sda
    # answer prompts with yes and incred2020
    # once the image is copied, dismount the drive when prompted
    mount /dev/sda2 /mnt/clone
    cd /mnt/clone/boot
    cp -p -r /boot/* .
    sed -i 's|sda2|mmcblk0p2|' /boot/cmdline.txt
    cd /
    umount /mnt/clone
    halt
    

     
    Now you’re ready to restart your Raspberry Pi from the SSD SATA drive. Remove the microSD card and reboot your server.



    Configuring a Softphone for Incredible PBX 2020

    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 for Windows 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 2020

    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 dpkg-reconfigure exim4-config. 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. You also must enable Less Secure Apps access to your Gmail account.

    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
    

    Once you have email messages flowing, incoming faxes automatically will be delivered to the email address you assigned when setting up your PBX. You can change this email address with the command: avantfax-email-change.

    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 2020 has booted" yourname@yourmailserver.com
    

    Configuring Inbound Routes for Fax Detection

    Not all VoIP trunks support fax transmission, e.g. Vitelity. Assuming yours do and you’ll only know by trial and error, here’s how to configure FreePBX to automatically detect incoming faxes and process them for PDF delivery by email. The default inbound route is preconfigured to support email delivery of your faxes. So, any trunks using that default route require no further configuration. If you add additional Inbound Routes, here’s how to enable fax detection on those routes.

    Under the Fax tab of each new Inbound Route, enter the following settings:

    Detect Faxes: YES
    Fax Detection Type: SIP
    Fax Ring: YES
    Fax Detect Time: 4
    Fax Destination: Custom Destinations -> Fax (Hylafax)
    



    Managing Faxes with AvantFax

    You can manage your incoming and outgoing faxes using AvantFax. Click on the AvantFax tab in FreePBX to access it. The default credentials are admin:password. When you first access AvantFax with a browser, you may get a missing page error. Just press the back arrow key in your browser and the AvantFax main page will appear.

    If you want to change the admin password for AvantFax, log into your server as root with SSH/Putty and issue the command: /root/avantfax-pw-change.

    Send yourself a fax at no cost in the United States from FaxZero.

    Building the Incredible PBX Demo IVR

    If you’d like to try your hand at building an IVR, here are the steps to build the Incredible PBX Demo IVR. From the FreePBX Dashboard, choose Applications -> IVR -> Add IVR. Then fill in the template using the entries shown below. Then click Submit and Reload Dialplan.



    Building the Incredible PBX Stealth AutoAttendant

    Many users prefer to play an announcement to incoming callers with a brief pause thereafter which indicates that the call is being connected. If configured properly, this lets you embed several dial codes which can be entered while the announcement is playing and the call is being transferred. For example, you might wish to route incoming calls to Lenny if a caller presses 0. Or you might wish to immediately route an incoming call to a Ring Group if the caller presses 1. Here’s a sample IVR setup to get you started.


    Incredible PBX 2020 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 2020 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.



    rpi-clone is a utility that makes it easy to make a bootable image of the microSD card used to start your Raspberry Pi. You’ll need a USB-to-microSD adapter to begin. Insert a backup microSD card large enough to hold all of the data on the primary microSD card (df -h). Insert the USB stick with the card. Identify the backup microSD card, usually sda (fdisk -l). Format the backup microSD card: mkfs.vfat /dev/sda1 && mkfs.ext4 /dev/sda2. Then issue the following command to clone the primary microSD card: rpi-clone -f sda. Tutorial here.

    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 2020 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 2020. 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-asterisk16 is a utility that updates Asterisk 16 to the latest release. This should only be necessary when a security issue or bug is identified that affects the operation of your PBX.

    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 2020.

    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"

    Keeping FreePBX 15 Modules Current

    We strongly recommend that you periodically update all of your FreePBX modules to eliminate bugs and to reduce security vulnerabilities. Make a backup image with rpi-clone first! From the Linux CLI, log into your server as root and issue the following commands:

    rm -f /tmp/*
    fwconsole ma upgradeall
    fwconsole reload
    /root/sig-fix
    systemctl restart apache2
    /root/sig-fix
    

    Upgrading Asterisk 16 to Asterisk 18

    For those that enjoy living on the bleeding edge, we’ve create a script which makes it easy to upgrade Incredible PBX 2020 to Asterisk 18. The tutorial is available on the new Incredible PBX Wiki along with dozens of other tutorials.

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

    Now Available: Amazon’s Polly TTS for Incredible PBX. Works great on the RasPi platform!

    Originally published: Tuesday, March 24, 2020  Updated: Monday, February 22, 2021



    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.
     



    Harnessing the Cloud to Start An Incredible PBX Business




    If you’ve ever wanted to start your own VoIP business and earn some big bucks through consulting and hosting cloud-based PBXs, now’s your chance. One of the requests we often receive from those that deploy Incredible PBX 2020® for a living is a quicker way to produce new Incredible PBX servers on cloud platforms such as Vultr and Digital Ocean while also preserving Incredible PBX’s unique ability to upgrade source components for Asterisk® and FreePBX®. For small businesses, these cloud providers offer a perfect $5 a month platform for Incredible PBX. You can mark it up to $10 or $15 a month and make a handsome 100% to 200% profit without lifting a finger as a VoIP consultant. And Vultr and Digital Ocean will spot you a $100 credit to get the ball rolling.

    Today’s solution was especially designed for those that would like to host virtual machines for customers in your own cloud account. It would work equally well for anyone wanting a quick way to create multiple Incredible PBX platforms in 5 minutes for friends and neighbors.

    To begin, you’ll need to create a master image of Incredible PBX 2020 on the cloud platform of your choice using the recommended $5/month platform with CentOS 7. The July 1, 2020 or later tarball of Incredible PBX 2020 is required. Here are the Five Easy Steps:

    1. Create the base Incredible PBX 2020 platform in the traditional way:

    # create a secure root password to hand out to future customers
    passwd
    yum -y update
    yum -y install net-tools nano wget tar
    cd /root
    wget http://incrediblepbx.com/incrediblepbx2020.1.tar.gz
    tar zxvf incrediblepbx2020.1.tar.gz
    rm -f incrediblepbx2020.1.tar.gz
    # to add swap file on non-OpenVZ cloud platforms with no swap file
    ./create-swapfile-DO
    # kick off Phase I install
    ./IncrediblePBX2020.sh
    # after reboot, kick off Phase II install
    ./IncrediblePBX2020.sh
    # set desired timezone
    ./timezone-setup
    # optionally install Incredible Fax 2020
    ./incrediblefax2020.sh
    

    2. Once you complete the Phase I and Phase II installs and optionally install Incredible Fax, log out of your server and log back in so that the Automatic Update Utility can do its thing.

    3. Next, we need to configure your master image so that it can be replicated using a simple image snapshot. A snapshot is free on the Vultr platform and will cost you about $5 a month with Digital Ocean. While still logged into your server as root, issue the following commands and then shut down your server gracefully:

    cd /etc/sysconfig
    cp -p rules.v4.tm3 iptables
    sed -i 's|#-A|-A|' iptables
    touch /etc/update_hostconfig
    touch /etc/update_serverconfig
    halt
    

    4. Once your server has halted, create a snapshot image of the server from Vultr or Digital Ocean dashboard. You do NOT need to preserve your Master VM once the snapshot is created.

    5. Create a new virtual machine but, instead of choosing CentOS 7 as the base platform, choose the snapshot image built in the previous step. Once the 5-minute install completes, it’s ready for handover to a new customer by providing the root password from the Master Image together with the IP address of the new virtual machine.

    When the new customer logs in via SSH using the root password from the Master Image, the Incredible PBX reconfiguration script will complete the setup of the new platform in a couple minutes prompting the user to change all of the passwords, resetting the ports for PortKnocker, and reconfiguring the firewall by whitelisting the customer’s IP addresses. If the build includes Incredible Fax, the customer should be instructed to change the AvantFax password. Run: /root/avantfax-pw-change. If the customer is in a different time zone, the customer should run /root/timezone-setup. Whooda thunk making money could be this easy.

    The real beauty of this design is that you keep control of all the virtual machines you create. If a customer fails to pay, it’s easy to either shut down their VM or even delete it. You also can schedule automatic backups for the customer while recovering the extra $1 per month charge from the provider. In addition, if the customer ever needs hands-on support, you can use the Console link in the Dashboard without the need to whitelist your IP address. The customer still retains full control over the root password which would have to be provided.
     

    Originally published: Monday, July 27, 2020



    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.
     



    A New World: Adding Cellular Extensions to Incredible PBX


    Over the past few weeks, we’ve introduced a revolutionary new technology for the Asterisk® and FreePBX® community by marrying Incredible PBX® with GTI Global cellular extensions. For $20 to $35 a month, you get a new SIM card for your unlocked GSM cellphone that links all four U.S. carrier networks to a PJsip extension on your PBX. Incoming calls ring on both the cellphone and any other SIP phone connected to the same PJsip extension. Outbound calls from the cellphone get processed just like every other outbound call on your PBX. All the other bells and whistles that make Asterisk and FreePBX a one-of-a-kind platform work exactly the same way on the smartphone as they do with every other PBX extension. And your cell phone is no longer tied to a single carrier’s network. Based upon your current U.S. location, the GTI SIM finds the strongest signal by automatically selecting from the cell towers of the four major U.S. carriers: AT&T, Verizon, T-Mobile, and Sprint. And last week, we added additional icing to the cake by introducing the perfect cloud platform for Incredible PBX in either Atlanta or Los Angeles for a jaw-dropping $25 a year with a 5-minute install.

    Today we want to document the setup procedure to put all the cellular pieces in place to add a GTI-enabled cellphone to your Incredible PBX platform. In a nutshell, there are preliminary configuration steps on your PBX so that GTI can verify that your PBX can be successfully integrated into their cellular network. Next, you’ll need to sign up for service with GTI Global and provide some basic information about your server configuration. Once you receive credentials from GTI Global, you’ll need to complete some additional setup steps on your PBX including creation of a GTI trunk as well as configuring inbound and outbound routes to support your cellphone calls. You’ll also need to add exceptions for each GTI DID to the [from-sip-external] context. Finally, await delivery of your SIM card and then decide how you will deploy the GTI SIM on a GSM cellphone of your choice.

    GTI Global provides promotional consideration to help defray costs of our Asterisk projects.

    Preliminary Configuration Steps with Incredible PBX

    To connect a GTI-enabled cellphone to Incredible PBX, here are the preliminary steps:

    1. Incredible PBX must have a static IP address on the public Internet.
    2. Whitelist a number of GTI IP addresses in your firewall.
    3. Create a PJsip extension for each GTI-enabled cellphone.
    4. Create a Preliminary Chan_SIP Trunk for Registration to GTI.

    These whitelist entries should be added to iptables-custom in the /usr/local/sbin directory:

    /usr/sbin/iptables -I INPUT -p udp -m udp -s 99.198.122.166 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 99.198.110.51  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 96.127.174.38  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.170  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.171  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.172  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.173  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s someid.mvnoserver.com --dport 5060:5069 -j ACCEPT
    

     
    For each GTI cellphone you plan to deploy, add a PJsip extension with a very secure password:

    Extension: 484xx1
    Display Name: 484xx1 GTI
    Secret: yourSuperSecretpassword
    
    Advanced -> Max Contacts: 3
    

     
    Also make note of the SIP port that is configured for your PJsip extensions, typically 5061. It’s shown as Port to Listen On under Settings -> SIP Settings -> PJsip Settings in FreePBX GUI.

    Create a preliminary Chan_SIP Trunk for registration to GTI leaving the CallerID field empty:

    Trunk Name: trunk4321
    
    PEER Details:
    
    username=trunk4321
    type=friend
    secret=yourBIGpassword
    host=xxxxxx.mvnoserver.com
    disallow=all
    allow=ulaw
    canreinvite=no
    dtmfmode=rfc2833
    port=5062
    
    Register string: trunk4321:yourBIGpassword@xxxxxx.mvnoserver.com:5062
    

     

    Registration Information to be Provided to GTI

    As part of your GTI setup procedure, in addition to your name and a reachable cellphone number, you will be prompted for the following information. If any of it is missing, open a support ticket and provide it. NOTE: you must register through our portal, or your request will be denied unless you pay the standard $250 setup fee which is waived for our users. All GTI accounts through Nerd Vittles include one free SIM card, a free trunk account to process calls to and from your GTI pjSIP extension(s), and a free DID for each SIM card. Unlimited calling and unlimited SMS/MMS messaging is included on all plans. Pricing difference is for monthly data allocations: $20 (no data), $25 (2GB), and $35 (4GB). You must pay for the first month’s service BEFORE your SIM card will be shipped.

    1. PBX Public IP Address and Trunk Listening Port (5062)
    2. Extension IP address (PBX public IP address)
    3. pjSIP Extension Number
    4. pjSIP Extension Secret
    5. pjSIP Extension Port (5061)
    6. Service Desired: $20, $25, or $35 monthly plan
    7. Area Code Desired for DID
    8. Business Name and Shipping Address for Your SIM

    Configuring Your PBX with GTI Credentials

    Once GTI has verified that they can communicate with your PBX, you will be provided the credentials for your GTI Trunk. Simply edit the trunk you configured above inserting the Trunkname/Username, Secret, Host, and Port for your new Trunk. Modify the Register String, save your settings, and reload your dialplan. Also edit your whitelist and change the FQDN from someid.mvnoserver.com to the host name that was provided. Then restart the firewall: iptables-restart.

    Verifying Successful Extension & Trunk Registrations. Once your GTI extension and trunk are configured. You can verify successful connections in the Asterisk CLI.
    For the extension: pjsip show aors
    For the trunk: sip show registry

    Configuring an Inbound Route for GTI Global Calls. Replacing 16785551212 with your actual 11-digit DID assigned to each cellphone, create Inbound Routes that look like this:

    Description: GTIglobal 16785551212
    DID Number: 16785551212
    Destination: Extension -> 484001 (extension number of matching SIM)
    

     
    Also add the following context at the end of /etc/asterisk/extensions_custom.conf using your DID. Then reload your dialplan: asterisk -rx "dialplan reload"

    [from-sip-external]
    ; GTI Global
    exten => 16785551212,3,Goto(from-trunk,${DID},1)
    

     

    Configuring an Outbound Route for GTI Global Calls. No special outbound routes are required unless you wish to use the GTI Global trunk to process U.S. calls at no cost. In this case, configure an Outbound Route pointing to your GTI Global Trunk. NOTE: Calls using this trunk can only be made from the extensions associated with GTI Global SIMs.

    CallerID and Trunking Strategy. In setting up the GTI components in FreePBX, you need to consider how you wish to process outbound calls. If you want all outbound calls including those from the GTI extensions to reflect the company’s main phone number, then you can use your default outbound route making certain that CallerID override is set with the company number in the appropriate trunks. No CallerID should be set in the outbound route.

    If you want calls from the GTI extensions to use the GTI trunk with the CallerID number of the individual cellphones, then the GTI trunk needs to be moved to the top of the default route sequence with no CallerID number specified in the GTI trunk or the outbound route. Instead, set the correct 11-digit CallerID numbers in each of the GTI extensions. This will not impact outbound calls from other extensions because the GTI trunk will indicate congestion forcing the calls out through the next trunk specified in the outbound route.

    I’ve Got My GTI SIM. Now What?

    It’s decision time on what sort of smartphone you wish to use with your GTI SIM. If you’re a heavy data consumer then it may make sense to acquire a cellphone that supports dual SIMs and use a SIM with an unlimited data plan as your data provider and use the GTI SIM for business purposes with your PBX.

    Choosing a Cellphone Platform. Our favorite deployment strategy is to take advantage of the new dual SIM offerings that allow a user to have one SIM for personal use and a second SIM (GTI) for business use. This lets you acquire the least expensive cell service with unlimited data for personal use and acquire the $20 GTI SIM with no data plan through our Incredible PBX offering. You don’t really need two data plans on the same smartphone. A couple of options worth exploring include GTI’s MVNO offering of T-Mobile unlimited data service for $35 a month and Visible (a Verizon-owned MVNO) that offers unlimited plans for as little as $25 a month with a four-user signup. The users need not be related, and the users can each pay their own monthly bill. Keep in mind that MVNOs almost always have fine print allowing "deprioritization" in busy areas and during busy times of the day. And the underlying carriers always screw their MVNO customers first.

    Some smartphones support two SIMs while others have one physical SIM slot plus an eSIM registration that can be acquired from the major carriers. We personally liked an unlocked $200 Motorola G8+ which has two actual SIM slots as do most of the newer Samsung, OnePlus, Huawei, and many other smartphones. Several cellphones from BLU are available for under $25. The following devices currently support a single SIM card plus an eSIM:

    • Apple® iPhone® SE
    • Apple iPhone 11
    • Apple iPhone 11 Pro
    • Apple iPhone 11 Pro Max
    • Apple iPhone XR
    • Apple iPhone XS
    • Apple iPhone XS Max
    • Google Pixel 4 / Pixel 4 XL

    Configuring the API Settings for GTI. Once you insert your SIM into your smartphone and power it on, you need to modify the API settings and choose GTI Global (Mobile-X) as your provider for the GTI SIM. Here is a FAQ covering the appropriate API settings depending on whether you’re using an iPhone or Android phone. Here’s another tip. Even though your phone may show a number of available carriers other than Mobile-X, that doesn’t mean you can connect to any of them directly. Why? Because you don’t have credentials to access those networks. Your connection to those other networks is only available through Mobile-X using your GTI credentials.

    Testing Out Your GTI Smartphone

    Once you complete all of the steps above, it’s time to try things out. From your cellphone, try dialing *98 to connect to Asterisk voicemail. Next, try calling another extension on your PBX. Then try calling an outside number. Finally, try calling the DID of your GTI SIM from another phone and be sure it rings and you have audio in both directions.

    When you complete the testing, you can add another SIP phone to the same extension as your GTI cellphone. Be sure to set the port to the proper port for your PJsip extension. When you call your GTI SIM’s DID, both the smartphone and the SIP phone should ring simultaneously.

    In some environments, you may wish to configure 611 calls to ring a support ring group in your organization. If so, add a new SIP extension 611 and forward calls to that extension to the number of the desired ring group. For example, if the Ring Group number is 777, you could enter the following command at the Asterisk CLI: database put CF 611 777.
     

    Originally published: Monday, July 13, 2020



    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 Cellular Extensions for Incredible PBX & Asterisk



    The Holy Grail for many of us in the VoIP community has been a cellphone that functions like a traditional Asterisk® extension on your PBX. The typical use case would be a real estate agent, service technician, salesperson, or other mobile worker who interacts with a home office as part of their daily routine. The beauty of this for the mobile workforce is it allows both the home office receptionist and the mobile worker to not only exchange calls but also to transfer the calls and retrieve voicemail just as if the worker were using a phone in the office.

    Some of you may recall that we introduced a service like this called vMobile from Vitelity about six years ago. vMobile had some growing pains not the least of which was total reliance upon Sprint for cellular coverage. The service has been discontinued.


    Today we’re testing a new offering from Global Technologies (GTI Global) on the Incredible PBX® platform that addresses some of the shortcomings of the vMobile offering. First, it provides a SIM card that can automatically utilize all four of the major carrier networks in the United States. Second, it offers a dedicated DID, a SIP trunk with free U.S. calling, and an Asterisk extension for every cellphone. And third, it takes advantage of PJsip which permits multiple phones to be connected to and ring on the same Asterisk extension.

    GTI Global provided promotional consideration to help defray costs of our Asterisk projects.

    Prerequisites. System integrators will acquire SIM cards through the Incredible PBX project. Pricing for the recommended unlimited calling, unlimited messaging, and 2GB monthly data plan is $25/month. A NoData plan is available for $20/month, and other higher data plans also are available. The SIM is compatible with any iPhone® or Android phone device. Users must provide their own cellphones which need not be jailbroken. Dual-SIM smartphones allow users to dedicate one line to the GTI Global SIM and another line for personal use. GTI Global currently is exploring support for eSIMs which would facilitate iPhone use.

    To use the SIM-based phone, a public-facing Asterisk platform with a dedicated IP address is required, and it must support PJsip extensions. Incredible PBX 2020, Incredible PBX 16-15, and Incredible PBX 13-13 all have been tested. Other FreePBX® 13, 14, and 15 platforms should also suffice. Accompanying each SIM is a dedicated DID assigned to each cellphone. A matching PJsip extension must be created on the Asterisk platform, and the SIP credentials must be provided to GTI Global to make the cellphone connection to the PBX. Additional phones may be connected to the same PJsip extension to support a desktop phone or receptionist. Simply adjust the Max Connects entry when creating the PJsip extension to support the number of phones desired. Each phone on an extension requires a unique port.

    How Calling Works. GTI Global has positioned servers in the facilities of every carrier. When a call arrives from a carrier’s tower, the carrier processes 911 calls directly through its network. For all other incoming calls, the carrier verifies the credentials of the SIM. Once verified, the call is passed to the GTI Global server which sends incoming calls to the associated extension on your PBX. The Inbound Route associated with that DID then sends the call to the assigned destination. If the GTI Global server is unavailable, the carrier processes the incoming calls just as it would any other call on its network by sending it directly to the cellphone.

    When the cellphone user places a call, it is processed just as if the call had been made from an internal extension on the PBX with the exception of 911 calls which are handled directly by the carrier. After SIM verification, GTI Global passes the outgoing call to the PBX for processing using the Outbound Routing rules of the PBX. Internal extensions and voicemail can be dialed directly. Outbound calls can utilize any trunk associated with the PBX including the free U.S. trunk provided by GTI Global. CallerID is determined by the outbound trunk processing the call.

    Configuring a GTI Global Extension. After logging into the FreePBX GUI, create a PJsip extension with the following settings:

    Extension: 12345
    Display Name: 12345 GTIglobal
    Secret: yourSIPpassword
    
    Advanced -> Max Contacts: 4
    

    Configuring a GTI Global Trunk. Create a chan_SIP Trunk in the FreePBX GUI using your GTIglobal-provided credentials:

    Trunk Name: trunk4321
    
    PEER Details:
    
    username=trunk4321
    type=friend
    secret=yourTRUNKpassword
    host=xxxxxx.mvnoserver.com
    disallow=all
    allow=ulaw
    canreinvite=no
    dtmfmode=rfc2833
    port=5062
    
    Register string: trunk4321:yourTRUNKpassword@xxxxxx.mvnoserver.com:5062
    

    IMPORTANT: When you sign up with GTI, you need to give them the IP address of your PBX, the credentials (extension and password) for your GTI PJsip extension, the outbound SIP port for your GTI trunk (UDP 5062), and the inbound PJsip port for your PJsip extension (UDP 5061).

    Configuring an Inbound Route for GTI Global Calls. Replacing 16785551212 with your actual 11-digit DID assigned to each cellphone, create Inbound Routes that look like this:

    Description: GTIglobal 16785551212
    DID Number: 16785551212
    Destination: Extension -> 12345 (your extension associated with each SIM)
    

    You need to add the following context at the end of /etc/asterisk/extensions_custom.conf using your DID. Then reload your dialplan: asterisk -rx "dialplan reload"

    [from-sip-external]
    ; GTI Global
    exten => 16785551212,3,Goto(from-trunk,${DID},1)
    

    Configuring an Outbound Route for GTI Global Calls. No special outbound routes are required unless you wish to use the GTI Global trunk to process U.S. calls at no cost. In this case, configure an Outbound Route pointing to your GTI Global Trunk. NOTE: Calls using this trunk can only be made from the extensions associated with GTI Global SIMs.

    CallerID and Trunking Strategy. In setting up the GTI components in FreePBX, you need to consider how you wish to process outbound calls. If you want all outbound calls including those from the GTI extensions to reflect the company’s main phone number, then you can use your default outbound route making certain that CallerID override is set with the company number in the appropriate trunks. No CallerID should be set in the outbound route.

    If you want calls from the GTI extensions to use the GTI trunk with the CallerID number of the individual cellphones, then the GTI trunk needs to be moved to the top of the default route sequence with no CallerID number specified in the GTI trunk or the outbound route. Instead, set the correct 11-digit CallerID numbers in each of the GTI extensions. This will not impact outbound calls from other extensions because the GTI trunk will indicate congestion forcing the calls out through the next trunk specified in the outbound route.

    GTI Global Firewall WhiteList. On Incredible PBX servers and other IPtables platforms, add the following whitelist entries to your firewall:

    /usr/sbin/iptables -I INPUT -p udp -m udp -s 99.198.122.166 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 99.198.110.51  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 96.127.174.38  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.170  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.171  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.172  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 37.18.129.173  --dport 5060:5069 -j ACCEPT
    

    How to Proceed. If GTI Global cellular extensions are of interest for your customers, kindly contact us at support@incrediblepbx.com, and we’ll hook you up with the folks at GTI Global. There also is an extensive KnowledgeBase for those wanting more information.

    Continue Reading: Last Chance to Jump onto Incredible PBX Cellular Bandwagon
    Soup-to-Nuts Tutorial: Adding Cellular Extensions to Incredible PBX
     

    Originally published: Monday, June 22, 2020



    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.
     



    Vonage Roars into the Asterisk World with Nexmo



    We’re a bit late to the Nexmo® party. For those unfamiliar with the company, Nexmo was one of the leading communications platform-as-a-service (CPaaS) companies prior to their acquisition by Vonage® four years ago. Perhaps because of the Vonage name, Nexmo never appeared on our Asterisk® radar. This ZDnet article will get you up to speed. Suffice it to say, Nexmo has one of the best APIs in the VoIP business, and their pricing is reasonable. A DID offering multiple call paths will only set you back $1 a month with incoming calls costing $0.0049/minute with per second billing. Outbound U.S. calls are $0.0139/minute. Sending SMS messages using your DID costs $0.0068 per message while incoming messages are $0.0062. While barely scratching the surface of the Nexmo offerings, our goal today is to show you how to deploy a Nexmo trunk in IncrediblePBX® 2020 that provides voice and SMS.

    As we have mentioned many times, one of the real beauties of VoIP is not having to put all your eggs in one basket like in the old MaBell days. Other than $1 a month for a DID, there are no other costs associated with a Nexmo account if you don’t use it AND your first $10 of usage is free. It also provides a terrific failover option from one of our two favorite providers: Skyetel and ClearlyIP.

    Overview. There are eleven pieces to put in place to get inbound and outbound calls and SMS messages flowing. First, on the Nexmo site, (1) you’ll need to set up an account and (2) order a DID. HINT: When you search for numbers, be sure to use the 1 prefix to search for U.S. numbers by area code. Once the DID number has been activated, edit Your Number and (3) enter a web address to deliver incoming SMS messages to your PBX and (4) enter a SIP URI to send incoming calls to your PBX. (5) You’ll also need to make note of your API credentials and DID number which you will need in setting up the trunk and scripts on your PBX.

    Second, on the PBX side, (1) you’ll need to whitelist several IP addresses for Nexmo in your firewall settings, (2) create a PJsip trunk with your Nexmo credentials and 11-digit CallerID number, (3) create an Outbound Route to send calls to Nexmo, (4) create an Inbound Route to accept calls from your Nexmo DID, (5) add a from-internal-custom dialplan rule to allow from-sip-external calls from Nexmo, and (6) install and configure our scripts to process SMS messages. This requires that outbound email is functional on your PBX.

    SMS Messaging is a little different on every platform. The way we implemented it with Nexmo goes like this. Incoming SMS messages can be delivered either to an email address of your choice. Or, if your cellphone provider supports it, you can direct the emails to an address that your provider offers to process incoming messages and deliver by SMS to your cellphone:

    • AT&T: phonenumber@txt.att.net
    • Sprint: phonenumber@messaging.sprintpcs.com
    • T-Mobile: phonenumber@tmomail.net
    • Verizon: phonenumber@vtext.com or phonenumber@vzwpix.com
    • Virgin Mobile: phonenumber@vmobl.com

    Keep in mind that you can’t reply to a delivered email message and expect it to reach the sender. Outbound SMS messages with Nexmo must be generated either with a web browser pointed to the SMS directory on your PBX or from the Linux command line of your server. If the incoming SMS messages are redirected to SMS on your cellphone, you can click on the ORIGIN link and send an SMS reply, but it will have the number of your cellphone, not your Nexmo number. We’ll cover the syntax for these options once we get all the pieces in place.

    Configuring SendMail with Incredible PBX 2020

    Before we get too far along, let’s make sure you can send emails from your PBX. In order to receive SMS messages by email delivery, outbound mail functionality from your server obviously is required. If you’ve deployed your server in your home, your Internet Service Provider probably blocks downstream mail servers such as Incredible PBX from sending mail. This is done to reduce SPAM. In this case, you will need to configure SendMail using either your ISP or Gmail as an SMTP Relay Host. 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. You also must enable Less Secure Apps access to the Gmail account. Here are the steps using a Gmail account:

    cd /etc/mail
    yum -y install sendmail-cf
    hostname -f > genericsdomain
    touch genericstable
    cd /usr/bin
    rm -f makemap
    ln -s ../sbin/makemap.sendmail makemap
    cd /etc/mail
    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
    # Stop here and edit client-info (nano -w client-info) in all three lines.
    # Replace  user_id with your gMail account name without @gmail.com
    # Replace password with your real gMail password OR
    #  use your Gmail App Key if 2-step verification is enabled
    # Be sure to replace the double-quotes shown above if they don't appear in the file!!!
    # Save your changes (Ctrl-X, Y, then Enter)
    chmod 600 client-info
    makemap -r hash client-info.db < client-info
    cd ..
    make
    systemctl restart sendmail
    

    If your server is hosted in the cloud and your provider does not block TCP port 25, then you can send mail without using a SmartHost; however, your server's hostname must actually be real or downstream mail servers will reject your mail. You can set your server's hostname like this: hostname myserver.myhost.com. This is usually sufficient; however, it's a good idea to also add the hostname in /etc/hostname and in /etc/hosts as the first entry on 127.0.0.1 line:

    127.0.0.1   myserver.myhost.com pbx.local localhost localhost.localdomain
    

    Next, test outbound mail using this command with your actual email address:

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

    Configuring Nexmo for Use with Incredible PBX

    NOTE: For ease of reference in the examples, we'll use 8005551212 to represent your 10-digit DID number, 18005551212 to represent your 11-digit DID number, and 22.33.44.55 to represent the public IP address of your PBX. You'll obviously need to replace these entries.

    1. To get started, open Nexmo.com with a web browser and click on Try It Free. No credit card is required to use your $10 credit.

    2. Next, purchase a DID to use with your PBX. Login to your Nexmo account, and click # Numbers then Buy Numbers. For Features, choose SMS & Voice. For Type, leave it set to Mobile. For Number, choose Starts With and enter 1800 replacing 800 with your desired area code. Don't forget the 1. When we opened our account, it already had a DID chosen. You can either use that one to experiment, or delete it and choose your own.

    3. Click # Numbers then Your Numbers and click on the pencil icon to the right of your DID to edit the DID settings. Under SMS, enter a Webhook URL that looks like this using the public IP address of your PBX: http://22.33.44.55/sms.

    4. Under Voice, choose Forward to SIP and enter a SIP URI in this format using your 10-digit DID (not eleven digits here!) and the public IP address of your PBX: 8005551212@22.33.44.55. Then click SAVE.

    5. Navigate to Settings under your Account Name and write down your API Key and Secret as well as your purchased DID Number.

    Configuring Incredible PBX for Use with Nexmo

    1. Incredible PBX includes a whitelist as part of its Travelin' Man 3 firewall design. Begin by editing iptables-custom in /usr/local/sbin. Search for: # custom rules go below here. Below that line, insert the following, save the file, and restart IPtables: iptables-restsrt

    # // New entry for Nexmo
    /usr/sbin/iptables -I INPUT -s api.nexmo.com  -j ACCEPT
    /usr/sbin/iptables -I INPUT -s 169.63.86.0/24 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 5.10.112.121  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 5.10.112.122  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.247.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.247.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.247.3   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.247.4   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.248.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.248.3   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.248.4   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.248.9   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.249.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.249.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.249.3   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.249.4   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.250.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.250.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.250.3   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.250.4   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.251.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.251.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.251.3   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 69.59.251.4   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 119.81.44.6   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 119.81.44.7   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 168.100.88.1  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 168.100.88.2  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 168.100.88.3  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 168.100.88.4  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.48.36.56  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.48.36.66  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.55.62.70  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.55.62.215 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.60.141.29 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 169.60.141.30 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.0.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.0.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.1.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.1.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.2.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.2.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.3.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.3.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.4.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.4.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.5.1   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.5.2   --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.62.4  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.62.5  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.4  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.5  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.38 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.39 --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.100  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.101  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.116  --dport 5060:5069 -j ACCEPT
    /usr/sbin/iptables -I INPUT -p udp -m udp -s 216.147.63.117  --dport 5060:5069 -j ACCEPT
    # // End entry for Nexmo
    

    2. Login to FreePBX as admin and navigate to Connectivity -> Trunks -> Add PJsip Trunk.

    In General tab, enter Trunk Name: nexmo. Enter Outbound CallerID: your 11-digit Nexmo DID. If you forget the 1 or if your CallerID number doesn't match your Nexmo DID number, outbound calls will be delivered as Anonymous. No CallerID spoofing with Nexmo.

    In PJSIP Settings under the General tab, enter your API Key as Username, your API Secret as Secret, Outbound as Authentication, sip.nexmo.com as SIP Server, 5060 as SIP Port, and from-pstn-e164-us as Context. Retain the other defaults.

    In PJSIP Settings under the Advanced tab, enter YES for Send LineIn Registration, and 5.10.112.121, 5.10.112.122, 119.81.44.6,119.81.44.7,169.60.141.29,169.60.141.30 for Match.

    In PJSIP Settings under the Codecs tab, select ULAW and ALAW. Then click Submit and Reload the Dialplan when prompted. Verify registration: pjsip show registrations

    3. Create an Outbound Route under Connectivity. Name the route: Nexmo. For Trunk Sequence, choose nexmo. Create two Dial Patterns: one for NXXNXXXXXX with a prefix of 1 and one for 1NXXNXXXXXX. Click Submit and Reload Dialplan when prompted.

    4. Create an Inbound Route under Connectivity with a Description of Nexmo Vonage, a DID Number consisting of your 10-digit DID, and a Destination of your choice for the incoming calls. Click Submit and Reload Dialplan when prompted.

    5. Anonymous SIP access typically is blocked with Incredible PBX. Because of the way Nexmo delivers incoming calls, we need to make an adjustment to allow SIR URI access from Nexmo. Edit extensions_custom.conf in /etc/asterisk and scroll to the bottom of the file. Insert the following lines replacing 8005551212 with your actual 10-digit DID. Then SAVE the file and reload your dialplan: asterisk -rx "dialplan reload"

    [from-sip-external](+)
    exten => 8005551212,1,Goto(from-trunk,${DID},1)
    

    6. In FreePBX Settings -> SIP Settings, change the RTP Port Range to 10000-50000.

    7. The only remaining piece is to install the scripts to manage SMS Messaging with Nexmo. While logged into your server as root, issue these commands to install all of the components:

    # CentOS 6 requires minimum PHP 5.6 with remi.repo enabled
    # Prerequisites already are in place with Incredible PBX 2020
    # On CentOS platforms, use the next command:
    yum -y install composer
    # On Raspbian platforms, use the next command:
    apt-get -y install composer
    # the remaining commands work on all platforms
    composer require nexmo/client
    composer require slim/slim:^3.8
    cd /var/www/html
    wget http://incrediblepbx.com/nexmo-sms.tar.gz
    tar zxvf nexmo-sms.tar.gz
    rm -f nexmo-sms.tar.gz
    cd sms
    nano -w config.inc.php
    

    When the editor opens, insert your Nexmo API key, secret, and 11-digit DID number. For your email address, you have a choice of using a traditional email address which will cause incoming SMS messages to be delivered to your email account. Or you can use an email address that maps to SMS messaging on your cellphone as explained above. In the HEADER field, insert your 11-digit DID number once again leaving @noreply.nexmo.com unchanged. Save the file: Ctrl-X, Y, then ENTER. Done!

    Taking SMS Messaging for a Spin with Nexmo

    To try things out, first send an SMS message from some device to your Nexmo DID number. You should receive a copy of the message in your email or as an SMS message on your smartphone if you elected to set that up.

    Next, using a browser with WhiteList privileges to your PBX, send an SMS message to some SMS number using the following syntax where 22.33.44.55 is the PBX public IP address:

    http://22.33.44.55/sms/sendsms.php/?SENDTO=18431234567&MSG="Test message."
    

    Finally, after logging into your server as root, send another SMS message to some destination using the following syntax:

    php /var/www/html/sms/sendsms.php 18431234567 "Test message."
    

     

    Originally published: Monday, June 15, 2020    Updated: Sunday, October 30, 2022



    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.