The included script (gvsip) plus gvsip.dat will install NAF's GVSIP on an existing FreePBX 13 or FreePBX 14 system.
It's assumed you're comfortable working with FreePBX and you're starting with a working system. You will also
need one or more Google Voice accounts, as well as OAuth credentials for each of those Google Voice accounts.
This script was tested on https://www.dslreports.com/forum/r30661088-PBX-FreePBX-for-the-Raspberry-Pi
!!! MAKE A BACKUP OF YOUR SYSTEM BEFORE PROCEEDING !!!
=====
Ensure you have the following FreePBX settings configured (FreePBX 14 illustrated):
Settings -> Advanced Settings -> Dialplan and Operational
SIP Channel Driver = both
Settings -> Asterisk SIP Settings -> General SIP Settings tab -> Media Transport Settings
STUN Server Address = stun.l.google.com:19302
Settings -> Asterisk SIP Settings -> Chan SIP Settings tab -> Advanced General Settings
Bind Port = 5160
Settings -> Asterisk SIP Settings -> Chan SIP Settings tab -> Advanced General Settings
TLS Bind Port = 5161
Settings -> Asterisk SIP Settings -> Chan PJSIP Settings tab -> tls
tls - 0.0.0.0 - All = Yes
Settings -> Asterisk SIP Settings -> Chan PJSIP Settings tab -> 0.0.0.0 (udp)
Port to Listen On = 5060
Remove any existing Google Voice (Motif) Accounts and Google Voice Trunks.
If any changes are necessary, reboot after all changes have been submitted/applied and recheck everything.
Running:
asterisk -rx "module show like pj"
should display around 48 loaded modules with all but around 2 of them displaying a status of "Running".
=====
Configure gvsip.dat for your Google Voice account(s). If you have more than one Google Voice account, copy
the four [gvsip1] sections to [gvsip2], [gvsip3], etc. Then edit each of the four [gvsipN] groups as follows:
Change (3 places):
NNNNNNNNNN to 10-digit Google Voice number
Update:
refresh_token=Google Voice Refresh Token
oauth_clientid=Google Voice Client ID
oauth_secret=Google Voice Client Secret
contact_additional_params=obn=Google Voice SIP Name
=====
Run gvsip (with gvsip.dat in the same directory) as root. gvsip may be run again as updates become available.
=====
For each Google Voice account, create a Custom Trunk as follows:
Connectivity -> Trunks -> Add Trunk -> Add Custom Trunk - custom Settings tab
Custom Dial String = PJSIP/$OUTNUM$@gvsipN (Replace 'gvsipN' with the [gvsipN] group number from gvsip.dat)
↧