Option 1 (Preferred)


Configure your Google Voice Gateway trunk as a friend. GVGW will authenticate calls to and from your PBX. Inbound calls will be matched by username and thus can be received from any GVGW proxy.


Steps


Go to the Trunks screen and add a new trunk. Fill in the top section with your preferred options.


In the Outgoing Settings section, set the Trunk Name to your GVGW username. For example, name the trunk GV18005551212.


Use the following in the trunk's PEER Details section:


username=GV18005551212 (Same as Trunk Name)

type=friend

qualify=yes

secret=password (as assigned)

host=gvgw.simonics.com 

 

Note that FreePBX assigns an appropriate context by default.


At the bottom of the trunk screen, specify a registration string:


GV18005551212:password@GV18005551212/NUMBER


where NUMBER corresponds to the DID of an Inbound Route.


Save the trunk.




Go to the Asterisk SIP Settings menu and edit the Chan SIP settings:


Set Allow SIP Guests to NO.


Below this, in Other SIP Settings, enter the values for a new option: match_auth_username = yes.


Save your settings and click the Apply bar at the top to activate the changes.




Option 2 (Less secure)


Configure your Google Voice Gateway trunk as a peer. You will need to allow SIP guests and allow anonymous inbound SIP, because Asterisk will be unable to match incoming calls from GVGW to your trunk as it changes registration amongst the GVGW proxies.


Steps


Go to the Trunks screen and add a new trunk. Fill in the top section with your preferred options.


In the Outgoing Settings section, you may name the trunk whatever you want.


Use the following in your trunk's PEER Details section:


host=gvgw.simonics.com

username=GV18005551212 (the username assigned to you)

secret=password (the SIP password assigned to you)

type=peer

insecure=port,invite   


Note that FreePBX assigns an appropriate context by default.


At the bottom of the trunk screen, specify a registration string:


GV18005551212:password@gvgw.simonics.com/NUMBER


where NUMBER corresponds to the DID of an Inbound Route


Save the trunk.


Change to the Asterisk SIP Settings screen and set the following options:


Allow Anonymous Inbound SIP Calls = YES in general SIP settings.


Allow SIP Guests = YES in Chan SIP settings.


Save your SIP settings and then use the Apply bar at the top of the FreePBX screen to activate your changes.