Convenient solution for setting up your Google Voice using Yate server to handle incoming and outgoing calls.
Mandriva 2010 Spring OS and Yate / YateClient 4.1 were used as configurations.

')
So what do you need?Google voice
In order for everything to work, you first need to make sure that your Google Voice directs all your outgoing and incoming calls to your Google chat account.
In your account, enter the settings:

In the Settings menu, open Phones, and then check only the Google Chat option. Leave the rest unchecked.

Make some test calls to make sure everything works.
Yate server
First you need to
download and install yourself Yate server.
Before working with files, make a local copy of them in order to be able to return to the default settings, or reinstall your Yate server.
Now you need to change some configuration files.
1. regfile.conf - set the username and password for your SIP account
[yoursipusername]
password = yoursippassword
2. accfile.conf - allow Google Voice to connect to Yate server.
You need to add the following to the end of the file:
[GoogleVoice]
enabled = yes
protocol = jabber
username = yourgvusername
domain = gmail.com
password = yourgvpassword
options = allowplainauth
3. yate.conf -
jabberclient module for Yate server.
To make Yate a Jabber client for a Google server, you need to add:
[postload]
; Put a line on this section for each shared library.
; after all Yate modules
; Each line has to be of the form:
; /path/to/the/library.so=boolean
; You should specify the 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 - configures the Jingle module in client mode, like Jabber mode.
To do this, replace the lines according to the pattern:
[general]
servermode = no
stanza_timeout = 10,000
ping_interval = 100000
5.regexroute.conf - rules for calls
5.1. For Google Voice calls to be redirected to your SIP account, you need to add the following to the end of the 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
5.2 So that calls can be made only by authorized Google Voice users.
[default]
$ {username} ^ $ = -; error = noauth
5.3. Configure outbound routing:
^ \ ([1-9] [0-9] \ {6 \} \) $ = jingle / 513 \ 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
Now you can run Yate server!
SIP account is registered in YateClient.
When registering, use the username and password stated above in regfile.conf.
Make some test calls to check the installed configurations.MyAsterisk collected and translated the information for you .