Home

Resources

Products

Developers

Main • ConnectingToGoogleVoice

Google Voice Calls Through Yate server - using your SIP account

This document assesses an approachable way to set your Yate server to handle all your Google Voice calls (both incoming and outgoing).
The configuration I used for writing this tutorial is Mandriva 2010 spring OS, and Yate/YateClient 4.1. Other resources used are listed in the References.

What you need

The elements involved are:

  • Google Voice account
  • Yate server installed and properly configured. - You need at least Yate 4.1
  • SIP account logged in a SIP client softphone (we use YateClient here).

We'll go through the changes you need to do to each of these elements in order to achieve success.

Google Voice account

I assume you have a fully active and working Google Voice account. Still, if you've never called Google Voice before, just log in your Gmail account. Get online for chat and make a call using the Voice Calling button.

You should get this message, where you need to accept the Terms and Conditions to continue:

Now you need to go to Google Voice and log in.
In order for this tutorial to work, you need to make sure that Google will forward all your calls to your Google chat account.
To do this, in your Google Voice account, go to Settings:


In Settings -> Phones, choose only the Google Chat option.

Just to make sure that your account is working, you should make a few test calls (both incoming and outgoing).

Note: If your Google account is set up to use two-step verification, you must add an application-specific password or Yate will not be able to authenticate. To do this, go into your account settings, find the Security section, and then edit your Two-step Verification settings. There will be a link to manage application-specific passwords. There, you can generate a password just for Yate.

Now, let's focus on the Yate server.

Yate server

Get your own Yate from the main download page and install it, using our installation guides according to your operating system.

You need to modify the configuration files so first locate them on your computer. Make a local copy if you want to revert later to the default settings or you can download and install Yate again.

Note: On Mac OS X, the configuration files for the server are found under /Applications/YateServer.app/Contents/MacOS/conf.d/. You can see them listed in Finder by right-clicking the YateServer from /Applications and selecting Show package contents from the menu. A Finder window listing the Contents folder should appear. From there, go to MacOS -> conf.d to find the configuration files. Further information can be found on the Path and Directories page.

Here is a list of the configuration files you need to modify and why:

1. regfile.conf - set your sip account here (username and password), in the section following the 3 commented lines.

 
; you have to put username as a category and password into key password
; if password is missing the module will only register but not authenticate
; if password exists and is empty will blindly authenticate anybody

[yoursipusername]
password=yoursippassword

2. accfile.conf - allow your Google Voice user to connect to Yate server. Add the following lines at the end of the file:

 
[GoogleVoice]
enabled=yes
protocol=jabber
username=yourgvusername
domain=gmail.com
password=yourgvpassword
options=allowplainauth

Remember that if you have two-step verification turned on for your Google account, you need to generate an application-specific password and enter that here. (Google shows it with spaces, but you can remove the spaces.)

3. yate.conf - the following line makes Yate load the jabberclient module while in the server mode. The default configuration makes Yate function as a jabber server, but in this tutorial we need Yate to be a Jabber client for Google servers.

 
[postload]
; Put a line in this section for each shared library that you want to load
;  after all Yate modules
; Each line has to be of the form:
;   /path/to/the/library.so=boolean
; You should specify the full path to the library. Extension is operating
;  system specific - usually .so for *NIX systems and .dll for Windows
${modulepath}/client/jabberclient${modsuffix}=yes

4.yjinglechan.conf - configure the Jingle module to function in client mode, like the jabber mode in which Yate will run.

When you find the section with the presented comments, make the necessary changes so that you have the following:

 
[general]
servermode=no
stanza_timeout=10000
ping_interval=100000

5.regexroute.conf - you specify what rules are applied to calls. Mainly:

5.1. calls made to Google Voice are forwarded to your sip account. Make the modification at the end of [contexts] section.

 
[contexts]
; This section is used by the prerouting handler to classify calls by the
;  caller name; each call is assigned an input context (only if none exists
;  already) that is used later in the routing stage
......
${in_line}GoogleVoice=;called=yoursipusername;jingle_version=0;jingle_flags=noping;dtmfmethod=rfc2833

Also, add the following in the default section (only authenticated users will be allowed to make calls)

 
[default]
${username}^$=-;error=noauth

5.2. calls made from your sip account are sent to GoogleVoice (add also in the default section, after the test tones are indicated, for example):

 
^\([1-9][0-9]\{6\}\)$=jingle/1513\1@voice.google.com;line=GoogleVoice;\
 ojingle_version=0;ojingle_flags=noping;redirectcount=5;checkcalled=false;dtmfmethod=rfc2833
^\([1-9][0-9]\{2\}[1-9][0-9]\{6\}\)$=jingle/1\1@voice.google.com;line=GoogleVoice;\
 ojingle_version=0;ojingle_flags=noping;redirectcount=5;checkcalled=false;dtmfmethod=rfc2833
^\(+\?1[1-9][0-9]\{2\}[1-9][0-9]\{6\}\)$=jingle/\1@voice.google.com;line=GoogleVoice;\
 ojingle_version=0;ojingle_flags=noping;redirectcount=5;checkcalled=false;dtmfmethod=rfc2833

Note the first regexp is for 7-digit dialing (US area code 513); the second handles a 10-digit string; and the third handles an 11-digit NANPA number.

Now run Yate server - you have listed the commands for starting it on Windows or the similar commands for linux.

SIP account logged in YateClient

Using Yate Client, I logged my sip account - you should use the one set above in regfile. In case you use Yate as a server and as a SIP softphone, make sure you run the server first.

Test your configuration

In order to check if your configuration works, you need to do:

  • an outgoing call: use a toll-free number for example and check if you have audio.
  • an incoming call: you can call your own Google Voice number and say check your voicemail messages.

Let us know how this worked for you - using one of our contact details.

Modules used in this configuration:

  • gvoice.yate located in modules. This sends DTMF tones at answer time (the +1 you need to press to answer a call through Gvoice)

  • regfile.yate located in modules/server
  • accfile.yate located in modules/server.
  • regexroute.yate located in modules.

  • ysipchan.yate located in modules, needed because you'll receive and make calls through SIP protocol
  • yrtpchan.yate located in modules.

  • yjinglechan.yate located in modules.
  • jabberclient.yate located in modules/client.

  • ystunchan.yate - needed behind NAT


NOTE: Google plans to suspend use of Jabber protocol in May, 2014. Alternative method(s) are needed for GVoice to work with Yate.

References

[1.] Tuxguides.com post - Yate Server: Free Google Voice Calling and Google Voice/SIP gateway tutorial
[2.] Configuration example:Connecting to Gmail.
[3.] About Yate as JabberClient in the server mode: JabberClientWithJingleYateServer
[4.] More on the Jingle module: Yjinglechan

March 2014:
YateBTS 2.0 launched. Added authentication and WebGUI. Added USSD support in commercial version.

March 2014:
Yate 5.2 launched. Better JavaScript support and a fixed memory leak.

Jan 2014:
YateBTS 1.0 launched. The first GSM Basestation which works with an IMS/VoLTE core network.

Jan 2014:
Yate 5.1 launched. Better JavaScript support and added libygsm. Elisa chatbot added in RManager

Oct 2013:
OpenHSS is the Yate based HLR/HSS solution for MVNO and LTE carriers.

Oct 2013:
Yate 5 released. Added IPv6 support in SIP for LTE. Improved JavaScript support. Download NOW

Jan 2013:
Yate 4.3 released: Added XML support in Javascript. SCCP - GTT routing between different networks. Stability improvements.
Download NOW

Aug 2012:
Yate 4.2 released: SIP flood protection. Better Jabber/Google Voice support. Usable Javascript. Fixed SIGTRAN links fluctuations.
Download NOW

Apr 2012:
YateClient was accepted in the Mac Store.

Yate 4.1 released: better Gvoice support, iSAC codec, support for new Wanpipe drivers. Fixes T.38 and Mac client issues.

Mar 2012:
SS7Cloud is launched today, 1st March, 2012, by NullTeam, Yate creators. Having all you need to be a US CLEC, it brings SS7 services in a cloud.

Feb 2012:
Yate 4.0 released.
SCCP, TCAP, MAP and CAMEL, TCP and TLS in SIP, Javascript fast prototyping of telephony applications and brand new face for YateClient.

Nov 2011:
Here is a video that, quote "demonstrates the truly awesome power of the YATE engine, as it easily handles 3 simultaneous calls to an audio player application including dtmf (button press) handling "(from PaintedRockComm).

Nov 2011:
Yate will attend ORR - OPENRHEINRUHR (November 12 - 13).

04 May 2011:
sipgate chooses open source project Yate for core infrastructure.

12 Apr 2011:
Yate 3.3.2 released.
Fix for Jingle calls to Google Voice dropping after 5 minutes.
4 Apr 2011:
Yate 3.3 released.
Support for GMail chat conference, fixes for internal microphone in MacOS. Minor fixes in SS7 M2PA and ANSI. Fixes in H.323, SIP and RTP.

9 Mar 2011:
Yate 3.2 released.
Bug fixes in SIGTRAN/MGCP/SS7 and added support for CNAM/LNP lookup by SIP INVITE/3xx.

Feb 2011:
Yate will attend FOSDEM and XMPP summit.

31 Jan 2011:
Yate 3.1 released.
Yate client support for Google Voice. Support for any country tones in tonegen.

20 Dec 2010:
Yate 3.0 released.
SS7 ITU certified. SS7 STP added. Client supports Jabber IM (Google Talk + Facebook).

3 May 2010:
Yate 3.0.0 alpha 3 released. Featuring the new Jabber server and wideband audio.

8 March 2010:
Yate 2.2 released. Mostly bug fixes. Dahdi compatible. Latest 2 release before 3.0.

6-7 February 2010:
Yate booth at FOSDEM 2010. Free CD with Freesentral available.

2 Nov 2009:
Yate 2.1 launched. Can replace a Cisco PGW2200 to control a Cisco AS54xx.

6 Aug 2008:
Yate and OpenSIPS (former OpenSER) join to build IP based clusters.

4 Aug 2008:
Yate 2 launched.


EditHistoryBacklinksRecent ChangesSearch