FOOD FOR THOUGHT Google Voice-SIP gateway

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Having been a bit fed up with Asterisk's flakiness with native Google Voice peering, I spent a good amount of time researching other solutions and have come up with a Google Voice-SIP gateway solution I have been using for a couple weeks and found to be rock solid.

I've packaged it up to offer to others as a service you can configure on the web. I invite you to try it out and give me some feedback. If it works well and folks want to use it, I'm willing to keep the server up simply for the cost of operation/bandwidth. For now though I could use some more test subjects.

If you'd like to set up your Google Voice lines as SIP trunks and forgo the Google Voice module on Asterisk altogether, whether because it's been problematic for you or for any other reason, give it a try:

https://simonics.com/gvgw/

(SSL certificate is a CA Cert. Information entered on the site is encrypted.)
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
Your cert is invalid. Not issued by trusted CA.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
OK, I upgraded to a Comodo cert. Have at it.

By the way, CACert, which is what I had on there, is great for free SSL certificates. (www.cacert.org) I always configure my FreePBX web sites to use SSL with a CACert certificate. Even if you only use FreePBX on your intranet, it makes sense to me to use SSL when you're performing administrative tasks through any web interface. Can't beat the price. And you just install the CACert root certificate into your browser so that validation passes. This way you don't have to get an alarm every time you go to your own self-signed SSL web sites.
 

kevinfvc

Member
Joined
Apr 11, 2008
Messages
132
Reaction score
2
If we want to test this GV-SIP gateway we enter our login and password? I'm not sure I feel comfortable with that, personally. Is this something you can package up, so we can try on our own server, perhaps?
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
I understand your concern. It'd be great if Google had some sort of auth API for Talk/Voice that would let you delegate access without turning over user/pass credentials, but unfortunately they do not.

I don't have anything that can be deployed locally. Depending on your network topology, though, it may not benefit you in a local deployment. One of the problems being solved is that, aside from Asterisk sometimes being flaky about whether it wants to talk to Google on a certain day, NAT and firewall configs can foil the connection. This gateway is out on the public Internet without NAT (but properly firewalled). That's the main benefit to me for my home system, anyway.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
New feature: CNAM lookup

New feature to the gateway: CNAM (Caller ID name) lookup.

Incoming calls from your Google Voice number will now show the Caller ID Name that is looked up, or "GoogleVoice" if no name is available.

It's working great... give it a try if you like.
 

TheMole

Guru
Joined
Aug 28, 2008
Messages
96
Reaction score
9
Would you mind giving us a summary of the technology behind it?
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Yate does the GVoice/SIP interworking and routes the calls.

A custom script performs CNAM lookups on incoming calls and adds the name to the caller ID.

The server has no NAT to potentially mangle up RTP. Yate is very good at detecting and dealing with NAT at the far end.

I wrote a set of scripts to connect from the web server to the gateway to set up and remove GVoice accounts and SIP registratons.
 

rossiv

Guru
Joined
Oct 26, 2008
Messages
2,624
Reaction score
139
What do you mean by CNAM? Inbound or outbound? GV won't let you set outbound. While I haven't used the OP's service, it should pass inbound CID to your * server.
 

tiggerpaws

Member
Joined
Feb 6, 2011
Messages
105
Reaction score
6
However, I tested the service and
get good outbound calls, but no
inbound, it just goes to gvoicemail.

I put that code in my extensions conf thing
and no effect.

Also if I accidentally hit a DTMF
button, my phone is muted for the
duration of the call.
 

tiggerpaws

Member
Joined
Feb 6, 2011
Messages
105
Reaction score
6
Wait, I understand now, this is for
OUTGOING calls only.

Ok it is not for incoming calls.

It is a good outgoing call service.
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
tigger, it works for both inbound and outbound calls. If your calls are hitting Google Voicemail without ringing your phones/IVR/etc. you either did not register to the switch or you have a misconfiguration on your PIAF box, probably in the trunk or inbound route setup. Review your asterisk logs to see. Include "insecure=port,invite" in your trunk definition if you don't have the global "Allow anonymous SIP" turned on.

CNAM is looked up on all inbound calls from Google Voice through the gateway and delivered to you. This is a free, bonus feature. There is no place for you to enable or disable it.
 

tiggerpaws

Member
Joined
Feb 6, 2011
Messages
105
Reaction score
6
Ok, I put the insecure=port,invite in my incoming
part of the trunk, I have google voice settings to
"google chat".
Incoming Settings

USER Context: <username>

My incoming settings are as such:
host=gvgw1.simonics.com
username=xxxxxxxx (privatised on the board)
secret=xxxxxxxx
type=user
context=from-trunk
insecure=port,invite

My outgoing settings work fine with one
tiny bug pressing a dtmf key by mistake
mutes my call permenently for durations
of the call, so maybe I got something
boogered up in there, so here are the
settings:

Outgoing Settings

Trunk Name: PEER Details: host=gvgw1.simonics.com
username=xxxxxxxxxxxxx
secret=xxxxxxxxxxxxx
type=peer


Also I typed in that line at the
end of my extensions_custom.conf file

[custom-gv-answer]
exten => _.,1,Answer()
exten => _.,n,Goto(from-pstn,${EXTEN},1)

Hmmm still does not ring anything here,
saw nothing on the cli about an incoming
call trying to get in.

What did I booger up?

More info at request
 

billsimon

Well-Known Member
Joined
Jan 2, 2011
Messages
1,534
Reaction score
727
Get rid of that whole incoming block. Make it empty. Not used.

In the peer settings define host, username, secret, type=peer, and insecure as you have them. Set the context to the custom context you defined (custom-gv-answer) instead of from-trunk.

Register to the switch by defining a registration string with your DID at the end, e.g. username:password@host/GVNUMBER
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Thanks for this Bill, just set it up to take it for a spin. Works just fine. :)
 

tiggerpaws

Member
Joined
Feb 6, 2011
Messages
105
Reaction score
6
No incoming calls on this test,
tried 3 times still gings and goes
to voice mail.

Settings are now:
Outgoing Settings

Trunk Name: PEER Details: host=gvgw1.simonics.com
username=GV1316XXXXXXX
secret=PRIVATISED
type=peer


Incoming Settings

USER Context: USER Details:
Blank as you told me.


Register string isi:
GV1316XXXXXXX:p[email protected]/GV1316XXXXXXX
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top