Google Voice using SIP via Simonics

Google Voice ended third-party support for XMPP clients in May 2014. My Asterisk auto-attendant remained functional into 2015. However it’s finally broken for me: when people call in, or when people don’t call in, some digits get pressed randomly in Asterisk (probably because of some negotiation between Asterisk and GV via XMPP) and calls are forwarded sporadically throughout the day (what I call phantom calls). Is there a way to still leverage Google Voice as my auto-attendant? I found this post talking about Simon Telephonics offering a GV gateway using SIP. There is a $5 setup fee. I paid it and now am able to continue using it with Asterisk as my auto-attendant. It also works with any SIP phone or SIP app (eg, CSipSimple). I like this solution because I still get free calls using Google Voice without having to use another third-party to pay for my calls.

To set up on Asterisk, empty out /etc/asterisk/motif.conf and /etc/asterisk/xmpp.conf. Then edit /etc/asterisk/sip.conf:

; simonics http://support.simonics.com/support/solutions/articles/3000033840-asterisk-sip-conf
[general]
allowguest=no
match_auth_username=yes
register=GV1234567890:simonics_given_pw@gvgw.simonics.com

[GV1234567890] type=friend username=GV1234567890 secret=simonics_given_pw host=gvgw.simonics.com qualify=yes context=tnttsp ; context in extensions.conf disallow=all allow=ulaw

1234567890 is the assumed Google Voice telephone number.

In my previous dial plan (/etc/asterisk/extensions.conf), I had to comment out the third line:

exten => s,1,Answer()
exten => s,n,Wait(1)
;; exten => s,n,SendDTMF(1) ;; needed for jabber/xmpp/mptif, not sip via simonics
...

SendDTMF(1) was previously required. However, Simon Telephonics sets everything up with Google Voice so this isn’t required.

In the same file, to call 1987654321, change

Dial(Motif/motif_google/+1987654321@voice.google.com,,r)

to

Dial(SIP/+1987654321@GV1234567890,,r)

All is good!