The Hardware:
Raspberry Pi 3 Mobel B, RasPBX (raspbx-03-12-2017.zip) installed on an 8GB microSD card (or the close fitting Sandisk USB FIT flash drive), 10/100 or 10/100/1000 Ethernet switch, and a few new old stock xBlue Networks X-2020 10/100 VoIP phones, network cables, and a power strip.
Really, any Linux based PBX solution for ARM CPUs should work. I choose RasPBX. Maybe Incredible PBX is better? IDK, haven't tried it yet. (edit: I first got this working, then took some time to find my source and document my findings, did a rough check for errors all using the image contained within the raspbx-03-12-2017.zip file. I just barely saw a newer raspbx-04-04-2018.zip file is available (4-9-18). Thus, the need to further clarity. I will investigate further with my second deployment set.)
Visit Google to:
1) Register for GMail and claim a GMail email address, if you haven't already
2) Register for Google Voice and claim phone number, if you haven't already
3) Get your Google OAuth token for use with Google Voice
(primary source published Aug 2016 -- Google Voice with OAuth 2 Comes to Incredible PBX for XiVO – Nerd Vittles)
I wish there was an easier and more straight forward means to get this OAuth v2.0 Refresh Token from Google. This method does work and it is direct from Google, but it's clunky and therefore not easy or as straight forward as I think it could be.
Visit OAuth 2.0 Playground
Click on the Gear icon in upper right corner.
Check the box: Use your own OAuth credentials
Enter Incredible PBX OAuth Client ID:
466295438629-prpknsovs0b8gjfcrs0sn04s9hgn8j3d.apps.googleusercontent.com
Enter Incredible PBX OAuth Client secret:
4ewzJaCx275clcT4i4Hfxqo2
Click Close (the link at botton of the pop-up window you are currently working in)
To the left under "Step 1 Select & authorize APIs" section and just below the scroll box full of options is a text box. Enter:
https://www.googleapis.com/auth/googletalk
Then click the blue Authorize APIs button to the immediate right of the text box.
Step 1 section will fold up while the "Step 2 Exchange authorization code for tokens" expands.
Click the blue Exchange authorization code for tokens button
After the tokens are generated, Step 2 section will fold up and "Step 3 Configure request to API" section will expand. We want the Refresh Token that's just been generated and hiding in Step 2 section, so click on "Step 2 Exchange authorization code for tokens" to expand Step 2 again where you can then obtain your Refresh_Token.
Treat this Refresh Token with great care and store it securely, just like you would your user name and password to your online bank account. Authorization tokens NEVER expire! If you ever need to remove your authorization tokens, visit https://myaccount.google.com/permissions and delete Incredible PBX Google Voice OAUTH entry by clicking on it and choosing DELETE option.
Now that we have the needed Google OAuth token, we can continue with RasPBX or Incredible PBX.
Visit Sign in - Google Accounts and then click Sign-in & Security, near the bottom click on Allow less secure apps: OFF to toggle this ON. This is temporary while we get things tested and established.
Visit http://raspbx.local and login. (I presume this has been copied, installed, and somewhat configured. Google is your friend. Writing the image to an SD card will take some time - 10 to 30 minutes.)
Creating VoIP phone extensions:
From Applications drop-down menu, click Extensions. HINT: The User Extension and Secret of [Asterisk] PBX will be the VoIP phone user name and password respectively. I choose to start with 101 for the extension and an easy to recall password. The random secret like "9934e0a3f9149441e0f5ce3c418e3987" using the alpha-numeric on the VoIP phone keypad looked laborious and error prone - no thanks! Might be just fine if the phone has a webGUI of sorts to work with. Click the floating Submit bottom near the bottom to save these new settings. Then click the red Apply Config button at the top. (From hereon out I'll simply refer to these steps as Submit and Apply.)
YMMV as VoIP phones will vary in how they are setup and configured. Do take note of the port being used with the protocol. RasPBX has Chan_SIP defaulting to Port 5160 and Chan_PJSIP defaulting to Port 5060. Of course, as both the administrator and the end user, you change these up if so desired (just be consistent and reasonable, maybe 10.
The Ring Group:
From Applications drop-down menu, click Ring Groups. I created a ring group so that all extensions will ring for income calls. In theory, Paging would be very similar. Assign a number to the ring group, I choose 85, and select all the phone extensions you want to ring for inbound calls. Submit and Apply.
The finesse to get Google Voice working (with RasPBX - it seems a bit broken).
Downgrade to Google Voice/Motif v12.0.4.2:
From Admin drop-down menu, click Updates, and then click the Modules Updates tab.
Click the light blue Check Online button.
Find and expand the Google Voice/Chan Motif module under the Connectivity Module section.
Click Previous button, then select version 12.0.4.2. Click the Rollback button next to [version] 12.04.2. Click the Confirm button on the next screen. Then click the red Apply Config button.
Using the lower security Google Voice/Motif credentials:
From Connectivity drop-down menu, click Google Voice (Motif).
Enter the required details: your Google GMail user account name (i.e., the "johndoe" from johndoe -at- gmail.com), Google password, and your claimed Google Voice number. Both Create Outbound Routes and Create Trunk should be ON/Checked/Toggled. Then click Submit and Apply.
Test your configuration and try making a few calls. Once satisfied, we will need to revert a few things.
Upgrade to Google Voice/Motif 13.0.3.2:
From Admin drop-down menu, click Updates, and then click the Modules Updates tab.
Click the Check Online light blue button.
Find and expand the Google Voice/Chan Motif module under the Connectivity Module section.
This time around click the Download and Upgrade to 13.0.3.2 button. Scroll down and click the Process button. Click the Confirm button on the next screen. Then Apply.
Using the higher security OAuth 2.0 with Google Voice/Motif:
From Connectivity drop-down menu, click Google Voice (Motif).
This time we will edit the Google Voice (Motif) settings.
Click OAuth 2 to use the Refresh_Token obtained earlier (above).
Enter your Google Voice Refresh Token in the text box.
Since we have already established the Trunk and Outbound Routes the first time around, let's turn them off to prevent problems the second time around (yep, had to do this three times myself).
Set Configure Trunk to No with the No button.
Set Configure Outbound Routes to No with the No button.
Then click Submit and Apply.
Test the phone(s) and line(s) once more. If issues arise and you can't dial out, then you will need to revert back to Google Voice/Motif version 12.0.4.2, test phone(s) and line(s) again, then upgrade to the latest version of Google Voice/Motif, then edit your Google Voice (Motif) settings and try again with using the Google Voice Refresh Token.
Happy with how things are working, visit Sign in - Google Accounts again, click Sign-in & Security, and near the bottom of the page click on Allow less secure apps: ON to toggle this OFF (reverting back to just how we found it).
Next, I want to try and tackle VoIP calls with my cell phone via Bluetooth.
PS - Some minor tweaks for clarity and a newer image apparently is now available.
Raspberry Pi 3 Mobel B, RasPBX (raspbx-03-12-2017.zip) installed on an 8GB microSD card (or the close fitting Sandisk USB FIT flash drive), 10/100 or 10/100/1000 Ethernet switch, and a few new old stock xBlue Networks X-2020 10/100 VoIP phones, network cables, and a power strip.
Really, any Linux based PBX solution for ARM CPUs should work. I choose RasPBX. Maybe Incredible PBX is better? IDK, haven't tried it yet. (edit: I first got this working, then took some time to find my source and document my findings, did a rough check for errors all using the image contained within the raspbx-03-12-2017.zip file. I just barely saw a newer raspbx-04-04-2018.zip file is available (4-9-18). Thus, the need to further clarity. I will investigate further with my second deployment set.)
Visit Google to:
1) Register for GMail and claim a GMail email address, if you haven't already
2) Register for Google Voice and claim phone number, if you haven't already
3) Get your Google OAuth token for use with Google Voice
(primary source published Aug 2016 -- Google Voice with OAuth 2 Comes to Incredible PBX for XiVO – Nerd Vittles)
I wish there was an easier and more straight forward means to get this OAuth v2.0 Refresh Token from Google. This method does work and it is direct from Google, but it's clunky and therefore not easy or as straight forward as I think it could be.
Visit OAuth 2.0 Playground
Click on the Gear icon in upper right corner.
Check the box: Use your own OAuth credentials
Enter Incredible PBX OAuth Client ID:
466295438629-prpknsovs0b8gjfcrs0sn04s9hgn8j3d.apps.googleusercontent.com
Enter Incredible PBX OAuth Client secret:
4ewzJaCx275clcT4i4Hfxqo2
Click Close (the link at botton of the pop-up window you are currently working in)
To the left under "Step 1 Select & authorize APIs" section and just below the scroll box full of options is a text box. Enter:
https://www.googleapis.com/auth/googletalk
Then click the blue Authorize APIs button to the immediate right of the text box.
Step 1 section will fold up while the "Step 2 Exchange authorization code for tokens" expands.
Click the blue Exchange authorization code for tokens button
After the tokens are generated, Step 2 section will fold up and "Step 3 Configure request to API" section will expand. We want the Refresh Token that's just been generated and hiding in Step 2 section, so click on "Step 2 Exchange authorization code for tokens" to expand Step 2 again where you can then obtain your Refresh_Token.
Treat this Refresh Token with great care and store it securely, just like you would your user name and password to your online bank account. Authorization tokens NEVER expire! If you ever need to remove your authorization tokens, visit https://myaccount.google.com/permissions and delete Incredible PBX Google Voice OAUTH entry by clicking on it and choosing DELETE option.
Now that we have the needed Google OAuth token, we can continue with RasPBX or Incredible PBX.
Visit Sign in - Google Accounts and then click Sign-in & Security, near the bottom click on Allow less secure apps: OFF to toggle this ON. This is temporary while we get things tested and established.
Visit http://raspbx.local and login. (I presume this has been copied, installed, and somewhat configured. Google is your friend. Writing the image to an SD card will take some time - 10 to 30 minutes.)
Creating VoIP phone extensions:
From Applications drop-down menu, click Extensions. HINT: The User Extension and Secret of [Asterisk] PBX will be the VoIP phone user name and password respectively. I choose to start with 101 for the extension and an easy to recall password. The random secret like "9934e0a3f9149441e0f5ce3c418e3987" using the alpha-numeric on the VoIP phone keypad looked laborious and error prone - no thanks! Might be just fine if the phone has a webGUI of sorts to work with. Click the floating Submit bottom near the bottom to save these new settings. Then click the red Apply Config button at the top. (From hereon out I'll simply refer to these steps as Submit and Apply.)
YMMV as VoIP phones will vary in how they are setup and configured. Do take note of the port being used with the protocol. RasPBX has Chan_SIP defaulting to Port 5160 and Chan_PJSIP defaulting to Port 5060. Of course, as both the administrator and the end user, you change these up if so desired (just be consistent and reasonable, maybe 10.
The Ring Group:
From Applications drop-down menu, click Ring Groups. I created a ring group so that all extensions will ring for income calls. In theory, Paging would be very similar. Assign a number to the ring group, I choose 85, and select all the phone extensions you want to ring for inbound calls. Submit and Apply.
The finesse to get Google Voice working (with RasPBX - it seems a bit broken).
Downgrade to Google Voice/Motif v12.0.4.2:
From Admin drop-down menu, click Updates, and then click the Modules Updates tab.
Click the light blue Check Online button.
Find and expand the Google Voice/Chan Motif module under the Connectivity Module section.
Click Previous button, then select version 12.0.4.2. Click the Rollback button next to [version] 12.04.2. Click the Confirm button on the next screen. Then click the red Apply Config button.
Using the lower security Google Voice/Motif credentials:
From Connectivity drop-down menu, click Google Voice (Motif).
Enter the required details: your Google GMail user account name (i.e., the "johndoe" from johndoe -at- gmail.com), Google password, and your claimed Google Voice number. Both Create Outbound Routes and Create Trunk should be ON/Checked/Toggled. Then click Submit and Apply.
Test your configuration and try making a few calls. Once satisfied, we will need to revert a few things.
Upgrade to Google Voice/Motif 13.0.3.2:
From Admin drop-down menu, click Updates, and then click the Modules Updates tab.
Click the Check Online light blue button.
Find and expand the Google Voice/Chan Motif module under the Connectivity Module section.
This time around click the Download and Upgrade to 13.0.3.2 button. Scroll down and click the Process button. Click the Confirm button on the next screen. Then Apply.
Using the higher security OAuth 2.0 with Google Voice/Motif:
From Connectivity drop-down menu, click Google Voice (Motif).
This time we will edit the Google Voice (Motif) settings.
Click OAuth 2 to use the Refresh_Token obtained earlier (above).
Enter your Google Voice Refresh Token in the text box.
Since we have already established the Trunk and Outbound Routes the first time around, let's turn them off to prevent problems the second time around (yep, had to do this three times myself).
Set Configure Trunk to No with the No button.
Set Configure Outbound Routes to No with the No button.
Then click Submit and Apply.
Test the phone(s) and line(s) once more. If issues arise and you can't dial out, then you will need to revert back to Google Voice/Motif version 12.0.4.2, test phone(s) and line(s) again, then upgrade to the latest version of Google Voice/Motif, then edit your Google Voice (Motif) settings and try again with using the Google Voice Refresh Token.
Happy with how things are working, visit Sign in - Google Accounts again, click Sign-in & Security, and near the bottom of the page click on Allow less secure apps: ON to toggle this OFF (reverting back to just how we found it).
Next, I want to try and tackle VoIP calls with my cell phone via Bluetooth.
PS - Some minor tweaks for clarity and a newer image apparently is now available.
Last edited: