|
Home Resources Products
Developers |
Main • ConnectingToGoogleVoice
Google Voice Calls Through Yate server - using your SIP accountThis document assesses an approachable way to set your Yate server to handle all your Google Voice calls (both incoming and outgoing). What you needThe elements involved are:
We'll go through the changes you need to do to each of these elements in order to achieve success. Google Voice accountI 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.
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 serverGet 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 YateClientUsing 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 configurationIn order to check if your configuration works, you need to do:
Let us know how this worked for you - using one of our contact details. Modules used in this configuration:
References [1.] Tuxguides.com post - Yate Server: Free Google Voice Calling and Google Voice/SIP gateway tutorial |
Apr 2013: Feb 2013: Jan 2013: Aug 2012: Apr 2012: Yate 4.1 released: better Gvoice support, iSAC codec, support for new Wanpipe drivers. Fixes – T.38 and Mac client issues. Mar 2012: Feb 2012: Nov 2011: Nov 2011: 04 May 2011: 12 Apr 2011: 9 Mar 2011: Feb 2011: 31 Jan 2011: 20 Dec 2010: 3 May 2010: 8 March 2010: 6-7 February 2010: 2 Nov 2009: 6 Aug 2008: 4 Aug 2008: |